Skip to main content

Onyx-client

Overview

A command-line interface and Python API for interacting with the Onyx database. Onyx-client provides both CLI commands and Python methods for:

  • Viewing projects, and their field specifications
  • Creating/updating/deleting project records and analyses
  • Retrieving full details and change history of an individual record/analysis
  • Granular filtering/aggregation functionality across multiple records and analyses
  • Exporting of data in JSON/CSV/TSV formats
  • Matching anonymised identifiers to their original values

For more information, check out the documentation.

Setup

Install from conda-forge

$ conda create --name onyx --channel conda-forge climb-onyx-client

Install from PyPI

$ pip install climb-onyx-client

Build from source

Download and install the client into a Python virtual environment:

$ git clone https://github.com/CLIMB-TRE/onyx-client.git
$ cd onyx-client/
$ python -m venv .venv
$ source .venv/bin/activate
$ pip install .

Check it works:

$ onyx
                                                                                             
 Usage: onyx [OPTIONS] COMMAND [ARGS]...                                                     
                                                                                             
 API for Pathogen Metadata.                                                                  
 For documentation, see: https://climb-tre.github.io/onyx-client/                            
                                                                                             
╭─ Options ─────────────────────────────────────────────────────────────────────────────────╮
│ --domain    -d      TEXT  Domain name for connecting to Onyx. [env var: ONYX_DOMAIN]      │
│                           [default: None]                                                 │
│ --token     -t      TEXT  Token for authenticating with Onyx. [env var: ONYX_TOKEN]       │
│                           [default: None]                                                 │
│ --username  -u      TEXT  Username for authenticating with Onyx. [env var: ONYX_USERNAME] │
│                           [default: None]                                                 │
│ --password  -p      TEXT  Password for authenticating with Onyx. [env var: ONYX_PASSWORD] │
│                           [default: None]                                                 │
│ --version   -v            Show the client version number and exit.                        │
│ --help      -h            Show this message and exit.                                     │
╰───────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ────────────────────────────────────────────────────────────────────────────────╮
│ auth               Authentication commands.                                               │
│ admin              Admin commands.                                                        │
╰───────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Info ────────────────────────────────────────────────────────────────────────────────────╮
│ projects           View available projects.                                               │
│ types              View available field types.                                            │
│ lookups            View available lookups.                                                │
╰───────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Records ─────────────────────────────────────────────────────────────────────────────────╮
│ fields             View the field specification for a project.                            │
│ choices            View options for a choice field in a project.                          │
│ get                Get a record from a project.                                           │
│ filter             Filter multiple records from a project.                                │
│ history            View the history of a record in a project.                             │
│ analyses           View analyses of a record in a project.                                │
│ identify           Get the anonymised identifier for a value on a field.                  │
│ create             Create a record in a project.                                          │
│ update             Update a record in a project.                                          │
│ delete             Delete a record in a project.                                          │
╰───────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Analyses ────────────────────────────────────────────────────────────────────────────────╮
│ analysis-fields    View the analysis field specification for a project.                   │
│ analysis-choices   View options for an analysis choice field.                             │
│ get-analysis       Get an analysis from a project.                                        │
│ filter-analysis    Filter multiple analyses from a project.                               │
│ analysis-history   View the history of an analysis in a project.                          │
│ analysis-records   View records involved in an analysis in a project.                     │
│ create-analysis    Create an analysis in a project.                                       │
│ update-analysis    Update an analysis in a project.                                       │
│ delete-analysis    Delete an analysis in a project.                                       │
╰───────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Accounts ────────────────────────────────────────────────────────────────────────────────╮
│ profile            View profile information.                                              │
│ activity           View latest profile activity.                                          │
│ siteusers          View users from the same site.                                         │
╰───────────────────────────────────────────────────────────────────────────────────────────╯

Metadata

Release files for climb-onyx-client 4.10.0

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

Source distribution (sdist)

Source distribution for climb-onyx-client 4.10.0
File Size Uploaded Provenance Actions
climb_onyx_client-4.10.0.tar.gz 27.3 kB With provenance Details for climb_onyx_client-4.10.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for climb-onyx-client 4.10.0
File Interpreter ABI Platform Actions
climb_onyx_client-4.10.0-py3-none-any.whl Python 3 none any Details for climb_onyx_client-4.10.0-py3-none-any.whl

Total release size: 58.3 kB

Release files / climb_onyx_client-4.10.0.tar.gz

Download URL climb_onyx_client-4.10.0.tar.gz
Size 27.3 kB
Tags Source
SHA-256 checksum
How to use checksums
70aca76591228c1222521951fbcf45250d23c6ce11b0cd1e395041f11df8261b
BLAKE2b-256 checksum
How to use checksums
439bb7bcaf0c50e55efce6d752f33bb0ba03887f4332545cfc165643e5587a6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 13, 2026.

Transparency log

Release files / climb_onyx_client-4.10.0-py3-none-any.whl

Download URL climb_onyx_client-4.10.0-py3-none-any.whl
Size 30.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6b224b31ef4948390d28938d8a2b3ec4587d9bb6e293eec146bd991342d29f43
BLAKE2b-256 checksum
How to use checksums
34ed30ce15177c6a5e1b1f27d453da664268620ace480e9a3c31deb22c4a664a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 13, 2026.

Transparency log

Security for climb-onyx-client 4.10.0

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for climb_onyx_client-4.10.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 13, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

4.10.0 This release

2 release files Full provenance

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