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.225.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ec52646c945f0ecd1c74c90e829a9322ff073a3eb8d0873847812548208e1f6 |
|
MD5 | 9412b40e14a576cf15671910903c72b4 |
|
BLAKE2b-256 | 110f5913bab3b148d06e2830123d0a1fd123ad7fbbf0311445140dc6a7fdb27f |
Close
Hashes for molgenis_emx2_pyclient-8.225.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40a9a01e5a251ecb1514a0f78abb9665ae075417a30cd35446f2353422e5d90e |
|
MD5 | 7624a57387e8430638acbf3a95f92f35 |
|
BLAKE2b-256 | 3bd0f34037f37ee1a3bdf474e6b676c7f7795ce2696f3ecdad37ee270c3f568c |