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.220.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7aaac405b223b837e54d61a1e95d45aeaab561e1b32c8cb3212f47577002410a |
|
MD5 | 1117ca93c88126c30e69202e292d7544 |
|
BLAKE2b-256 | 76d487696a2c3f8c18dca5646c7f2dcf8f48429095fa19e96a004c18a010ea6c |
Close
Hashes for molgenis_emx2_pyclient-8.220.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0a45c4a6ce9e7327cb7660af3905e10f5a764e280e6abe792c06dc738989847 |
|
MD5 | d9c68524263ab36b09eb13a5f74875a8 |
|
BLAKE2b-256 | bff35a8da52018e12b85c80acc31a88e67f141819f7683972f7360f7d7ad73b8 |