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.10+.
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
Release files for macrobond-data-api 3.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| macrobond_data_api-3.0.4.tar.gz | 90.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| macrobond_data_api-3.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 232.9 kB
Release files / macrobond_data_api-3.0.4.tar.gz
| Download URL | macrobond_data_api-3.0.4.tar.gz |
|---|---|
| Size | 90.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
98b944c7f1d698860a91b0f7fa74aab0f4f7ef949c97650d89fe248e6bcff6ea
|
|
BLAKE2b-256 checksum How to use checksums |
ffa5d6cc64d10ebe93a76ae35727ddaf5089de7186c185ec1cc40439942e58f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2025.
Transparency logRelease files / macrobond_data_api-3.0.4-py3-none-any.whl
| Download URL | macrobond_data_api-3.0.4-py3-none-any.whl |
|---|---|
| Size | 142.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ea7766f8047d3b68559d9c6bb814dff8b3e504b1d00f0a86eda48a24b18b0a66
|
|
BLAKE2b-256 checksum How to use checksums |
9070b316a847f9a9940e230084a59fe84206dfbdadfbf4038c905cde00e082bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2025.
Transparency log