pytrials


Namepytrials JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://github.com/jvfe/pytrials
SummaryPython wrapper around the clinicaltrials.gov API
upload_time2024-05-01 14:52:33
maintainerNone
docs_urlNone
authorJoão Vitor F. Cavalcante
requires_python>=3.7
licenseBSD license
keywords pytrials clinical-trials clinical trials tabular text-mining text opendata
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ========
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/api/


* Free software: BSD license
* Documentation: https://pytrials.readthedocs.io.


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


=======
History
=======

0.1.0 (2020-07-06)
------------------

* First release on PyPI.

0.1.2 (2020-07-11)
------------------

* Minor fixes

0.2.0 (2021-04-24)
------------------

* Improved test suite
* Added get_study_count function

0.2.1 (2023-07-09)
------------------

* Add classic prefix to url - #10
* Raise error if API status is not ok - #11

0.3.0 (2023-07-09)
------------------

* Add min_rnk option to get_study_fields - #12


1.0.0 (2024-05-01)
------------------

Migrates to version 2.0 of the ClinicalTrials API

* Add support for the new API version
* Add support for the new API fields
* **Remove get_study_count function**
* Allow CSV format in full_studies

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jvfe/pytrials",
    "name": "pytrials",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "pytrials clinical-trials clinical trials tabular text-mining text opendata",
    "author": "Jo\u00e3o Vitor F. Cavalcante",
    "author_email": "jvfe@ufrn.edu.br",
    "download_url": "https://files.pythonhosted.org/packages/42/25/cfce60e8420ab506d06b8bbaff12969c75edf4b8c667b0a5701575970f39/pytrials-1.0.0.tar.gz",
    "platform": null,
    "description": "========\npytrials\n========\n\n\n.. image:: https://img.shields.io/pypi/v/pytrials.svg\n        :target: https://pypi.python.org/pypi/pytrials\n\n.. image:: https://github.com/jvfe/pytrials/workflows/pytest/badge.svg\n        :target: https://github.com/jvfe/pytrials/actions\n\n.. image:: https://img.shields.io/pypi/l/pytrials\n        :target: https://github.com/jvfe/pytrials/blob/master/LICENSE\n\n.. image:: https://readthedocs.org/projects/pytrials/badge/?version=latest\n        :target: https://pytrials.readthedocs.io/en/latest/?badge=latest\n        :alt: Documentation Status\n\n\n\n\nPython wrapper around the clinicaltrials.gov API.\nDocumentation for the API can be found here: https://clinicaltrials.gov/api/\n\n\n* Free software: BSD license\n* Documentation: https://pytrials.readthedocs.io.\n\n\nTutorial\n--------\nTo install::\n\n    $ pip install pytrials\n\nBasic Usage\n^^^^^^^^^^^\n::\n\n    from pytrials.client import ClinicalTrials\n\n    ct = ClinicalTrials()\n\n    # Get 50 full studies related to Coronavirus and COVID in csv format.\n    ct.get_full_studies(search_expr=\"Coronavirus+COVID\", max_studies=50)\n\n    # Get the NCTId, Condition and Brief title fields from 1000 studies related to Coronavirus and Covid, in csv format.\n    corona_fields = ct.get_study_fields(\n        search_expr=\"Coronavirus+COVID\",\n        fields=[\"NCT Number\", \"Conditions\", \"Study Title\"],\n        max_studies=1000,\n        fmt=\"csv\",\n    )\n\n    # Read the csv data in Pandas\n    import pandas as pd\n\n    pd.DataFrame.from_records(corona_fields[1:], columns=corona_fields[0])\n\nCredits\n-------\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n\n\n=======\nHistory\n=======\n\n0.1.0 (2020-07-06)\n------------------\n\n* First release on PyPI.\n\n0.1.2 (2020-07-11)\n------------------\n\n* Minor fixes\n\n0.2.0 (2021-04-24)\n------------------\n\n* Improved test suite\n* Added get_study_count function\n\n0.2.1 (2023-07-09)\n------------------\n\n* Add classic prefix to url - #10\n* Raise error if API status is not ok - #11\n\n0.3.0 (2023-07-09)\n------------------\n\n* Add min_rnk option to get_study_fields - #12\n\n\n1.0.0 (2024-05-01)\n------------------\n\nMigrates to version 2.0 of the ClinicalTrials API\n\n* Add support for the new API version\n* Add support for the new API fields\n* **Remove get_study_count function**\n* Allow CSV format in full_studies\n",
    "bugtrack_url": null,
    "license": "BSD license",
    "summary": "Python wrapper around the clinicaltrials.gov API",
    "version": "1.0.0",
    "project_urls": {
        "Homepage": "https://github.com/jvfe/pytrials"
    },
    "split_keywords": [
        "pytrials",
        "clinical-trials",
        "clinical",
        "trials",
        "tabular",
        "text-mining",
        "text",
        "opendata"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7da44fb8d2cec56a2e8a304c62943016c8a17301523510a3225276c4e50dc1e5",
                "md5": "96f118a58d458c024b36f1011108530b",
                "sha256": "0bc23462c6840a7229b6e8b1ae48ade50ded2621687a64d11302699f15d299ae"
            },
            "downloads": -1,
            "filename": "pytrials-1.0.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "96f118a58d458c024b36f1011108530b",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.7",
            "size": 6995,
            "upload_time": "2024-05-01T14:52:32",
            "upload_time_iso_8601": "2024-05-01T14:52:32.332720Z",
            "url": "https://files.pythonhosted.org/packages/7d/a4/4fb8d2cec56a2e8a304c62943016c8a17301523510a3225276c4e50dc1e5/pytrials-1.0.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4225cfce60e8420ab506d06b8bbaff12969c75edf4b8c667b0a5701575970f39",
                "md5": "8f7556773638e3204e9a978b9f2e6435",
                "sha256": "15caa3a8d2485c12808aba775ea45c14836772c6fa9c5f6b87e400a829eb7b0e"
            },
            "downloads": -1,
            "filename": "pytrials-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "8f7556773638e3204e9a978b9f2e6435",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 14463,
            "upload_time": "2024-05-01T14:52:33",
            "upload_time_iso_8601": "2024-05-01T14:52:33.600699Z",
            "url": "https://files.pythonhosted.org/packages/42/25/cfce60e8420ab506d06b8bbaff12969c75edf4b8c667b0a5701575970f39/pytrials-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-01 14:52:33",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jvfe",
    "github_project": "pytrials",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pytrials"
}
        
Elapsed time: 0.27938s