Skip to main content

Python bindings to the OMERO.blitz server

Project description

https://github.com/ome/omero-py/workflows/Build/badge.svg https://badge.fury.io/py/omero-py.svg

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:

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.6 zeroc-ice36-python omero-py
conda activate myenv

Alternatively install omero-py using venv:

python3.6 -m venv myenv
. myenv/bin/activate
pip install omero-py

You may need to replace python3.6 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)

See: OMERO documentation for more details.

Usage

  • For OMERO python language bindings, see OMERO.py.

  • For Command Line usage, see OMERO.CLI.

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.6 but you can create and activate the virtualenv using any compatible Python):

To install using venv:

python3.6 -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.6 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.

License

OMERO.py is released under the GPL v2.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

omero-py-5.10.0.tar.gz (2.3 MB view details)

Uploaded Source

Built Distribution

omero_py-5.10.0-py3-none-any.whl (2.8 MB view details)

Uploaded Python 3

File details

Details for the file omero-py-5.10.0.tar.gz.

File metadata

  • Download URL: omero-py-5.10.0.tar.gz
  • Upload date:
  • Size: 2.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.12

File hashes

Hashes for omero-py-5.10.0.tar.gz
Algorithm Hash digest
SHA256 b9e8d71ca56131367045e976c490e6c0913525e0331a504d639a6d10f771e42d
MD5 5b4b436a7b8556df96e54ff542a3e666
BLAKE2b-256 388740cea9d50fadfbeaa4aa0c8933db7d51222c4f4f101507336baebfe15d3b

See more details on using hashes here.

File details

Details for the file omero_py-5.10.0-py3-none-any.whl.

File metadata

  • Download URL: omero_py-5.10.0-py3-none-any.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.12

File hashes

Hashes for omero_py-5.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 be32a39f8c80c7ec72783fe1a4d8d86f75caf0ee39072840cfe5921a35e895b4
MD5 acb151327edce1149b8aab21665d10b4
BLAKE2b-256 f5e2b548ca76a3cb8a4a4e2f8c0d51d9461c8a9fa5798ddba51d1e07e2326584

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page