Python Β· Open Source Β· PyPI
CEPEA, CONAB, IBGE, NASA POWER, USDA, B3 and 34 more β 40 sources behind one unified API with automatic fallback, smart caching and versioned contracts.
Proof, not promise
The panel beside this text is not a mockup: CEPEA publishes, agrobr fetches, this page updates β every trading day, with automatic fallback, DuckDB cache and a validated contract.
from agrobr import datasets
df = await datasets.preco_diario("soja")
# 10 trading days Β· CEPEA β NotΓcias AgrΓcolas β cache
Semantic Layer
Datasets abstract multiple sources with automatic fallback. When CEPEA returns a 403, agrobr fetches NotΓcias AgrΓcolas. When the server goes down, it serves from cache.
Infrastructure
Primary source fails β tries the secondary β serves from cache. Transparent.
Local cache for CEPEA indicators (smart TTL, expires 6pm). Optional snapshots for reproducibility.
Guaranteed schema per dataset. Breaking changes only on majors. Semver.
Native httpx with a sync wrapper. Works in Jupyter, FastAPI and Airflow.
Typed models. Statistical sanity checks. Layout fingerprinting.
Full reproducibility via contextvars. For papers and audits.
Data sources
Every source has its own parser with versioning, fingerprinting and encoding handling. All you see is the DataFrame.
in amber: non-commercial or restricted license β details at docs/licenses
Get started
MIT License (code). 6,400+ passing tests. 40 sources. 36 datasets.