Skip to main content

python wrapper for nih reporter apis --> https://api.reporter.nih.gov/

Project description

Python application

pynih - a Python interface for the NIH's Reporter APIs

pynih is a Python library that provides easy access to the NIH's Reporter APIs.

Installation

pip install pynih

Example usage

This example can be executed in this example notebook.

from pynih import apis

# illustration of project api usage
search_criteria = {'appl_id':'9795459'}
include_fields = ['ApplId', 'ProjectTitle']
project_data = apis.query_project_api(include_fields=include_fields, search_criteria=search_criteria)

# illustration of publication api usage
search_criteria = {'pmid':'26657764'}
publication_data = apis.query_publication_api(search_criteria=search_criteria)

query_project_api input parameters

The project API query_project_api has the following input parameters:

search_criteria - query search criteria. Example: {"use_relevance": True, "fiscal_years": [2023],"include_active_projects": True}

include_fields - fields to include in return payload. Example: The output result payload would have only ten fields/columns: "include_fields": [ "ApplId","SubprojectId","FiscalYear","OrgName","OrgCity", "OrgState","OrgStateName","DeptType", "ProjectNum","OrgCountry" ]. Default value: all.

limit - number of entries to return (maximum 500 per query). Default value: 1.

offset - Starting counter for return items (projects). Default value: 0. Maximum allowable value: 14,999 or length of records.

See official documentation for further information on these inputs.

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

pynih-0.1.3.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

pynih-0.1.3-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file pynih-0.1.3.tar.gz.

File metadata

  • Download URL: pynih-0.1.3.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for pynih-0.1.3.tar.gz
Algorithm Hash digest
SHA256 b4c89dbc64941d6cd0454db0387e14bd854b6251dbc20ba17ab5bb9c2369e365
MD5 ed0874798fbbc183fcc21fa8c15d6b93
BLAKE2b-256 82154603a39411f0955f7ed72966c6cd4301642c5df70bb267f6a55a1f2b2d78

See more details on using hashes here.

File details

Details for the file pynih-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: pynih-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for pynih-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4b481c8f28bb28814b63039af8d678a85dc716a399dc79fe311c06179b4997d7
MD5 aed57eb0871dac8ccfd730054519e96d
BLAKE2b-256 3dd528b3cff8c40d2924234e23e50647b114a237968188ddc10df883a6e7d2fb

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