Skip to main content

Swiss National Bank (SNB) connector for the parsimony framework

Project description

parsimony-snb

Swiss National Bank connector plugin for parsimony — monetary, exchange-rate, balance-of-payments, and price series from the SNB data portal (https://data.snb.ch).

Part of the parsimony-connectors monorepo. Distributed standalone on PyPI as parsimony-snb.

Connectors

Name Kind Description
snb_fetch connector Fetch an SNB cube as a long-format DataFrame by cube_id — both publication cubes (rendoblim) and data-warehouse cubes (BSTA@SNB.AUR_U.ODF), routed automatically. Optional date window, dimension selection, and language.
enumerate_snb enumerator Enumerate every SNB cube discovered live from the portal sitemap (publication + warehouse) as catalog rows (drives the snb catalog).
snb_search search Semantic search over the published SNB catalog. Pass the cube_id portion (before #) of a returned code to snb_fetch(cube_id=...).

Coverage

The cube universe is discovered live from the SNB portal's published XML sitemap (https://data.snb.ch/sitemap), so the catalog self-tracks new cubes:

  • 237 publication cubes (/topics/{topic}/cube/{id}) — catalogued at series granularity (compound cube_id#series_key codes).
  • 912 data-warehouse cubes (/warehouse/{group}/cube/{sdmx_id}, groups BSTA / ZAST / ZAHL / DDUM / KRED / SNB1A / WKI) — catalogued at cube level; the individual dimension-leaf series stay fetchable via dim_sel.

Every catalogued cube (1,149 total) is fetchable through snb_fetch. Cube titles come from the portal's metadata API on a best-effort basis. SNB is a public, keyless data portal — no API key.

Install

pip install parsimony-snb

Pulls in a compatible parsimony-core automatically. Verify discovery:

python -c "from parsimony import discover; print([p.name for p in discover.iter_providers()])"

Quick start

from parsimony_snb import CONNECTORS

result = CONNECTORS["snb_fetch"](cube_id="rendoblim")
print(result.data.head())

For multi-plugin composition:

from parsimony import discover
connectors = discover.load_all()

Catalogs

snb_search runs semantic search over a published catalog snapshot (hf://parsimony-dev/snb by default; override with the PARSIMONY_SNB_CATALOG_URL env var or load(catalog_url=...)). The snapshot is built from enumerate_snb via scripts/build_catalog.py. No API key is required — SNB is a public, keyless data portal.

Provider

License

See LICENSE.

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

parsimony_snb-0.0.1.tar.gz (18.6 kB view details)

Uploaded Source

Built Distribution

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

parsimony_snb-0.0.1-py3-none-any.whl (21.9 kB view details)

Uploaded Python 3

File details

Details for the file parsimony_snb-0.0.1.tar.gz.

File metadata

  • Download URL: parsimony_snb-0.0.1.tar.gz
  • Upload date:
  • Size: 18.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for parsimony_snb-0.0.1.tar.gz
Algorithm Hash digest
SHA256 cada4b59c9cb35c9a2d36e91ea41548e2544e7f62b72e5c1665899e76dd3ea9f
MD5 289e0d8654cc0d1ee18686ef005b7948
BLAKE2b-256 148c409b941293ad7e33c657783fad04e7d67eb6824894054e3d7fb1dd9a1b73

See more details on using hashes here.

Provenance

The following attestation bundles were made for parsimony_snb-0.0.1.tar.gz:

Publisher: release.yml on ockham-sh/parsimony-connectors

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file parsimony_snb-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: parsimony_snb-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 21.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for parsimony_snb-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 857acc95755249346c01ca0f536efd24c305527224604dcafdcde7cc567e0a46
MD5 1f91a8ce8ba5e1adcc2e7a6fe4e81df1
BLAKE2b-256 a5fcb823f79371fa27be9b5b03beae2f9b10289b06ba07a01af6c1842724ad60

See more details on using hashes here.

Provenance

The following attestation bundles were made for parsimony_snb-0.0.1-py3-none-any.whl:

Publisher: release.yml on ockham-sh/parsimony-connectors

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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