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
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 Distribution
Built Distribution
File details
Details for the file dbnomics-1.2.4.tar.gz
.
File metadata
- Download URL: dbnomics-1.2.4.tar.gz
- Upload date:
- Size: 45.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f658de2aa7e0b1b2a18c75cf77f1a196d1a33897984229e9c2210f3bdbeb1b5d |
|
MD5 | 907d88fd0ba39a94e80b4ddca1ea7831 |
|
BLAKE2b-256 | 9bb26cf49ca1d17ab62e40043ec56cfecce7add08b6314a4bb228663868c23fc |
File details
Details for the file dbnomics-1.2.4-py3-none-any.whl
.
File metadata
- Download URL: dbnomics-1.2.4-py3-none-any.whl
- Upload date:
- Size: 32.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f28c988df003a37bdd3b5c6e8ec2c16fe58da624f2822c8dc9b779b688ff07b9 |
|
MD5 | cd7e51b8e2a9c9c89086ee50efe7ee95 |
|
BLAKE2b-256 | afe5e152d130ee1dd1582ad460044991708095253f659c5a5131e27e40e526d6 |