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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c20ce935c20be2416a06c66d8ad1ff857978eb20f306ea57439ca134d4ded10c |
|
MD5 | 6f2ff6137ce98ebedb59d9b99ce47b10 |
|
BLAKE2b-256 | 923aecf81560ac3b81b3df2f3f3f5f23821dd26b72a8f4ac9230e5b1fa0fd7f0 |
Close
Hashes for molgenis_emx2_pyclient-8.224.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea9c7fc33b712e1e119019fbb8f2bc533b9a82736c78daefaf465a590f4c0374 |
|
MD5 | 2156e05b5c6e6c7a7622e9f5ae19a314 |
|
BLAKE2b-256 | 41ddbf5f5f5f8e4943e5f5ebf8eae8d528cc719f3e27025b0fff86acb0d45a35 |