Skip to content

Bigred97/ausdata-py

Repository files navigation

ausdataio — Python SDK + CLI for ausdata.io

Official Python client and command-line interface for ausdata.io, the unified API for Australian public data: ABS, RBA, ATO, APRA, AIHW, ASIC, AEMO, WGEA, BOM. One auth key, one envelope, every major source.

pip install ausdataio

Quickstart (3 lines)

from ausdataio import Ausdata

client = Ausdata()                       # reads AUSDATA_API_KEY env var
print(client.economic_dashboard())

Get a free key at https://ausdata.io. Free tier: 500 calls / month.

CLI

ausdata configure                        # store key in ~/.ausdata/config.json
ausdata dashboard                        # five headline macro indicators
ausdata cpi --region australia --limit 8
ausdata cashrate
ausdata real-wages --limit 12
ausdata search "youth unemployment"
ausdata data abs CPI -f region=australia -f limit=4
ausdata weather sydney

Run ausdata --help for the full command list.

CLI commands

Command Endpoint
health GET /v1/health
status GET /v1/status
whoami GET /v1/whoami
search <query> GET /v1/search-datasets
list [source] GET /v1/datasets[/{source}]
describe <source> <id> GET /v1/describe/{source}/{id}
data <source> <id> [-f k=v] GET /v1/data/{source}/{id}
releases GET /v1/releases
cpi ABS CPI shortcut
cashrate GET /v1/real-cash-rate
real-wages GET /v1/real-wages
dashboard GET /v1/economic-dashboard
cost-of-living GET /v1/cost-of-living
youth-unemployment GET /v1/youth-unemployment
trade-balance GET /v1/trade-balance
housing-affordability GET /v1/housing-affordability
gender-pay GET /v1/gender-pay-context
energy GET /v1/energy-snapshot
weather <location> GET /v1/weather/{location}
configure Save key to ~/.ausdata/config.json

Sync SDK

from ausdataio import Ausdata

with Ausdata(api_key="ak_...") as client:
    print(client.cpi(region="australia", limit=4))
    print(client.cash_rate())
    print(client.real_wages(limit=12))
    print(client.data("rba", "F1.1", limit=24))

Async SDK

import asyncio
from ausdataio import AsyncAusdata

async def main():
    async with AsyncAusdata() as client:
        snapshot = await client.economic_dashboard()
        print(snapshot)

asyncio.run(main())

Errors

The SDK raises typed exceptions you can catch::

from ausdataio import Ausdata
from ausdataio.errors import AuthenticationError, RateLimitError, AusdataError

try:
    Ausdata().economic_dashboard()
except AuthenticationError:
    print("Bad / missing key")
except RateLimitError as exc:
    print(f"Quota hit; retry after {exc.retry_after}s")
except AusdataError as exc:
    print(f"API error {exc.status_code}: {exc}")

Auth precedence

  1. --api-key (CLI flag) / api_key=... (SDK kwarg)
  2. AUSDATA_API_KEY environment variable
  3. ~/.ausdata/config.json (CLI only)

Recipes / built-with

Ready-to-run examples that combine ausdata with common tools:

  • Daily CPI digest → Slackcron + ausdata + requests → Slack message every release morning
  • Notion macro tracker — sync live cash rate / CPI / unemployment to a Notion database
  • Discord economy bot!cpi, !cashrate commands for AU finance communities
  • Real-wages tweet threadcron + ChatGPT + tweepy auto-thread on every WPI release
  • Newsletter widget — drop a live economic-dashboard <script> into Substack
  • Cursor / Continue.dev IDE plugin — autocomplete with AU data inline

See ausdata.io/built-with for working source.

Companion projects

Docs

What ausdata.io doesn't do (honest)

  • ❌ Suburb-level property prices (use CoreLogic)
  • ❌ Live KYC / per-company verification (use Kyckr / vigil)
  • ❌ Address-level flood / hazard (insurer-only via ICA NFID)
  • ❌ Open Banking / CDR consumer data (use Basiq / Frollo)
  • ❌ 5-min wholesale electricity bid stacks (use AEMO NEMWEB directly)

ausdata.io covers public macro / aggregate data with citation-ready provenance — see https://ausdata.io/pricing#what-we-dont for the full list.

Licence

FSL-1.1-MIT — free for any non-competing use; reverts to MIT after two years.

About

Official Python SDK + CLI for ausdata.io — the Australian public data API

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages