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
Built Distribution
Close
Hashes for molgenis_emx2_pyclient-8.223.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9aca8af5a06c0bf0a145823b63a610426a42de5b3189849ab1d384e49a1f1ae1 |
|
MD5 | d7368edf50c82edb1165e904476e6d5d |
|
BLAKE2b-256 | e849b38c098e4812f1bed9b92cd4dfa5556c5d785c14551d17114fec1b66adf6 |
Close
Hashes for molgenis_emx2_pyclient-8.223.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4aa931fdad4a4622d4584940bd16e04bda0df5af5e36da1586b1fbdeff05c8c |
|
MD5 | e1a1fa9b83636da5d4b52082d73ae570 |
|
BLAKE2b-256 | bb69264362b9948c69e9ce3a0b37f9c1422d250692e5c2db33ef2691ec18159e |