Skip to main content

pbs-client

pbs-client is an offline-first Python client and local SQLite mirror for the Australian PBS Public Data API v3. It mirrors all API resources, retains schedule history locally, and exposes small read helpers for item, restriction/indication, and ATC lookups.

Quick start

uv sync --extra dev
uv run omop-config configure pbs_client
uv run pbs-client init-db
uv run pbs-client sync
uv run pbs-client verify

verify is a read-only check that each recorded sync has written at least the API-reported total_records; it compares checkpoint writes, not distinct table row counts, because some resources intentionally upsert duplicate keys.

In an interactive terminal, sync also shows a per-resource record progress bar from the API totals, advancing after each page is committed.

The package registers PBSClientConfig with oa-configurator under the pbs_client tool name. The configuration wizard creates a [tools.pbs_client] section and a named generic database entry (pbs_db) that can be shared with downstream packages such as Groundworkers.

For a non-interactive local SQLite setup, the relevant stack configuration is:

[connections.pbs_local]
dialect = "sqlite"
database_name = "/absolute/path/to/pbs_client.db"

[databases.pbs_db]
kind = "generic"
connection = "pbs_local"

[tools.pbs_client]
pbs_db = "pbs_db"
subscription_key = "your-subscription-key"

Set OA_CONFIG_PATH before invoking the commands when using a config file outside ~/.config/omop/config.toml.

The public API is deliberately rate limited to one request per twenty seconds. The client enforces that interval process-wide, including retries and page continuations, and rejects configured intervals below three seconds because the quota is shared across users. The default page size is 5,000 records: this keeps large responses manageable without creating unnecessary calls against the shared quota. Use --limit 1000 when an endpoint still returns an empty or non-JSON response; if a page-size change is made during a resume, the affected resource safely restarts from page one. Refreshes are upserts and intentionally retain rows no longer returned by a later response, preserving local PBS history. Tests use local fixtures and never call the API.

All configuration — the subscription key, base URL, rate limit, and the shared mirror database — is read from oa-configurator. There is no environment-variable or CLI-flag fallback; run uv run omop-config configure pbs_client before using the library or CLI.

Metadata

Release files for pbs-client 0.6.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pbs-client 0.6.2
File Size Uploaded Provenance Actions
pbs_client-0.6.2.tar.gz 200.6 kB With provenance Details for pbs_client-0.6.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pbs-client 0.6.2
File Interpreter ABI Platform Actions
pbs_client-0.6.2-py3-none-any.whl Python 3 none any Details for pbs_client-0.6.2-py3-none-any.whl

Total release size: 239.3 kB

Release files / pbs_client-0.6.2.tar.gz

Download URL pbs_client-0.6.2.tar.gz
Size 200.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b287fba6c019be04e75e3f8b9ec4d7d78e0607ac7e1c08fe08506838083b8b90
BLAKE2b-256 checksum
How to use checksums
f0f3080c05a682497a4a4cddd04a9d5c1c81982398c4026f07463b5669c92dbe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

Release files / pbs_client-0.6.2-py3-none-any.whl

Download URL pbs_client-0.6.2-py3-none-any.whl
Size 38.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dfb8ba8565fc462223df962c9e1d426f65534f5aa58850d924f91da461a9dc6e
BLAKE2b-256 checksum
How to use checksums
f558c3697f4cdb025d16082fe2b69a32f5f3c9ff46481c236065015b5ad198ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

Security for pbs-client 0.6.2

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pbs_client-0.6.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 14, 2026.

Transparency log

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.

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