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.224.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffe716abfcf5f8264266226dfa05226ed5a8366eebca5268d4bb47fb33ce9c85 |
|
MD5 | 65ac91eda3279cd38a650a53b8ee3848 |
|
BLAKE2b-256 | 421688628316e5ffd9d9ed9ed6581c84d17aa8c8b4be98dd6a0bd5a7edbd2946 |
Close
Hashes for molgenis_emx2_pyclient-8.224.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43f20fd1a11692c92fd54a96d57da095fc837752dd4f8a955cd17f6f8349a948 |
|
MD5 | 6262c08dd70eda0d924b5a49730eb98d |
|
BLAKE2b-256 | af8c081316a5f29804e31d69154e3607b5a128d3981c3cf3d3dec19c3988a554 |