Interact with US NLM Daily Med API using Python.
Project description
|License MIT| | |Build Status| | |Coveralls Status| | |Codecov Status| | |Code Climate|
================
Python Daily Med
================
This library interacts with the United States National Library of Medicine's Daily
Med API.
Installation
============
* Install Python requirements ``pip install -r ./requirements``
Setup
=====
*
Usage
=====
* `Read The API Documentation <https://laslabs.github.io/python-daily-med>`_
Import and Instantiate
----------------------
Importing an instantiating the Daily Med object:
.. code-block:: python
from daily_med import DailyMed
dm = DailyMed()
Structured Product Label Metadata
---------------------------------
`get_spls` mirrors the `/spls` interface as documented `here
<https://dailymed.nlm.nih.gov/dailymed/webservices-help/v2/spls_api.cfm`_.
To get an iterator of all SPLs:
.. code-block:: python
spl_metas = dm.get_spls()
You can also perform an SPL search using any of the standard query parameters:
.. code-block:: python
simvastatin_metas = dm.get_spls(drug_name='Simvastatin')
Structured Product Label Documents
----------------------------------
Once you have a `set_id` for an SPL, you can get its document:
.. code-block:: python
spl_document = dm.get_spl('0be2e371-1f05-48d7-8f2e-f2024f3305f3')
An SPL Document is basically just a dictionary representing the parsed XML
document.
Known Issues / Road Map
=======================
- Add a more opinionated object for SPLDocument
Credits
=======
Images
------
* LasLabs: `Icon <https://repo.laslabs.com/projects/TEM/repos/odoo-module_template/browse/module_name/static/description/icon.svg?raw>`_.
Contributors
------------
* Dave Lasley <dave@laslabs.com>
Maintainer
----------
.. image:: https://laslabs.com/logo.png
:alt: LasLabs Inc.
:target: https://laslabs.com
This module is maintained by LasLabs Inc.
.. |Build Status| image:: https://api.travis-ci.org/LasLabs/python-daily-med.svg?branch=master
:target: https://travis-ci.org/LasLabs/python-daily-med
.. |Coveralls Status| image:: https://coveralls.io/repos/LasLabs/python-daily-med/badge.svg?branch=master
:target: https://coveralls.io/r/LasLabs/python-daily-med?branch=master
.. |Codecov Status| image:: https://codecov.io/gh/LasLabs/python-daily-med/branch/master/graph/badge.svg
:target: https://codecov.io/gh/LasLabs/python-daily-med
.. |Code Climate| image:: https://codeclimate.com/github/LasLabs/python-daily-med/badges/gpa.svg
:target: https://codeclimate.com/github/LasLabs/python-daily-med
.. |License MIT| image:: https://img.shields.io/badge/license-MIT-blue.svg
:target: https://opensource.org/licenses/MIT
:alt: License: AGPL-3
================
Python Daily Med
================
This library interacts with the United States National Library of Medicine's Daily
Med API.
Installation
============
* Install Python requirements ``pip install -r ./requirements``
Setup
=====
*
Usage
=====
* `Read The API Documentation <https://laslabs.github.io/python-daily-med>`_
Import and Instantiate
----------------------
Importing an instantiating the Daily Med object:
.. code-block:: python
from daily_med import DailyMed
dm = DailyMed()
Structured Product Label Metadata
---------------------------------
`get_spls` mirrors the `/spls` interface as documented `here
<https://dailymed.nlm.nih.gov/dailymed/webservices-help/v2/spls_api.cfm`_.
To get an iterator of all SPLs:
.. code-block:: python
spl_metas = dm.get_spls()
You can also perform an SPL search using any of the standard query parameters:
.. code-block:: python
simvastatin_metas = dm.get_spls(drug_name='Simvastatin')
Structured Product Label Documents
----------------------------------
Once you have a `set_id` for an SPL, you can get its document:
.. code-block:: python
spl_document = dm.get_spl('0be2e371-1f05-48d7-8f2e-f2024f3305f3')
An SPL Document is basically just a dictionary representing the parsed XML
document.
Known Issues / Road Map
=======================
- Add a more opinionated object for SPLDocument
Credits
=======
Images
------
* LasLabs: `Icon <https://repo.laslabs.com/projects/TEM/repos/odoo-module_template/browse/module_name/static/description/icon.svg?raw>`_.
Contributors
------------
* Dave Lasley <dave@laslabs.com>
Maintainer
----------
.. image:: https://laslabs.com/logo.png
:alt: LasLabs Inc.
:target: https://laslabs.com
This module is maintained by LasLabs Inc.
.. |Build Status| image:: https://api.travis-ci.org/LasLabs/python-daily-med.svg?branch=master
:target: https://travis-ci.org/LasLabs/python-daily-med
.. |Coveralls Status| image:: https://coveralls.io/repos/LasLabs/python-daily-med/badge.svg?branch=master
:target: https://coveralls.io/r/LasLabs/python-daily-med?branch=master
.. |Codecov Status| image:: https://codecov.io/gh/LasLabs/python-daily-med/branch/master/graph/badge.svg
:target: https://codecov.io/gh/LasLabs/python-daily-med
.. |Code Climate| image:: https://codeclimate.com/github/LasLabs/python-daily-med/badges/gpa.svg
:target: https://codeclimate.com/github/LasLabs/python-daily-med
.. |License MIT| image:: https://img.shields.io/badge/license-MIT-blue.svg
:target: https://opensource.org/licenses/MIT
:alt: License: AGPL-3
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
python-daily-med-0.1.0b50.tar.gz
(313.1 kB
view hashes)
Built Distributions
Close
Hashes for python-daily-med-0.1.0b50.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7acf5c9539ab5a4aa4c7ec846f11501b19390049843ec95771318cfe3577f398 |
|
MD5 | 4d24c44e4b2d214711f7efd300b1f4d2 |
|
BLAKE2b-256 | 72c63e1c08d34ebd1b8f90bc7cc655807fca6b8d3f7c6f52a8e124cc9f5ee52a |
Close
Hashes for python_daily_med-0.1.0b50-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0014c966092692077f505f67a35ab1ee60a8b1820d9e2a586cd2c49d15052838 |
|
MD5 | 36c4949c13e99782ded7f76eff7ce1c7 |
|
BLAKE2b-256 | f3f9dffcc82e4cf5e7deec09d10ec42b04e2d3689c9585ffb7bc1ca2feb8bade |
Close
Hashes for python_daily_med-0.1.0b50-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58dfa054968fa23de065837db66ed1c81ce9af2e9b9774e8b9c23eb3120ee367 |
|
MD5 | be9b938452bd627c9edb6588c54023cf |
|
BLAKE2b-256 | 00eb465daf1041d890f2483b5279acc99a34d6c80e04bcfdd76e99a5c7dbbd23 |