Skip to main content

parsimony-bdp

Banco de Portugal connector — Portuguese macroeconomic, monetary, financial, and external time series via the BPstat (JSON-stat) API.

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

Connectors

Name Kind Description
bdp_fetch connector Fetch Banco de Portugal observations by domain_id + dataset_id (optional series_ids filter and date window).
enumerate_bdp enumerator Crawl the full BPstat universe (~72 K series across 212 datasets / 65 leaf domains) for catalog discovery.
bdp_search connector Semantic-search the published BdP catalog snapshot; returns ranked series codes.

Install

pip install parsimony-bdp

Pulls in a compatible parsimony automatically. Verify discovery:

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

Configuration

No configuration required — the BPstat API is open and unauthenticated.

bdp_search reads a published catalog snapshot (default hf://parsimony-dev/bdp). Override the snapshot location with the PARSIMONY_BDP_CATALOG_URL environment variable, or pass catalog_url= at call time.

Quick start

from parsimony_bdp import CONNECTORS

# Discover via bdp_search, then fetch. A search hit's code splits as
# domain_id:dataset_id:series_id.
hits = CONNECTORS["bdp_search"](query="economic activity coincident indicator")
code = hits.raw.iloc[0]["code"]  # e.g. "48:aea9…:12099329"
domain_id, dataset_id, series_id = code.split(":")
result = CONNECTORS["bdp_fetch"](domain_id=int(domain_id), dataset_id=dataset_id, series_ids=series_id)
print(result.raw.head())

For multi-plugin composition (autoloads everything installed):

from parsimony import discover

connectors = discover.load_all()

Catalogs

BPstat has no flat "list all series" endpoint, so enumerate_bdp walks the domain → dataset → series hierarchy. Two things make the crawl both complete and cheap: it paginates the datasets list (domains with >10 datasets would otherwise lose series), and it crawls each dataset at page_size=100&obs_last_n=1 (100 series per page with a one-point observation array) — about 720 lean pages for the whole universe. Each dataset is self-checked against its declared series count. Maintainers then run a bilingual /series/ enrichment pass (English + Portuguese descriptions folded into the catalog description for cross-language recall), build a Catalog snapshot (scripts/build_catalog.py), and push it to the snapshot URL bdp_search reads — the build runs offline as a publish job, never at query time.

Provider

License

See LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

parsimony_bdp-0.0.2.tar.gz (20.0 kB view details)

Uploaded Source

Built Distribution

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

parsimony_bdp-0.0.2-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

Details for the file parsimony_bdp-0.0.2.tar.gz.

File metadata

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

File hashes

Hashes for parsimony_bdp-0.0.2.tar.gz
Algorithm Hash digest
SHA256 ab581d85694ec88e3d23244cc5e2d4bce1d14bd3e58340b45f20b5c69ade0eb4
MD5 5f5d9109371fc48a9f1a22d3e56a99c6
BLAKE2b-256 7ec3aed1d0afe4b1547465df41d5dc5ef8d0b3818cbca5357d7ae8b3d05b12ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for parsimony_bdp-0.0.2.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_bdp-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: parsimony_bdp-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 22.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_bdp-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2752eddff5a749c491a05989d46f8156c1142581741d4c6e4e387638234f8bdf
MD5 b1757e5fea54b50b9b64a9a0467bc848
BLAKE2b-256 6add9d39fde90fd85be169394d82752126c03ed28330ffddef5f9dc53ae1bf15

See more details on using hashes here.

Provenance

The following attestation bundles were made for parsimony_bdp-0.0.2-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.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page