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

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 legacy --db-path option remains available for local one-off runs and uses the PBS_CLIENT_* environment variables for API settings.

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. Tests use local fixtures and never call the API.

Configuration is normally read from oa-configurator. Direct library use still supports PBS_CLIENT_SUBSCRIPTION_KEY, PBS_CLIENT_DB_PATH, PBS_CLIENT_BASE_URL, and PBS_CLIENT_RATE_LIMIT_SECONDS. The database defaults to ./pbs_client.db only for that legacy environment-variable path.

Metadata

Release files for pbs-client 0.1.0

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.1.0
File Size Uploaded
pbs_client-0.1.0.tar.gz 63.1 kB Details

Built distribution (wheel)

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

Total release size: 89.6 kB

Release files / pbs_client-0.1.0.tar.gz

Download URL pbs_client-0.1.0.tar.gz
Size 63.1 kB
Tags Source
SHA-256 checksum
How to use checksums
87d449a87055149dde629ff4e8a66abb557e8a7947b34c6bddb37cd7c332221d
BLAKE2b-256 checksum
How to use checksums
0c75c8d2b3d3d8f4d6b6ca41f6507f28953c12ecd69fcbaef4fd6c36e388f564
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 Sep 9, 2026.

Transparency log

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

Download URL pbs_client-0.1.0-py3-none-any.whl
Size 26.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e82d345d9f02f4df6cd9b5344dded30454ab2d1d3bbd1ab488ff607a2f296d07
BLAKE2b-256 checksum
How to use checksums
da48391c4d751562b8c0af782fa0b50ed2138155b74f9674e4195447b2511737
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 Sep 9, 2026.

Transparency log

Release history Release notifications | RSS feed

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

This release

0.1.0 This release

2 release 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