GitXplorerGitXplorer
j

pytrials

public
48 stars
18 forks
6 issues

Commits

List of commits on branch master.
Verified
fb928aadbd0b4aeee665ae8c09477910db7b9d55

docs: Change API url in README

jjvfe committed 9 months ago
Unverified
8f000327441f6a7a0bd645764b612fc445f13b71

docs: Add readthedocs config

jjvfe committed 9 months ago
Unverified
8bdb786dd2d4b0c640628338fb923919e66607b6

chore: Update history.rst

jjvfe committed 9 months ago
Unverified
1060c846493622ca576bdf8a196f3db29ae923ce

docs: Update docs conf

jjvfe committed 9 months ago
Unverified
e98c93870c4a514e799b37694ae2735a31d55ad9

test: Change test to expect new API results format

jjvfe committed 9 months ago
Unverified
9b8d5b2a898110d70634690972213ed93b550056

refactor: Add format param to full studies

jjvfe committed 9 months ago

README

The README file for this repository.

======== pytrials

.. image:: https://img.shields.io/pypi/v/pytrials.svg :target: https://pypi.python.org/pypi/pytrials

.. image:: https://github.com/jvfe/pytrials/workflows/pytest/badge.svg :target: https://github.com/jvfe/pytrials/actions

.. image:: https://img.shields.io/pypi/l/pytrials :target: https://github.com/jvfe/pytrials/blob/master/LICENSE

.. image:: https://readthedocs.org/projects/pytrials/badge/?version=latest :target: https://pytrials.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status

Python wrapper around the clinicaltrials.gov API. Documentation for the API can be found here: https://clinicaltrials.gov/data-api/about-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.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter .. _audreyr/cookiecutter-pypackage: https://github.com/audreyr/cookiecutter-pypackage