Exposes a common API in Python for the Macrobond Web and Client Data APIs
Project description
Macrobond Data API for Python
The Macrobond Data API for Python is used to access the world’s most extensive macroeconomic, aggregate financial and sector database provided by Macrobond. Exposes a common API in Python for the Macrobond Web and Client data APIs
You have to be a licensed user and have a Data+ or data feed user account in order to use the API.
Examples in Jupyter Notebooks to help you get started
Basic usage
import macrobond_data_api as mb_api
usgdp = mb_api.get_one_series("usgdp")
Advanced usage
# web
from macrobond_data_api.web import WebClient
with WebClient('client id', 'client secret') as api:
series = api.get_one_series('usgdp')
# com
from macrobond_data_api.com import ComClient
with ComClient() as api:
series = api.get_one_series('usgdp')
Features
The Macrobond Data API for Python uses either the Macrobond Web REST API or the Macrobond Client data API to obtain time series with values and metadata. The API consists of a set of functions in common between the underlying APIs as well as specialized functions unique to each implementation.
Installing macrobond-data-api and Supported Versions
Macrobond Data API for Python is available on PyPI:
python -m pip install macrobond-data-api
Macrobond Data API for Python officially supports Python 3.8+.
Using of system keyring for credentials
[!NOTE] If u are using a proxy see "Using of system keyring for http proxy" first.
When using WebClient it is recommended to use the system keyring to store the API credentials. This can be done easily by running the include script using this command:
python -c "from macrobond_data_api.util import *; save_credentials_to_keyring()"
Using of system keyring for http proxy
For users operating behind an HTTP proxy, it is advisable to utilize the system keyring to store proxy settings and credentials. This can be conveniently accomplished by executing the included script with the following command:
python -c "from macrobond_data_api.util import *; save_proxy_to_keyring()"
Supported keyrings
- macOS Keychain
- Freedesktop Secret Service supports many DE including GNOME (requires secretstorage)
- KDE4 & KDE5 KWallet (requires dbus)
- Windows Credential Locker
Contributing
We welcome community pull requests for bug fixes, enhancements, and documentation.
Getting support
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 macrobond_data_api-3.0.0.tar.gz
.
File metadata
- Download URL: macrobond_data_api-3.0.0.tar.gz
- Upload date:
- Size: 86.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0ff789b92552f24fa6ca6f2f34c618279df805a21c72cab0975379c552b8781 |
|
MD5 | 69d71947cc5430ecc8bb0e64d2d1f58d |
|
BLAKE2b-256 | 3ed3ffae96b3bbbca8d8ca19f5a709706116e0be9e4d61d487b0d9d4cf0374be |
File details
Details for the file macrobond_data_api-3.0.0-py3-none-any.whl
.
File metadata
- Download URL: macrobond_data_api-3.0.0-py3-none-any.whl
- Upload date:
- Size: 136.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10ac962d0ffde9532fe92da6451ed4ffccfb547c17f6502ee2a1daa6abad2335 |
|
MD5 | 6c90222c5f319b9abe45cebda228e9dc |
|
BLAKE2b-256 | f2b157fa3700d1eeb4685bef9669ecd8dbe0d62116122370e18226229d34579a |