Skip to main content

DBnomics Python Client

Project description

DBnomics Python client

Access DBnomics time series from Python.

This project relies on Python Pandas.

Tutorial

A tutorial is available as a Jupyter notebook.

The "Binder" tool allows you to run it interactively in your browser. Click on Binder then wait a couple of seconds. After loading a list of files should be displayed. Click on index.ipynb to open the tutorial notebook, where you'll be able to play with the DBnomics Python client.

Install

pip install dbnomics

See also: https://pypi-hypernode.com/project/DBnomics/

Development

To work on dbnomics-python-client source code:

git clone https://git.nomics.world/dbnomics/dbnomics-python-client.git
cd dbnomics-python-client
pip install --editable .

If you plan to use a local Web API, running on the port 5000, you'll need to use the api_base_url parameter of the fetch_* functions, like this:

dataframe = fetch_series(
    api_base_url='http://localhost:5000',
    provider_code='AMECO',
    dataset_code='ZUTN',
)

Or set the default API URL by monkey-patching the dbnomics module, like this:

import dbnomics
dbnomics.default_api_base_url = "http://localhost:5000"

Tests

Run tests:

pytest

# Specify an alterate API URL
API_URL=http://localhost:5000 pytest

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

DBnomics-1.1.0.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

DBnomics-1.1.0-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file DBnomics-1.1.0.tar.gz.

File metadata

  • Download URL: DBnomics-1.1.0.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4

File hashes

Hashes for DBnomics-1.1.0.tar.gz
Algorithm Hash digest
SHA256 bce444b0df1506307c9588e6a77955c11638bc751a066f9cfb265fbba82becbc
MD5 8e8af2d5b7cc7416624b3ecd2d2d3f93
BLAKE2b-256 2e1a14ec90c3e46f72224dc1d75ce8b0fd458dfdd0c7ce9253fde95c86e5e054

See more details on using hashes here.

File details

Details for the file DBnomics-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: DBnomics-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4

File hashes

Hashes for DBnomics-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 20302318443d4c9e51ac4aed3d9b83b687e2116afce8bf469c01ce5eb4119f1b
MD5 aabf86b5cea46e659aae5d7f9f710e90
BLAKE2b-256 9158d54b7e1547bed338a7eae4d0c2f82eeed7054484f8c20a949e02bfb9ec77

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