medconb-client is a Python client for the MedConB API.
Project description
MedConB Client
This library provides a Python interface to the MedConB API. With this you can easily retrieve whole codelists from MedConB.
Installation
You can install (and update) it into your python environment by running:
pip install --force-reinstall -U medconb-client
Usage
To use it, you need to create a client:
from medconb_client import Client
endpoint = "https://api.medconb.example.com/graphql/"
token = get_token()
client = Client(endpoint, token)
with that client you can now interact with the API.
Get a codelist by name
codelist = client.get_codelist_by_name(
codelist_name="Coronary Artery Disease",
codelist_collection_name="Pacific AF [Sample]",
)
codelist = client.get_codelist_by_name(
codelist_name="Coronary Artery Disease",
phenotype_collection_name="[Sample] PACIFIC AF ECA",
phenotype_name="Coronary Artery Disease",
)
Get a codelist by id
codelist = client.get_codelist(
codelist_id="9c4ad312-3008-4d95-9b16-6f9b21ec1ad9"
)
Retrieve collections in your workspace
workspace_info = client.get_workspace()
collection_info = next(
collection
for collection in workspace_info.collections
if collection.itemType == "Codelist"
)
codelist = client.get_codelist(collection_info.items[0].id)
For more information, also see our Examples Page.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file medconb_client-0.0.4.tar.gz.
File metadata
- Download URL: medconb_client-0.0.4.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0c217b98fbb8c3cdfa59dc71d534162ebe7f4363385896d46b470839f421d61
|
|
| MD5 |
f914d74bb6006db3dbe3b2d062668703
|
|
| BLAKE2b-256 |
c9506619b8e62bcd35bb89e82f4d8f9248e5f9c723e44ed7211ffd6437df6b66
|
Provenance
The following attestation bundles were made for medconb_client-0.0.4.tar.gz:
Publisher:
pypi.yml on Bayer-Group/medconb-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
medconb_client-0.0.4.tar.gz -
Subject digest:
d0c217b98fbb8c3cdfa59dc71d534162ebe7f4363385896d46b470839f421d61 - Sigstore transparency entry: 188289097
- Sigstore integration time:
-
Permalink:
Bayer-Group/medconb-client@4dc766bef2abc1d8822b4479ac3b8c9f2a7af431 -
Branch / Tag:
refs/tags/v0.0.4 - Owner: https://github.com/Bayer-Group
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@4dc766bef2abc1d8822b4479ac3b8c9f2a7af431 -
Trigger Event:
release
-
Statement type:
File details
Details for the file medconb_client-0.0.4-py3-none-any.whl.
File metadata
- Download URL: medconb_client-0.0.4-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70a7f703e7443586af675ad62741ccd19726faaadb14467d1fc6cb11b11cacd3
|
|
| MD5 |
e0c98ae324d355e15fa329c88ef8f4eb
|
|
| BLAKE2b-256 |
0cddfbeea0c37a2db37db384865de903f4391e09030e2f994167db0d3d06d85e
|
Provenance
The following attestation bundles were made for medconb_client-0.0.4-py3-none-any.whl:
Publisher:
pypi.yml on Bayer-Group/medconb-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
medconb_client-0.0.4-py3-none-any.whl -
Subject digest:
70a7f703e7443586af675ad62741ccd19726faaadb14467d1fc6cb11b11cacd3 - Sigstore transparency entry: 188289103
- Sigstore integration time:
-
Permalink:
Bayer-Group/medconb-client@4dc766bef2abc1d8822b4479ac3b8c9f2a7af431 -
Branch / Tag:
refs/tags/v0.0.4 - Owner: https://github.com/Bayer-Group
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@4dc766bef2abc1d8822b4479ac3b8c9f2a7af431 -
Trigger Event:
release
-
Statement type: