Skip to content

jvfe/pytrials

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6a7e6be · May 1, 2024

History

59 Commits
Apr 29, 2021
May 1, 2024
May 1, 2024
May 1, 2024
Jul 6, 2020
Jul 6, 2020
Jul 9, 2023
Apr 29, 2021
May 1, 2024
Jul 6, 2020
May 1, 2024
Apr 29, 2021
May 1, 2024
Mar 20, 2024
May 1, 2024
May 1, 2024

Repository files navigation

pytrials

https://img.shields.io/pypi/l/pytrials Documentation Status

Python wrapper around the clinicaltrials.gov API. Documentation for the API can be found here: https://clinicaltrials.gov/api/

Tutorial

To install:

$ pip install pytrials

Basic Usage

from pytrials.client import ClinicalTrials

ct = ClinicalTrials()

# Get 50 full studies related to Coronavirus and COVID in csv format.
ct.get_full_studies(search_expr="Coronavirus+COVID", max_studies=50)

# Get the NCTId, Condition and Brief title fields from 1000 studies related to Coronavirus and Covid, in csv format.
corona_fields = ct.get_study_fields(
    search_expr="Coronavirus+COVID",
    fields=["NCT Number", "Conditions", "Study Title"],
    max_studies=1000,
    fmt="csv",
)

# Read the csv data in Pandas
import pandas as pd

pd.DataFrame.from_records(corona_fields[1:], columns=corona_fields[0])

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.