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.220.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.220.2-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: molgenis_emx2_pyclient-8.220.2.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for molgenis_emx2_pyclient-8.220.2.tar.gz
Algorithm Hash digest
SHA256 c72049f2b649f35f4cbbf075c8b86f0cec7f8763dfaf7fd2363806b5f5831984
MD5 70943b16f4a66a3cf44eba388a4199ed
BLAKE2b-256 12266746975d3856713ce3c4e986074a7b6a4865952add8dd37f6bc39f80efd5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for molgenis_emx2_pyclient-8.220.2-py3-none-any.whl
Algorithm Hash digest
SHA256 09e5ef54cd6ca14978bde90870e276c39a206056685ce58870fc3d99a5855b88
MD5 a7fc94cbc46b9ca9129490a9be791ae7
BLAKE2b-256 31dd6a448c7e94be48c74bcbe69148ef88d0e24f40b8e8e5f5d3fd261f6b8512

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