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.218.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc7adba7bcb82e34e40574d86f65654e950a0369a962a3a8678592607b04905f |
|
MD5 | 1f43c001d874874bc89797b30bbbdb20 |
|
BLAKE2b-256 | 00ba7dfc6ee67550e208aac62e14bb7394e66c672adc98a9dfdb398792ebcfbb |
Close
Hashes for molgenis_emx2_pyclient-8.218.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd216d6f09d3c6e762720350a78e2037fa64927e3ba2c0c30949de2827be1794 |
|
MD5 | 985496e10e5dc086b58cda363c7fcac4 |
|
BLAKE2b-256 | ccb3ea6714d4516b1fabf8d44f975b7ee967fd2c3e91ff208cd146df98ec2a7e |