insseption
JSON API + Python client for INSSE TEMPO-Online (Romania’s National Institute of Statistics).
- HTTP JSON API — open
/api/v1/...in a browser; responses are indentedapplication/json - Python package —
from insseption import Client - UI — optional static frontend under
/when deployed with nginx
Production target: https://insse.csaladen.es (ROEM AWS / Traefik)
Python client
Not on PyPI yet — install from GitHub (or a local checkout):
pip install "git+https://github.com/csaladenes/insseption.git"
# or, from a clone:
pip install .
from insseption import Client
with Client() as c: # https://insse.csaladen.es/api/v1
print(c.health())
print(c.context(lang="en")["nodes"][:3])
meta = c.matrix("POP105A", lang="en")
data = c.query("POP105A", lang="en") # default totals / latest year
print(data["columns"], data["row_count"])
Point at a local server:
Client("http://127.0.0.1:8787/api/v1")
CLI:
insseption --base-url http://127.0.0.1:8787/api/v1 health
insseption --base-url http://127.0.0.1:8787/api/v1 query POP105A
JSON API (/api/v1)
| Method | Path | Returns |
|---|---|---|
| GET | / |
Service catalog (JSON) |
| GET | /api/v1 |
Endpoint list |
| GET | /api/v1/health |
{ok, upstream_ok, ...} |
| GET | /api/v1/meta |
Service metadata |
| GET | /api/v1/context?lang=en |
Domain tree roots |
| GET | /api/v1/context/{code} |
Children |
| GET | /api/v1/matrices/{code} |
Dimensions / options |
| GET | /api/v1/matrices/{code}/query |
Rows (default selection) |
| POST | /api/v1/matrices/{code}/query |
Rows ({lang, selections}) |
| GET | /api/v1/news |
Recent updates |
| POST | /api/v1/translate |
Label translation |
Interactive docs: /docs · OpenAPI: /openapi.json
Example in browser:
https://insse.csaladen.es/api/v1/matrices/POP105A/query?lang=en
POST body:
{
"lang": "en",
"selections": { "5": [4931], "1": [1] }
}
Run the API locally
python3.11 -m venv .venv && source .venv/bin/activate
pip install -e ".[server]"
uvicorn insseption.main:app --host 127.0.0.1 --port 8787
Deploy (ROEM AWS Traefik stack)
Integrated into the existing covid19-romania compose (same pattern as fastapi):
- Host path:
/home/ec2-user/covid19-romania/insseption/ - Service:
insseptionindocker-compose.yml - Traefik:
Host:insse.csaladen.es→:8787 - Networks:
web+internal
# on ROEM
cd /home/ec2-user/covid19-romania
# edit/sync ./insseption (rsync --exclude .env) and ensure ./insseption/.env (OPENROUTER_API_KEY). Guide: https://insse.csaladen.es/docs
docker-compose up -d --build --no-deps insseption
curl -sS https://insse.csaladen.es/api/v1/health
Floating chat agent (separate container)
GEM-style NL agent in ./agent (OpenRouter → TEMPO via the JSON API). The agent
container stays on the internal Docker network; the API reverse-proxies /agent/*:
| URL | Purpose |
|---|---|
| https://insse.csaladen.es/index.html | UI + bottom-right chat FAB |
| https://insse.csaladen.es/agent/health | Agent health |
POST https://insse.csaladen.es/agent/api/query |
{ "query": "...", "generate_chart": true } |
# on ROEM (after syncing ./insseption/agent and compose service)
docker-compose up -d --build --no-deps insseption insseption-agent
curl -sS https://insse.csaladen.es/agent/health
Host smoke harness
# API + docs cite + chat.js + agent against production (or set INSSEPTION_HOST)
python3 scripts/harness.py
# lighter API-only check:
INSSEPTION_BASE=https://insse.csaladen.es/api/v1 python3 scripts/smoke.py
License
MIT — © Dénes Csala (GitHub). Hosted on ROEM (AWS / Traefik). Data remains subject to INSSE reuse terms.
Metadata
Release files for insseption 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| insseption-0.1.0.tar.gz | 37.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| insseption-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 78.6 kB
Release files / insseption-0.1.0.tar.gz
| Download URL | insseption-0.1.0.tar.gz |
|---|---|
| Size | 37.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e196135bed72aef3cb246befe181a02b6c127b7a86dc761dd652290cf4dd43b9
|
|
BLAKE2b-256 checksum How to use checksums |
1c8256411903b2a742a5c3caddea61d317e917d0295392a9610c4fd73c91cde6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|
Release files / insseption-0.1.0-py3-none-any.whl
| Download URL | insseption-0.1.0-py3-none-any.whl |
|---|---|
| Size | 40.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5a24fac7d540542c3186e3b552d330c042ee6998b56eb3d8d3c7b2bb9110e0ad
|
|
BLAKE2b-256 checksum How to use checksums |
5d8b778f8be9f0d6d545158d55e6ee6dbb42ea01c469ffbbe7d50a74842766e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.16
|
Security for insseption 0.1.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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.