API wrapper around the NPPES API
Project description
NPyI
API wrapper around the NPPES API. https://npiregistry.cms.hhs.gov/registry/help-api
Install
pip install npyi
Examples
from npyi import npi
# sample search by first_name / last_name
response = npi.search(search_params={'first_name': 'Andrew', 'last_name': 'Jackson'})
print(response.keys()) # dict_keys(['result_count', 'results'])
first_entry = response['results'][0]
print(first_entry['basic']['first_name']) # ANDREW
print(first_entry['basic']['last_name']) # JACKSON
# sample search by NPI number
response = search(search_params={'number': '1417367343'})
print(response['result_count']) # 1
print(response['results'][0]['number']) # 1417367343
# sample search by city
response = search(search_params={'city': 'San Francisco'})
first_entry = response['results'][0]
print(len(first_entry['addresses'])) # 2 (different address purposes - LOCATION and MAILING)
print(first_entry['addresses'][0]['city']) # SAN FRANCISCO
# limit example
response = search(search_params={'first_name': 'Andrew', 'city': 'New York'}, limit=50)
print(response['result_count']) # 50
response = search(search_params={'first_name': 'Andrew', 'city': 'New York'}, limit=1000)
print(response['result_count']) # 200 (200 is the max)
response = search(search_params={'first_name': 'Andrew', 'city': 'New York'})
print(response['result_count']) # 10 (10 is the default)
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
npyi-0.1.1.tar.gz
(4.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
npyi-0.1.1-py3-none-any.whl
(6.1 kB
view details)
File details
Details for the file npyi-0.1.1.tar.gz.
File metadata
- Download URL: npyi-0.1.1.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
28e5d3f13386647a88ec626d6814382ca1b81b1273a4a348989d76dcb1824296
|
|
| MD5 |
114998b52e6d17909cd771195fdef954
|
|
| BLAKE2b-256 |
1ab3e1cb51f4b2596a11378a841cd18944fc3f4ea2f6d6bc3b6ac95bdf782744
|
File details
Details for the file npyi-0.1.1-py3-none-any.whl.
File metadata
- Download URL: npyi-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bdbbc9e26b7703dc2fc53b42f656469dd14f305c608e55a93c4ccace5ed01855
|
|
| MD5 |
56ade6a0afd3d47748ebe424abce3743
|
|
| BLAKE2b-256 |
fcbb76951e282b07e85ac6742bdb8d324aa3de1599028bc732ea25f69cc236ce
|