Page 1 of 1

Use OMERO APIs without installing server

PostPosted: Thu Jul 24, 2014 10:56 am
by pz3977
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

Re: Use OMERO APIs without installing server

PostPosted: Thu Jul 24, 2014 11:14 am
by wmoore
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)


Re: Use OMERO APIs without installing server

PostPosted: Thu Jul 24, 2014 2:01 pm
by pz3977
Thanks wmoore,
It works perfectly fine.