A Python wrapper for the ClinicalTrials.gov API (v2) with full pagination support and a few extra features
Project description
PyCT 🧬 (v0.1.0)
About 💭
PyCT is a python wrapper for the ClinicalTrials.org API (v2). Although a python-wrapper already exists for this API, it doesn't feature full pagination support, thus is unable to give you all the studies that match the search-terms. Moreover, PyCT enables you to search with more accuracy by specifying the conditions and the interventions separately
Basic usage 🪛
Get started with:
from pyct import ClinicalTrials
ct = ClinicalTrials()
Checking API info:
print(ct)
Fetching studies:
# Specify each field
df = ct.get_studies(
condition="Dementia",
intervention="Non-pharmacological",
status="RECRUITING"
)
# Alternatively you can get one specific study using the NCT number
study = ct.get_study("NCT06210035")
and finally you can export with the following options below:
ct.to_csv(df, "alzheimer_trials.csv") # CSV
ct.to_excel(df, "alzheimer_trials.xlsx") # Excel
ct.to_json(df, "alzheimer_trials.json") # JSON
It will automatically give a name if you don't specify
Installation 📦
pip install pyct
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 pycli_trials-0.1.0.tar.gz.
File metadata
- Download URL: pycli_trials-0.1.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a010637606e85d99451bd4fe4f0d4dc895c558c5365b6451b08276721d9bdc1
|
|
| MD5 |
1ef29d89bba2b099a1319f8699546c3d
|
|
| BLAKE2b-256 |
3f3c24fa88a29a5e5c8e3be6cbd61101a6a02dd8e3895ea8fb3a6dd6823a755c
|
File details
Details for the file pycli_trials-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pycli_trials-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19ab49a395611a7c29b4127187ba0fe1154ddba26db19d592c18bed1a596dfe4
|
|
| MD5 |
a9ef9c538760eee081327d60b9204f0d
|
|
| BLAKE2b-256 |
01b41d6a33f5570ee11c4384d8b1399a85d7ab47991b5ce4cd4160bfe8d517d4
|