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.6+.

Using of system keyring

When using WebClient it is recommended to use the system keyring. This can be done easily by running the include script using this command:

python -c "from macrobond_data_api.util import *; save_credential_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-1.0.2.tar.gz (66.6 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-1.0.2-py3-none-any.whl (115.0 kB view details)

Uploaded Python 3

File details

Details for the file macrobond-data-api-1.0.2.tar.gz.

File metadata

  • Download URL: macrobond-data-api-1.0.2.tar.gz
  • Upload date:
  • Size: 66.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for macrobond-data-api-1.0.2.tar.gz
Algorithm Hash digest
SHA256 3d418aec8ffeb5a8dae67cfafb6146bb3fe4da7a7efd5136ba04d0c2e11bde58
MD5 7ebd726fb63b28a1f56ece71e9dfd263
BLAKE2b-256 8c735a68aaa0e23e279ef9156724164b4fe0bd2db02385bb153df892bc3f093d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for macrobond_data_api-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3bf9fb70a3e433937b338d9d6622026fa235c9ebfa8df04694bd0e0042f4476d
MD5 7a3508f37bc577d7b5f5b4042a712378
BLAKE2b-256 58115588bedd2c0cac53e4be3d385cbef73071e43bb233d70e4d92b9fdc3cf3c

See more details on using hashes here.

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