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.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e596ce37f9c4a7d39e1caa80bb49719d65d779ec5ca4002eeb5b77458c07f0ec |
|
MD5 | 6391ade6814788ef80258c9d2c182473 |
|
BLAKE2b-256 | 03613385b8b088f94b331b8bf3f6aab1c19f8470d529a4d636d3a1dfa585e0a8 |
Close
Hashes for molgenis_emx2_pyclient-8.224.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6adbab420158f3354be772185e0b578ee77f188b1aacd42e107a52d635b495ea |
|
MD5 | 8f2a9b9bd0c82e9c439cb6ba4e3b151a |
|
BLAKE2b-256 | 6bb294b3eae7d7eeea4aa87c6a270bfe70a00da6747738dab9006b54c770227e |