Async SDMX 2.1 REST client (ISTAT, Eurostat, OECD).
SDMX 2.1 REST is the statistical exchange standard used by ISTAT, Eurostat and OECD. This library provides an async client with caching and a circuit breaker, plus municipal connectors (welfare, businesses, tourism accommodation).
pip install opendata-sdmx
import asyncio
from opendata_sdmx import SdmxClient, data_path, df_ref
async def main():
async with SdmxClient() as client:
path = data_path(df_ref("IT1", "22_289"))
data = await client.get_json(path, params={"lastNObservations": 1})
print(list(data))
asyncio.run(main())uv sync
uv run ruff check
uv run pytest
Pushing a tag vX.Y.Z that matches the version in pyproject.toml runs
.github/workflows/release.yml: tests, build, publication to PyPI through trusted publishing
(no token in the repository) and a GitHub release. It needs, once, a pending publisher on
pypi.org for the project opendata-sdmx: owner agent-engineering-studio, repository
opendata-sdmx, workflow release.yml, environment pypi.
Extracted from opendata-ai's opendata_core.sdmx at commit 71c8346.
MIT. See LICENSE.