Skip to main content

ausdata — Python SDK for the Australian public data API

The official Python client for ausdata.io. One auth key, one uniform response envelope, every major Australian government data source.

pip install ausdata-sdk
# or, with pandas convenience:
pip install "ausdata-sdk[pandas]"

Why?

The chart you spend 90 minutes building in Excel — one HTTP call.

# Before — wrangling SDMX XML by hand
curl 'https://api.data.abs.gov.au/data/WPI/...'

# After — typed, normalised, attribution-tagged
from ausdata import Client

client = Client(api_key="ak_xxx")
result = client.real_wages(start="2019-Q1", end="2024-Q4")

print(result.data[0])
# RealWageRow(period='2024-Q4', wpi_annual_change_pct=3.2,
#             cpi_annual_change_pct=2.4, real_wages_gap_pct=0.8,
#             real_wages_direction='growing')

df = result.to_dataframe()       # pandas (optional extra)
result.to_csv("real_wages.csv")  # Datawrapper-friendly

Async client

import asyncio
from ausdata import AsyncClient

async def main():
    async with AsyncClient(api_key="ak_xxx") as client:
        snapshot = await client.economic_dashboard()
        print(snapshot.data.cash_rate_pct, snapshot.data.unemployment_rate_pct)

asyncio.run(main())

Endpoints

Method API endpoint What you get
client.health() GET /v1/health Service status (no quota cost)
client.whoami() GET /v1/whoami Tier + monthly usage (works for API keys or JWTs)
client.account.api_key() GET /v1/account/api-key Your key + tier + monthly usage (JWT-only)
client.account.rotate_key() POST /v1/account/api-key Rotate the key, get new plaintext (JWT-only)
client.search_datasets(q=...) GET /v1/search-datasets Search across all 9 AU sources
client.list_datasets(source) GET /v1/datasets/{source} Enumerate curated datasets for one source
client.describe(source, id) GET /v1/describe/{source}/{id} Schema: dimensions, valid filters, valid values
client.get_data(source, id, **filters) GET /v1/data/{source}/{id} Fetch any dataset with source-specific filters
client.real_wages(start=...) GET /v1/real-wages WPI YoY minus CPI YoY (composed)
client.economic_dashboard() GET /v1/economic-dashboard 5-source headline macro snapshot (composed)

The full discover → introspect → fetch loop is:

r = client.search_datasets(q="unemployment rate")  # find dataset
schema = client.describe("abs", "LF")              # see valid filters
data = client.get_data("abs", "LF",                # fetch with right filters
                       measure="unemployment_rate",
                       region="nsw", start="2024-01")

Every data response is wrapped in the same ApiResponse envelope so you always know where to find the payload (.data), the attribution (.meta.sources), and the audit trail (.meta.retrieved_at, .meta.stale).

Pricing

Tier Price Calls/mo Notes
Free $0 100 1y history, attribution required
Analyst $29 10,000 10y history, no attribution
Pro $99 100,000 Webhooks, priority support
Enterprise custom unlimited SLA, white-label, custom queries

Sign up + get a free key at ausdata.io.

Configuration

from ausdata import Client

# API key resolution order:
#   1. explicit api_key= argument
#   2. AUSDATA_API_KEY environment variable
client = Client(
    api_key="ak_xxx",
    base_url="https://api.ausdata.io",   # override for staging
    timeout=30.0,                         # per-request timeout (seconds)
    max_retries=3,                        # 5xx + 429 retry budget
    retry_backoff_factor=2.0,             # exponential delay multiplier
)

Errors

from ausdata import Client
from ausdata.exceptions import (
    AusdataError,         # base
    AuthenticationError,  # 401
    PermissionError,      # 403, 402 (tier-blocked)
    RateLimitError,       # 429 with retry_after
    ValidationError,      # 400
    UpstreamError,        # 502/503
    AusdataServerError,   # 5xx fallback
)

try:
    result = client.real_wages(start="not-a-quarter")
except ValidationError as e:
    print(e.message, "Hint:", e.hint)

Every error carries the API's message plus the actionable hint when available (e.g. "Did you mean 2024-Q1?").

Links

License

MIT. See LICENSE.

Metadata

Release files for ausdata-sdk 0.2.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 ausdata-sdk 0.2.0
File Size Uploaded Provenance Actions
ausdata_sdk-0.2.0.tar.gz 56.6 kB Without provenance Details for ausdata_sdk-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ausdata-sdk 0.2.0
File Interpreter ABI Platform Actions
ausdata_sdk-0.2.0-py3-none-any.whl Python 3 none any Details for ausdata_sdk-0.2.0-py3-none-any.whl

Total release size: 77.6 kB

Release files / ausdata_sdk-0.2.0.tar.gz

Download URL ausdata_sdk-0.2.0.tar.gz
Size 56.6 kB
Tags Source
SHA-256 checksum
How to use checksums
df31a1f0eadaeb48da512d2d61c4d8376f725f34f61242be53327243822c36cc
BLAKE2b-256 checksum
How to use checksums
5dacdaf834c70ebb762c7ce0397137361eb68a72ce36ae61d436f1e84e5c41f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / ausdata_sdk-0.2.0-py3-none-any.whl

Download URL ausdata_sdk-0.2.0-py3-none-any.whl
Size 21.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ac07583be1623a36e752cec78cf696258d093c2d05e0dc6d48bc4de4027f4c49
BLAKE2b-256 checksum
How to use checksums
4ccd14c19d73e6e5a6b61a6a896bde9acd958c0e29ff699da058847cc7483825
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for ausdata-sdk 0.2.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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

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