Python wrapper for DDH Open API
Project description
PyNADA
A Python client for World Bank Data Catalog
Setup
Public users:
pip install -U wbddh
DDH administrators:
pip install -U wbddh[admin]
Usage
WBDDH handles HTTP requests and manages MSAL sessions.
Admin users first have to create a session to further run other admin functions:
import wbddh
session = wbddh.create_session(name='default_ddh_session', params=None, autoCopy=True, verify=None)
Users can send a simple GET/POST request:
wbddh.get(endpoint, params=None, headers=None, session=None)
wbddh.post(endpoint, params=None, json=None, headers=None, session=None)
Alternatively, users can repeat sending a GET/POST request until it succeeds or it tries {num_try} times:
wbddh.try_get(endpoint, params=None, headers=None, session=None, num_try=3, interval=300)
wbddh.try_post(endpoint, params=None, json=None, headers=None, session=None, num_try=3, interval=300)
Examples
Jupyter Notebooks under examples folder show basic use cases utilizing wbddh.
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
wbddh-0.0.17-py3-none-any.whl
(10.7 kB
view hashes)