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.223.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15e34553fc6a4dd5a851cae45a4797ca79f6ba13bce44b2ef88e55a2bc6ff6f9 |
|
MD5 | 3624b2b2d853bb49faa6d332d64ee6b1 |
|
BLAKE2b-256 | 69f83fb64cda78156bc3274326e9ef7623450f47b6fd65bf8895cddb88e47d4c |
Close
Hashes for molgenis_emx2_pyclient-8.223.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1164785cc79ade367955c2e1a6e8d507c34344dda8d63e4ad7a1476f9e50b489 |
|
MD5 | 6ef8ee536a54b80a121db0d375db04da |
|
BLAKE2b-256 | d68fa4f40b5d71aed3525aba85cfa6dc88bf3dc68a05418ce2ad64f47dd79d45 |