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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 533e6ae878af46d0712305bf6dcbc8807704e00aa9cb67ca75b47ad6eb86bc93 |
|
MD5 | a3c818435022c1016faeeded7f131fd6 |
|
BLAKE2b-256 | 8dd00f1d83c8b4ce2e8ce363d71fcf73d53837ae1fcfce859a2bee5034c470f0 |
Close
Hashes for molgenis_emx2_pyclient-8.218.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62f3570cd140b3e585998ffe29c8b6fd270d155b62d756dd1cb026c25607153a |
|
MD5 | a7ce1ed1ab713ef2c1fc80614d8bea94 |
|
BLAKE2b-256 | d6da6f2a191105ab4e06771c3ce422e7c8242d3f05c1f8b915c35711c8c8c16d |