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.222.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 046956f0ac10fedc4c78dab4cbd6b10ac3e271269f1a0d3bd34370ea63f393b7 |
|
MD5 | c183f1ecaddd090b862107ff69fd2e91 |
|
BLAKE2b-256 | 6b5cd4194b9aa3850b5247cb0c20ceff0690dcda9652a72cb9a23b2d73462e39 |
Close
Hashes for molgenis_emx2_pyclient-8.222.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19992c71c92b97046e9e5974a42d8159a3b3d0e3e79bbaf7cfeef0a0505cd2bd |
|
MD5 | adea5c07e0d46e613cc3a139b36b151d |
|
BLAKE2b-256 | c12747fa9d6a3976df61954aecb261ca9c03d42a1ab8bd9fd58aec73910dd891 |