Skip to main content

OMERO user token

Python package that creates long running user tokens for use with the OMERO API under non-interactive, headless conditions.

Requirements

  • Python 3.9+
  • OMERO.server 5.6

Usage

Creating a user token and making it active:

omero-user-token set

Please see omero-user-token set --help for detailed information. The default server hostname and port can be set in ${HOME}/.omero_user_token/config using an INI file compatible style:

[server]
host = omero.example.com
port = 4064

Retrieving the current active token (validation will be performed):

omero-user-token get

Token format

The token format is as follows:

<omero_session_key>@<host>:<port>

Example usage

Bash:

token=$(omero-user-token get)
if [ $? -ne 0]; then
    echo "No valid token found"
    exit 1
fi
key=$(echo "${token}" | sed -e 's/^\(.*\)@.*:.*$/\1/')
host=$(echo "${token}" | sed -e 's/^.*@\(.*\):.*$/\1/')
port=$(echo "${token}" | sed -e 's/^.*@.*:\(.*\)$/\1/')
echo "Connecting to ${host}:${port} with key ${key}"

Python:

from omero_user_token import getter
token = getter()
if token is not None:
    omero_session_key = token[:token.find('@')]
    host, port = token[token.find('@') + 1:].split(':')
    port = int(port)
    key = token[:token.find('@')]
    print(f"Connecting to {host}:{port} with key {key}")

License

OMERO user token is distributed under the terms of the GPL v2 license. Please see LICENSE.txt for further details.

Metadata

Release files for omero-user-token 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for omero-user-token 0.4.1
File Size Uploaded Provenance Actions
omero_user_token-0.4.1.tar.gz 20.4 kB Without provenance Details for omero_user_token-0.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for omero-user-token 0.4.1
File Interpreter ABI Platform Actions
omero_user_token-0.4.1-py3-none-any.whl Python 3 none any Details for omero_user_token-0.4.1-py3-none-any.whl

Total release size: 37.4 kB

Release files / omero_user_token-0.4.1.tar.gz

Download URL omero_user_token-0.4.1.tar.gz
Size 20.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f0fa9042dbc227418092a807d25b830e1279440a8a695c8001596fa77f2f33df
BLAKE2b-256 checksum
How to use checksums
dc706e5ecac24d27ceb9202879b031da2ec5c9b553fb0f153e023a308ea427a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.8

Release files / omero_user_token-0.4.1-py3-none-any.whl

Download URL omero_user_token-0.4.1-py3-none-any.whl
Size 17.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
723da50f52b06f7e7573271d0e97064b1d950fe60199d3d0dac06ab931495721
BLAKE2b-256 checksum
How to use checksums
c407de4d44da0a26579987402f8e42a02ed6b14f067f355e2db23fef9501dbc5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.8

Security for omero-user-token 0.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page