Skip to main content

BCRA Client Python

pypi version

Consumo de datos de la API del Banco Central de la República Argentina (BCRA)

Esta librería está construida con base en la documentación presentada por la misma entidad en el siguiente link.

Instalar

Debe usar pip para instalar o actualizar a la última versión estable.

pip install -U bcra-api-client

Como usar

Su uso es simple, se debe crear primero un cliente a la API.

Nota: Hasta ahora la API tiene dos endpoints de estadísticas.

Cliente API

from bcra import Client

client = Client()

Configurar el Cliente

Se pueden cambiar las configuraciones de un cliente de la siguiente manera:

from bcra import ConfigClient, Client

config = ConfigClient(language='es')

client = Client(config)

Referencias

  • language:

Los idiomas configurados actualmente “es-AR” y “en-US”. De no informar dicho parámetro, la respuesta se realizará por defecto en “es-AR”.

Los valores admitidos son “es” referenciando a “es-AR” o “en” a “en-US”.

Principales variables

Para obtener la lista de todas las variables publicadas por el BCRA.

statistics = client.statistics
print(statistics.variables())

Datos de Variable

Para obtener los valores para la variable y el rango de fechas indicadas.

Se debe llamar al mismo método con los siguientes parámetros (id_variable, from_, to)

Donde:

  • id_variable: (Int) Se obtiene de consultar a la lista de todas las variables
  • from_: (String) Corresponde a la fecha de inicio del rango a consultar, la misma deberá tener el formato yyyy-mm-dd
  • to: (String) Corresponde a la fecha de fin del rango a consultar, la misma deberá tener el formato yyyy-mm-dd
statistics = client.statistics
print(statistics.variables(5, '2024-01-01', '2024-05-01'))

Metadata

Release files for bcra-api-client 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bcra-api-client 1.2.0
File Size Uploaded Provenance
bcra_api_client-1.2.0.tar.gz 6.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for bcra-api-client 1.2.0
File Interpreter ABI Platform
bcra_api_client-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.8 kB

Release files / bcra_api_client-1.2.0.tar.gz

Download URL bcra_api_client-1.2.0.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b5464929b644a11a51f6c5e0ae9b7caeb894919cc89a81c736212db689c64d63
BLAKE2b-256 checksum
How to use checksums
ab448540928c2c35748f3a23644ee0964d736a1d8e272dd467635d65dd66cceb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.19

Release files / bcra_api_client-1.2.0-py3-none-any.whl

Download URL bcra_api_client-1.2.0-py3-none-any.whl
Size 7.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0a6978bd788d78cb921de4fb254f875af2931472676f3b93176b56531f20a655
BLAKE2b-256 checksum
How to use checksums
0a6f3ab0e1c45221f935a184a981f949b970afa6a781ed6ccc787a2ad6e141a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.19

Security for bcra-api-client 1.2.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page