omero_data.OmeroConnection
Provide a connection to OMERO.
Usage
omero_data.OmeroConnection()Connection settings come from the environment and the user config; the password from the environment, the keychain or a password file (see omero_screen.settings). They are resolved when connecting.
Methods
| Name | Description |
|---|---|
| close() | Close the current connection. |
| create_conn() | Create a new connection to OMERO. |
| get_conn() | Get the current connection to OMERO, creating one if required. |
close()
Close the current connection.
Usage
close(hard=True)Parameters
hard: bool = True- If true perform a hard close.
create_conn()
Create a new connection to OMERO.
Usage
create_conn()Returns
BlitzGateway- OMERO connection
Raises
RuntimeError- if a connection cannot be opened.
get_conn()
Get the current connection to OMERO, creating one if required.
Usage
get_conn()The connection is stored for reuse.
Returns
BlitzGateway- OMERO connection
Raises
RuntimeError- if a required connection cannot be opened.