Skip to main content

DBnomics Python client

Project description

DBnomics Python client

Download time series from DBnomics and access it as a Pandas DataFrame.

This package is compatible with Python >= 3.8. (TODO vermin)

Documentation

Quick start

Tutorial

A tutorial showing how to download series as a DataFrame and plot them is available as a notebook.

Install

pip install dbnomics

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

Configuration

Use with a proxy

This Python package uses requests, which is able to work with a proxy (HTTP/HTTPS, SOCKS). For more information, please check its documentation.

Customize the API base URL

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:

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

Or globally change the default API URL used by the dbnomics module, like this:

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

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 -r requirements.txt
pip install -r requirements-dev.txt
pip install -e .

Open the demo notebook

Install jupyter if not already done, in a virtualenv:

pip install jupyter
jupyter notebook index.ipynb

Tests

pip install -r requirements.txt
pip install -r requirements-test.txt
pip install -e .

pytest

# Specify an alternate 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.2.5.tar.gz (46.1 kB view details)

Uploaded Source

Built Distribution

dbnomics-1.2.5-py3-none-any.whl (32.1 kB view details)

Uploaded Python 3

File details

Details for the file dbnomics-1.2.5.tar.gz.

File metadata

  • Download URL: dbnomics-1.2.5.tar.gz
  • Upload date:
  • Size: 46.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for dbnomics-1.2.5.tar.gz
Algorithm Hash digest
SHA256 78441cd607f329392f325119305a186c84f112bf790c9b1ded046902f198ac61
MD5 75b54b4550ffd652fb9f374f720d3a25
BLAKE2b-256 e12bb451ae3e597a1310bc47c5b19d3e1e2b67b237e2efc985ac032dbe20bba3

See more details on using hashes here.

File details

Details for the file dbnomics-1.2.5-py3-none-any.whl.

File metadata

  • Download URL: dbnomics-1.2.5-py3-none-any.whl
  • Upload date:
  • Size: 32.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for dbnomics-1.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 48b8b58770814ffa0ce36500258edc9f57c41c29c8fff155170975546045a2f7
MD5 bebc2046c7ec877765baf049c2b9a9f2
BLAKE2b-256 02a20bf25dd2d88d110869546b0bcc4dc6a2b0c0bde4d53b34af7e9b878f60bf

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