Skip to main content

Exposes a common API in Python for the Macrobond Web and Client Data APIs

Project description

Macrobond Data API for Python

PyPI PyPI License: MIT Code style: black Continuous Integration

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

API reference

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

Contributing

We welcome community pull requests for bug fixes, enhancements, and documentation.

Getting support

Support options

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

macrobond_data_api-3.0.4.tar.gz (90.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

macrobond_data_api-3.0.4-py3-none-any.whl (142.6 kB view details)

Uploaded Python 3

File details

Details for the file macrobond_data_api-3.0.4.tar.gz.

File metadata

  • Download URL: macrobond_data_api-3.0.4.tar.gz
  • Upload date:
  • Size: 90.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for macrobond_data_api-3.0.4.tar.gz
Algorithm Hash digest
SHA256 98b944c7f1d698860a91b0f7fa74aab0f4f7ef949c97650d89fe248e6bcff6ea
MD5 f38d3fd10450f96a1eedc6b70726586c
BLAKE2b-256 ffa5d6cc64d10ebe93a76ae35727ddaf5089de7186c185ec1cc40439942e58f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for macrobond_data_api-3.0.4.tar.gz:

Publisher: python-publish.yml on macrobond/macrobond-data-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file macrobond_data_api-3.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for macrobond_data_api-3.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ea7766f8047d3b68559d9c6bb814dff8b3e504b1d00f0a86eda48a24b18b0a66
MD5 4891d42e3d9ec5257533299bf4c55c1c
BLAKE2b-256 9070b316a847f9a9940e230084a59fe84206dfbdadfbf4038c905cde00e082bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for macrobond_data_api-3.0.4-py3-none-any.whl:

Publisher: python-publish.yml on macrobond/macrobond-data-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page