Skip to main content

Python client for the Molgenis EMX2 API

Project description

Installation

pip install molgenis_emx2_pyclient

How to use

Within your Python project import the class Client and use it as a context manager

from molgenis_emx2_pyclient import Client

username = 'username'
password = '...'

with Client('https://example.molgeniscloud.org') as client:
    client.signin(username, password)

    # Retrieve signin information
    print(client.status)
    """ Output:
    Host: https://example.molgeniscloud.org
    Status: Signed in
    Schemas:
        CatalogueOntologies
        catalogue
        ExampleSchema
        ...
    Version: v8.214.1
    """
    
    # Retrieve data from a table on a schema
    data = client.get(schema='ExampleSchame', table='Cohorts')

Development

Clone the molgenis-emx2 repository from GitHub

git clone git@github.com:molgenis/molgenis-emx2.git

Change the working directory to .../tools/pyclient

Create a virtual Python environment

On macOS:

python -m venv venv

On Linux:

python3.11 -m venv venv

On Windows:

py -3.11 venv venv

Activate the virtual environment

On macOS and Linux:

source venv/bin/activate

On Windows:

.venv\Scripts\activate.bat

Install the script dependencies

pip install -r requirements.txt

Build

(venv) $ python -m build

(venv) $ pip install dist/molgenis_emx2_pyclient*.whl

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

molgenis_emx2_pyclient-8.223.2.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

molgenis_emx2_pyclient-8.223.2-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file molgenis_emx2_pyclient-8.223.2.tar.gz.

File metadata

File hashes

Hashes for molgenis_emx2_pyclient-8.223.2.tar.gz
Algorithm Hash digest
SHA256 cb7bc0c94bf89e059536a4e63e84b79262f83829a586d8b3a26f3a41b28b725c
MD5 14a6177ada807cf5aaff284c315f0f2e
BLAKE2b-256 2da1c214fbbf70162e72af40183d769568b6a0c51fbc6057cb555c31d948b204

See more details on using hashes here.

File details

Details for the file molgenis_emx2_pyclient-8.223.2-py3-none-any.whl.

File metadata

File hashes

Hashes for molgenis_emx2_pyclient-8.223.2-py3-none-any.whl
Algorithm Hash digest
SHA256 127283be9fe0b8bf35aeb310a5273de08ae06b0d491b9f6585701c5e2658dca6
MD5 cff2bed29b4d79e61400b62d6be37bf0
BLAKE2b-256 cfe0414481573eea9060d9f170de2fcc4aa5817c040e8cec898ecb6949afbebd

See more details on using hashes here.

Supported by

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