Metadata-Version: 2.4
Name: statbridge
Version: 0.1.0
Summary: Python client for the StatBridge API — official statistics from ISTAT, Eurostat, OECD, and ECB
Author: StatBridge
License-Expression: MIT
Project-URL: Homepage, https://statbridge.net
Project-URL: Documentation, https://statbridge.net/docs
Project-URL: Repository, https://github.com/statbridge/statbridge-python
Keywords: statistics,api,istat,eurostat,oecd,ecb,sdmx,data
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.24
Provides-Extra: pandas
Requires-Dist: pandas>=1.5; extra == "pandas"

# StatBridge

Python client for the [StatBridge API](https://statbridge.net) — official statistics from ISTAT, Eurostat, OECD, and ECB in one unified interface.

## Install

```bash
pip install statbridge
```

## Quick start

```python
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`:

```bash
export STATBRIDGE_API_KEY="sb_live_xxxxxxxxxxxx"
```

```python
sb = StatBridge()  # picks up the env var
```

## Optional dependencies

```bash
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](https://statbridge.net/docs/datasets).

## Links

- [Documentation](https://statbridge.net/docs)
- [API reference](https://statbridge.net/docs/api)
- [Dashboard & API keys](https://statbridge.net/dashboard)
