climb-onyx-client


Nameclimb-onyx-client JSON
Version 4.8.1 PyPI version JSON
download
home_pageNone
SummaryCLI and Python library for Onyx
upload_time2025-08-14 16:13:57
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseNone
keywords bioinformatics metadata onyx
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![Onyx Banner Image](images/onyx.png)

# Onyx-client

## Overview

A command-line interface and Python API for interacting with the [Onyx](https://github.com/CLIMB-TRE/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](https://climb-tre.github.io/onyx-client/).

## Setup

### Install from [conda-forge](https://anaconda.org/conda-forge/climb-onyx-client)

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

### Install from [PyPI](https://pypi.org/project/climb-onyx-client/)

```
$ pip install climb-onyx-client
```

### Build from source

Download and install the client into a Python virtual environment:

```
$ git clone https://github.com/CLIMB-COVID/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.                                         │
╰───────────────────────────────────────────────────────────────────────────────────────────╯
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "climb-onyx-client",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "Thomas Brier <t.o.brier@bham.ac.uk>",
    "keywords": "bioinformatics, metadata, onyx",
    "author": null,
    "author_email": "Thomas Brier <t.o.brier@bham.ac.uk>",
    "download_url": "https://files.pythonhosted.org/packages/30/4f/756f84b7e2b33761ad7faf4ba2ad68a7bc1ec539b2fb04d7d3254c7314a4/climb_onyx_client-4.8.1.tar.gz",
    "platform": null,
    "description": "![Onyx Banner Image](images/onyx.png)\n\n# Onyx-client\n\n## Overview\n\nA command-line interface and Python API for interacting with the [Onyx](https://github.com/CLIMB-TRE/onyx) database. Onyx-client provides both CLI commands and Python methods for:\n\n- Viewing projects, and their field specifications\n- Creating/updating/deleting project records and analyses\n- Retrieving full details and change history of an individual record/analysis\n- Granular filtering/aggregation functionality across multiple records and analyses\n- Exporting of data in JSON/CSV/TSV formats\n- Matching anonymised identifiers to their original values\n\nFor more information, check out the [documentation](https://climb-tre.github.io/onyx-client/).\n\n## Setup\n\n### Install from [conda-forge](https://anaconda.org/conda-forge/climb-onyx-client)\n\n```\n$ conda create --name onyx --channel conda-forge climb-onyx-client\n```\n\n### Install from [PyPI](https://pypi.org/project/climb-onyx-client/)\n\n```\n$ pip install climb-onyx-client\n```\n\n### Build from source\n\nDownload and install the client into a Python virtual environment:\n\n```\n$ git clone https://github.com/CLIMB-COVID/onyx-client.git\n$ cd onyx-client/\n$ python -m venv .venv\n$ source .venv/bin/activate\n$ pip install .\n```\n\nCheck it works:\n\n```\n$ onyx\n                                                                                             \n Usage: onyx [OPTIONS] COMMAND [ARGS]...                                                     \n                                                                                             \n API for Pathogen Metadata.                                                                  \n For documentation, see: https://climb-tre.github.io/onyx-client/                            \n                                                                                             \n\u256d\u2500 Options \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 --domain    -d      TEXT  Domain name for connecting to Onyx. [env var: ONYX_DOMAIN]      \u2502\n\u2502                           [default: None]                                                 \u2502\n\u2502 --token     -t      TEXT  Token for authenticating with Onyx. [env var: ONYX_TOKEN]       \u2502\n\u2502                           [default: None]                                                 \u2502\n\u2502 --username  -u      TEXT  Username for authenticating with Onyx. [env var: ONYX_USERNAME] \u2502\n\u2502                           [default: None]                                                 \u2502\n\u2502 --password  -p      TEXT  Password for authenticating with Onyx. [env var: ONYX_PASSWORD] \u2502\n\u2502                           [default: None]                                                 \u2502\n\u2502 --version   -v            Show the client version number and exit.                        \u2502\n\u2502 --help      -h            Show this message and exit.                                     \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\u256d\u2500 Commands \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 auth               Authentication commands.                                               \u2502\n\u2502 admin              Admin commands.                                                        \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\u256d\u2500 Info \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 projects           View available projects.                                               \u2502\n\u2502 types              View available field types.                                            \u2502\n\u2502 lookups            View available lookups.                                                \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\u256d\u2500 Records \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 fields             View the field specification for a project.                            \u2502\n\u2502 choices            View options for a choice field in a project.                          \u2502\n\u2502 get                Get a record from a project.                                           \u2502\n\u2502 filter             Filter multiple records from a project.                                \u2502\n\u2502 history            View the history of a record in a project.                             \u2502\n\u2502 analyses           View analyses of a record in a project.                                \u2502\n\u2502 identify           Get the anonymised identifier for a value on a field.                  \u2502\n\u2502 create             Create a record in a project.                                          \u2502\n\u2502 update             Update a record in a project.                                          \u2502\n\u2502 delete             Delete a record in a project.                                          \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\u256d\u2500 Analyses \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 analysis-fields    View the analysis field specification for a project.                   \u2502\n\u2502 analysis-choices   View options for an analysis choice field.                             \u2502\n\u2502 get-analysis       Get an analysis from a project.                                        \u2502\n\u2502 filter-analysis    Filter multiple analyses from a project.                               \u2502\n\u2502 analysis-history   View the history of an analysis in a project.                          \u2502\n\u2502 analysis-records   View records involved in an analysis in a project.                     \u2502\n\u2502 create-analysis    Create an analysis in a project.                                       \u2502\n\u2502 update-analysis    Update an analysis in a project.                                       \u2502\n\u2502 delete-analysis    Delete an analysis in a project.                                       \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\u256d\u2500 Accounts \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502 profile            View profile information.                                              \u2502\n\u2502 activity           View latest profile activity.                                          \u2502\n\u2502 siteusers          View users from the same site.                                         \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "CLI and Python library for Onyx",
    "version": "4.8.1",
    "project_urls": {
        "GitHub": "https://github.com/CLIMB-TRE/onyx-client"
    },
    "split_keywords": [
        "bioinformatics",
        " metadata",
        " onyx"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "5abc215c26cccb1756c56b0ecdff7a66665d3beba4eb31442f9bde59da11899f",
                "md5": "dbdfc4f7444213f0907c6de2983344a9",
                "sha256": "af82ba12fd0a01b4a69815188e860a1b1c5a8b0cce1a1e303ddda55ec778fdf0"
            },
            "downloads": -1,
            "filename": "climb_onyx_client-4.8.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "dbdfc4f7444213f0907c6de2983344a9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 30370,
            "upload_time": "2025-08-14T16:13:56",
            "upload_time_iso_8601": "2025-08-14T16:13:56.230997Z",
            "url": "https://files.pythonhosted.org/packages/5a/bc/215c26cccb1756c56b0ecdff7a66665d3beba4eb31442f9bde59da11899f/climb_onyx_client-4.8.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "304f756f84b7e2b33761ad7faf4ba2ad68a7bc1ec539b2fb04d7d3254c7314a4",
                "md5": "7a8cdd4e6d92e8d59982e1753acb64f5",
                "sha256": "0203fdf60add0c8c833e256bdbe083fa9a9c3b19d4898f6207e520822fa1f66c"
            },
            "downloads": -1,
            "filename": "climb_onyx_client-4.8.1.tar.gz",
            "has_sig": false,
            "md5_digest": "7a8cdd4e6d92e8d59982e1753acb64f5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 26779,
            "upload_time": "2025-08-14T16:13:57",
            "upload_time_iso_8601": "2025-08-14T16:13:57.448556Z",
            "url": "https://files.pythonhosted.org/packages/30/4f/756f84b7e2b33761ad7faf4ba2ad68a7bc1ec539b2fb04d7d3254c7314a4/climb_onyx_client-4.8.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-14 16:13:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "CLIMB-TRE",
    "github_project": "onyx-client",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "climb-onyx-client"
}
        
Elapsed time: 1.94698s