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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9a40a9348c792becc0a9468dd906dd59f11eb00c1a24396d356609770dd73e5 |
|
MD5 | 6678d652d3acf71925aa85e738b77365 |
|
BLAKE2b-256 | 36e61b9f269ba3383a34f36c2ce0df004068d241f8d15b65cbe786c3136b53c3 |
Close
Hashes for molgenis_emx2_pyclient-8.224.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 220495a6092c46eb05d47333946d97d64f778cb7ad6a379eb9ece14fc7340be4 |
|
MD5 | a8445a825a5668f17bce8c755f27d7f5 |
|
BLAKE2b-256 | 12932c433081bfc5583ecb8d7937228cc393fc416f1a3e30f7ef62b4b23f0939 |