Skip to main content

Python client for the StatBridge API — official statistics from ISTAT, Eurostat, OECD, and ECB

Project description

StatBridge

Python client for the StatBridge API — official statistics from ISTAT, Eurostat, OECD, and ECB in one unified interface.

Install

pip install statbridge

Quick start

from statbridge_sdk import StatBridge

sb = StatBridge("sb_live_xxxxxxxxxxxx")

# Search for topics
sb.search("unemployment")

# Get data
data = sb.get("unemployment_rate")
print(data["data"])       # list of records
print(data["citation"])   # proper source attribution

# Filter by dimension
data = sb.get("unemployment_rate", SESSO=2, CLASSE_ETA="Y15-24", year=2023)

# Get a pandas DataFrame instead
df = sb.get("gdp_growth", as_dataframe=True)

# Discover available filters
sb.dimensions("unemployment_rate")

# List all topics
sb.topics()

Environment variable

Instead of passing the key directly, set STATBRIDGE_API_KEY:

export STATBRIDGE_API_KEY="sb_live_xxxxxxxxxxxx"
sb = StatBridge()  # picks up the env var

Optional dependencies

pip install "statbridge[pandas]"   # enables as_dataframe=True

Available topics

25 topics across labour, economy, society, and energy — covering Italy (regional), EU, and OECD countries.

See the full list at statbridge.net/docs/datasets.

Links

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

statbridge-0.1.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

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

statbridge-0.1.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file statbridge-0.1.0.tar.gz.

File metadata

  • Download URL: statbridge-0.1.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for statbridge-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0bb1e1fb5afd39f0727ba29c66e992d338d8fb4000e4de86f2902e130bf0801e
MD5 79edca10ab0d7393d1b0a67b578411a1
BLAKE2b-256 0d7c3fb730fbb5650365628297f692cba98592e5618cb142f8e7a2696a8cebb3

See more details on using hashes here.

File details

Details for the file statbridge-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: statbridge-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for statbridge-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 546c629c3b0796855f08d33d2ac0ff6efba79b694a83e6e533f095bd378e47b0
MD5 d6e37fa51ee4bba72baed52efdc369b6
BLAKE2b-256 ebde326a2a430fe2b0472680251494303b66c9ee6730c1166fcf0f3aab65fd93

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