Python bindings to the OMERO.blitz server
Project description
Introduction
OMERO.py provides Python bindings to the OMERO.blitz server as well as a pluggable command-line interface.
Dependencies
Direct dependencies of OMERO.py are:
future
numpy
Pillow
Installation
We recommend installing omero-py in a Python virtual environment. You can create one using either venv or conda (preferred). If you opt for Conda, you will need to install it first, see miniconda for more details.
To install omero-py using conda (preferred):
conda create -n myenv -c ome python=3.8 zeroc-ice36-python conda activate myenv conda install -c conda-forge omero-py
Alternatively install omero-py using venv:
python3.8 -m venv myenv . myenv/bin/activate pip install omero-py
You may need to replace python3.8 with python or python3 depending on your Python distribution.
Setting of the environment variable OMERODIR is required for some functionality. $OMERODIR/var/log/ directory will contain log files. $OMERODIR/etc/grid/config.xml is used to store config.
If OMERODIR is set to an OMERO.server directory, the import and admin commands will be enabled:
# If you need import or admin commands: export OMERODIR=/path/to/OMERO.server/ # otherwise, can choose any location. export OMERODIR=$(pwd)
Since version 5.13.0, the use of omero certificates is required to ensure that an OMERO server installation has, at minimum, a self-signed certificate.
See: OMERO documentation for more details and OMERO server certificate management plugin
Usage
For OMERO python language bindings, see OMERO.py.
For Command Line usage, see OMERO.CLI.
For API documentation, see https://omero-py.readthedocs.io/
Contributing
See: OMERO documentation
Developer installation
OMERO.py currently depends on an externally built artifact which is automatically bundled in the PyPI package.
For a development installation we recommend creating a virtualenv with the following setup (example assumes python3.8 but you can create and activate the virtualenv using any compatible Python):
To install using venv:
python3.8 -mvenv myenv . myenv/bin/activate git clone https://github.com/ome/omero-py cd omero-py python setup.py devtarget pip install -e .
To install omero-py using conda (preferred):
conda create -n myenv -c ome python=3.8 zeroc-ice36-python conda activate myenv git clone https://github.com/ome/omero-py cd omero-py python setup.py devtarget pip install -e .
This will install omero-py into your virtualenv as an editable package, so any edits to src files should be reflected in your installation. Note that if you add or remove files you must rerun the last two steps.
Running tests
Unit tests are located under the test directory and can be run with pytest.
Integration tests
Integration tests are stored in the main repository (ome/openmicroscopy) and depend on the OMERO integration testing framework. Reading about Running and writing tests in the OMERO documentation
Release process
This repository uses bump2version to manage version numbers. To tag a release run:
$ bumpversion release
This will remove the .dev0 suffix from the current version, commit, and tag the release.
To switch back to a development version run:
$ bumpversion --no-tag [major|minor|patch]
specifying major, minor or patch depending on whether the development branch will be a major, minor or patch release. This will also add the .dev0 suffix.
Remember to git push all commits and tags.s essential.
The CI pipeline will automatically deploy the tag onto PyPI. Once released, a Pull Request needs to be opened against conda-omero-py to update the official OMERO.py Conda package.
Documentation
The API documentation is generated using Sphinx. To generate it:
Install Sphinx.
Set the environment variable NO_TEMP_MANAGER to true.
In the docs directory, run make clean html.
License
OMERO.py is released under the GPL v2.
Copyright
2009-2023, The Open Microscopy Environment, Glencoe Software, Inc.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file omero-py-5.14.0.tar.gz
.
File metadata
- Download URL: omero-py-5.14.0.tar.gz
- Upload date:
- Size: 2.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8bc4ee7a377c34180db837a1c46e2f627e5cbe9438d267cfc729188985ec0266 |
|
MD5 | 2f5642a1f18fe0a69090bf88ed080428 |
|
BLAKE2b-256 | 1de05e56044a3079b7eeadd0be0fef3af61a7d184943905b7432ee2391b81e98 |
File details
Details for the file omero_py-5.14.0-py3-none-any.whl
.
File metadata
- Download URL: omero_py-5.14.0-py3-none-any.whl
- Upload date:
- Size: 2.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10e710984301823cf8cc56637d296f8bb180e9ba9bc5da8dbb0e2fd996ccf8b5 |
|
MD5 | da611b8d67af2f615be93f4ecd02f951 |
|
BLAKE2b-256 | 4f4232be9326fdcc055f9c848c8e405f319cd55da082a790030a8be282d4092e |