Skip to main content

A Python connector for the BCRA (Banco Central de la República Argentina) APIs

Project description

BCRA API Connector

PyPI version Python Versions Documentation Status Coverage License: MIT Tests Contributor Covenant

A Python connector for the BCRA (Banco Central de la República Argentina) APIs, covering Principal Variables/Monetary Statistics, Cheques, Exchange Rate Statistics, and Central de Deudores (Debtor Registry).

Features

  • Comprehensive Data Access: Fetch Principal Variables, Monetary Statistics, Checks information, Exchange Rates, and Debtor Registry data.
  • Central de Deudores: Query debtor information, historical debts, and rejected checks by CUIT/CUIL.
  • DataFrame Support: Convert API responses to pandas DataFrames with to_dataframe() methods.
  • Historical Data: Easily retrieve and analyze historical time series for any variable.
  • Robustness: Built-in retry logic with exponential backoff and safe failure handling.
  • Developer Friendly:
    • Full Type Hinting for better IDE support.
    • Bilingual context (Spanish API / English Wrapper).
    • Detailed debug logging.
  • Configurable: Options for SSL verification, retries, and timeouts.

Documentation

Full documentation, including installation instructions, usage examples, and API reference, is available at:

Installation

pip install bcra-connector

# With pandas support for DataFrame conversion
pip install bcra-connector[pandas]

For detailed installation instructions and requirements, see our Installation Guide.

Quick Start

Get up and running in seconds:

from bcra_connector import BCRAConnector

# Initialize the connector
connector = BCRAConnector()

# 1. List principal variables published by BCRA
variables = connector.get_principales_variables()
print(f"Found {len(variables)} variables.")

# 2. Get the latest value for a specific variable (e.g., using the ID of the first one)
if variables:
    target_var = variables[0]
    print(f"Fetching data for: {target_var.descripcion} (ID: {target_var.idVariable})")

    latest = connector.get_latest_value(target_var.idVariable)
    print(f"Latest Value: {latest.valor} on {latest.fecha}")

# 3. Get historical data (last 30 days)
#    (Note: Date range filtering is handled by the API or post-processing)

Contributing

Contributions are welcome! Please read our:

Security

For vulnerability reports, please review our Security Policy.

Change Log

See CHANGELOG.md for a list of changes and version updates.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Disclaimer

This project is not officially affiliated with or endorsed by the Banco Central de la República Argentina. Use at your own risk.

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

bcra_connector-0.9.1.tar.gz (82.0 kB view details)

Uploaded Source

Built Distribution

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

bcra_connector-0.9.1-py3-none-any.whl (29.3 kB view details)

Uploaded Python 3

File details

Details for the file bcra_connector-0.9.1.tar.gz.

File metadata

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

File hashes

Hashes for bcra_connector-0.9.1.tar.gz
Algorithm Hash digest
SHA256 b466913e4f49dcc76eb4c7372573eedab5b076c149709e8fbebae50acf86ebbe
MD5 42e82a64c0bc389e094c57f25b50b3ae
BLAKE2b-256 1b58d18e74a3c19b7bab459ae78c7a5b6b9578d7e5cf3a2a83b10baaf2cfdf4a

See more details on using hashes here.

Provenance

The following attestation bundles were made for bcra_connector-0.9.1.tar.gz:

Publisher: test-and-publish.yaml on PPeitsch/bcra-connector

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

File details

Details for the file bcra_connector-0.9.1-py3-none-any.whl.

File metadata

  • Download URL: bcra_connector-0.9.1-py3-none-any.whl
  • Upload date:
  • Size: 29.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for bcra_connector-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ecc0134c95152076fee23d65410f6aae6a52663d0b7f1d140555f670e21aaa8b
MD5 5c9f4f36e0effa1b50f7e0b5f59b5b13
BLAKE2b-256 a197d6f73ca4b96747a035f34e9206a13c3797b2552ace403adee66d1713ea03

See more details on using hashes here.

Provenance

The following attestation bundles were made for bcra_connector-0.9.1-py3-none-any.whl:

Publisher: test-and-publish.yaml on PPeitsch/bcra-connector

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