We're Hiring!

Use OMERO APIs without installing server

General user discussion about using the OMERO platform to its fullest. Please ask new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

There are workflow guides for various OMERO functions on our help site - http://help.openmicroscopy.org

You should find answers to any basic questions about using the clients there.

Use OMERO APIs without installing server

Postby pz3977 » Thu Jul 24, 2014 10:56 am

Hi,

I want to write a piece of code (e.g in python like the ones is provided in code sample :http://www.openmicroscopy.org/site/support/omero5/developers/Python.html) in order to use omero APIs, without installing omero.server , using omero.py package. Is it possible?

In the sample code I saw that BlitzGateway is imported. however, I could not find BlitzGateway in omero.gateway in omero.py. How I can connect to a remote server?

thx,
pz3977
pz3977
 
Posts: 31
Joined: Thu Jul 10, 2014 11:39 am

Re: Use OMERO APIs without installing server

Postby wmoore » Thu Jul 24, 2014 11:14 am

If you have the lib/python directory on your $PYTHONPATH then you should be able to do:

Code: Select all
$ python
>>> from omero.gateway import BlitzGateway

>>> conn = BlitzGateway('username','password', host='yourserver.org', port=4064)
>>> conn.connect()
>>> image = conn.getObject("Image", 123)

User avatar
wmoore
Team Member
 
Posts: 674
Joined: Mon May 18, 2009 12:46 pm

Re: Use OMERO APIs without installing server

Postby pz3977 » Thu Jul 24, 2014 2:01 pm

Thanks wmoore,
It works perfectly fine.
pz3977
 
Posts: 31
Joined: Thu Jul 10, 2014 11:39 am


Return to User Discussion

Who is online

Users browsing this forum: Google [Bot] and 1 guest