Skip to main content

DBnomics Web API Client

Project description

# DBnomics Python client

Access DBnomics time series from Python.

This project relies on [Python Pandas](https://pandas.pydata.org/).

## Tutorial

A tutorial is available as a [Jupyter notebook](./index.ipynb).

The "Binder" tool allows you to run it interactively in your browser. Click on [![Binder](https://mybinder.org/badge.svg)](https://mybinder.org/v2/gh/dbnomics/dbnomics-python-client/master?filepath=index.ipynb) 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

```bash
pip install dbnomics
```

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

## Development

To work on dbnomics-python-client source code:

```bash
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:

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

Or set the default API URL by [monkey-patching](https://en.wikipedia.org/wiki/Monkey_patch) the `dbnomics` module, like this:

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

## Tests

Run tests:

```bash
pytest tests/test_client.py

# Specify an alterate API URL
API_URL=http://localhost:5000 pytest tests/test_client.py
```


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.0.1.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

DBnomics-1.0.1-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: DBnomics-1.0.1.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/38.4.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6

File hashes

Hashes for DBnomics-1.0.1.tar.gz
Algorithm Hash digest
SHA256 27635ad3aaa2b90cc9a2a4ea65b63a15b70ad0b9de72e7b9655c1d61c221fe45
MD5 e6134c8876b7d5658c43fb8096545174
BLAKE2b-256 599f31d6658dcad4c2952af478b8267a2fb7a9fac234748521b4d38f557b6130

See more details on using hashes here.

File details

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

File metadata

  • Download URL: DBnomics-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/38.4.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6

File hashes

Hashes for DBnomics-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f60906f3745db95739965039f4b2a97bc18f647669e6168eaa18ea4b9fa28e05
MD5 8eeb442530cbfedeec6dd6ace2a81dc7
BLAKE2b-256 a02ca4e39d35bef2d5b29840d0c1e17e22efda3520baabcb72b8c872af7d460b

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