Skip to main content

Python wrapper for the Clincal Trials API.

Project description

A Python API wrapper for the [ClincalTrials.gov API](http://clinicaltrials.gov/ct2/info/linking).

Documentation for [ClinicalTrials.gov can be found here.](http://clinicaltrials.gov/ct2/info/linking)

Usage

The Trials class only has two methods – search and download. The same information from search is returned to the download method in ZIP file format.

>>> from clinical_trials import Trials
>>> t = Trials()
>>> t.search("alzheimer's disease")
>>> t.search('diabetes', 'cond')
>>> t.search('diabetes', 'condition')
>>> t.search(condition='diabetes')
>>> # Specify the number of trials turned.
... t.search(intervention='Fluoxetine', count=200)
>>> # Find trials no longer recruiting.
... t.search('lyme disease', recruiting='closed')
>>> # If you want plain XML returned back.
... t.search(sponsor='NHLBI', output_format=None)
>>> # You can also find trials by location -- up to 3 states or countries.
... t.search('cancer', state='TX')
>>> t.search('diabetes', state1='TX', state2='NY', state3='CA')
>>> t.search(condition='lyme disease', country1='US', country2='CA')
>>> # And you can download a ZIP file with the data.
... zip_file = t.download('cancer', count=500)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clinical_trials-1.0.tar.gz (3.6 kB view details)

Uploaded Source

File details

Details for the file clinical_trials-1.0.tar.gz.

File metadata

File hashes

Hashes for clinical_trials-1.0.tar.gz
Algorithm Hash digest
SHA256 b5ebf0481b3e4c28dc5b4cf09eab003cfeecdb72d9f5ef5bcebd22463871fdca
MD5 88f6301fa13a67b6fd06942edd39ebc1
BLAKE2b-256 0ed7242be7b2f08031e7e1123221074d03dc890f3ba8752f902e83fb589970cd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page