Metadata-Version: 2.4
Name: ausdataio
Version: 0.1.0
Summary: Python SDK + CLI for ausdata.io — the unified API for Australian public data (ABS, RBA, ATO, APRA, AIHW, ASIC, AEMO, WGEA, BOM).
Project-URL: Homepage, https://ausdata.io
Project-URL: Documentation, https://api.ausdata.io/docs
Project-URL: Repository, https://github.com/Bigred97/ausdata-py
Project-URL: Issues, https://github.com/Bigred97/ausdata-py/issues
Project-URL: Changelog, https://github.com/Bigred97/ausdata-py/blob/main/CHANGELOG.md
Project-URL: PyPI, https://pypi.org/project/ausdataio/
Author: Harry Vass
License: Functional Source License, Version 1.1, MIT Future License
        
        Abbreviation
        FSL-1.1-MIT
        
        Notice
        Copyright 2026 Harry Vass
        
        License
        Licensor hereby grants you the right to use, copy, modify, create derivative
        works, publicly perform, publicly display and redistribute the Software for any
        Permitted Purpose identified below, subject to the conditions set forth in this
        agreement, and provided that no license is expressly granted hereunder for any
        other purpose.
        
        Permitted Purpose
        A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
        means making the Software available to third parties as a hosted or managed
        service that provides users with access to substantial features or
        functionality of the Software, where such service competes with any product or
        service offered by Licensor.
        
        Permitted Purposes specifically include, without limitation:
        
        1. Internal business use.
        2. Use for research, experimentation, and testing for the benefit of public
           knowledge, personal study, private entertainment, hobby projects, amateur
           pursuits, religious observance, or similar non-commercial uses, all without
           any anticipated commercial application.
        3. Use by any charitable organization, educational institution, public research
           organization, public safety or health organization, environmental protection
           organization, or government institution.
        
        Notices
        You must give any other recipients of the Software a copy of this License.
        
        You must retain, in the Source form of any Derivative Works that You
        distribute, all copyright, patent, trademark, and attribution notices from the
        Source form of the Software, excluding those notices that do not pertain to any
        part of the Derivative Works.
        
        If You publicly display or publicly perform the Software or any Derivative
        Works, You must give any users of the Software or Derivative Works conspicuous
        notice of these license terms and provide a copy of this License.
        
        Redistribution
        The Permitted Purpose grant of the License gives You the right to publicly
        perform, publicly display, redistribute and make available the Software,
        provided you comply with this License.
        
        If You distribute or make available the Software or any Derivative Works of the
        Software, the Software or Derivative Works must remain subject to this License,
        and You must (a) include a copy of this License with any copy of the Software
        or Derivative Works You distribute, and (b) preserve all copyright, patent,
        trademark, and attribution notices.
        
        Change Date
        The Change Date is two years from the date the Software is first made
        available under this License.
        
        Change License
        On the Change Date, this License will automatically convert to the MIT License,
        and the conditions of the MIT License will retroactively apply to all copies of
        the Software previously distributed under this License.
        
        The MIT License terms are:
        
          Permission is hereby granted, free of charge, to any person obtaining a copy
          of this software and associated documentation files (the "Software"), to
          deal in the Software without restriction, including without limitation the
          rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
          sell copies of the Software, and to permit persons to whom the Software is
          furnished to do so, subject to the following conditions:
        
          The above copyright notice and this permission notice shall be included in
          all copies or substantial portions of the Software.
        
          THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
          IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
          FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
          AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
          LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
          FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
          DEALINGS IN THE SOFTWARE.
        
        Trademarks
        Except for displaying the License notices and the name "Harry Vass" to identify
        the origin of the Software, You have no right under this License to use the
        Licensor's trademarks, trade names, or service marks.
        
        Termination
        If You make any use of the Software in violation of this License, this License
        will automatically terminate and Licensor reserves all rights and remedies
        against You.
        
        No Warranty / Liability
        THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, WHETHER
        EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE. LICENSOR SPECIFICALLY DISCLAIMS ALL
        IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
        NON-INFRINGEMENT, AND ALL WARRANTIES ARISING OUT OF ANY COURSE OF DEALING OR
        USAGE OF TRADE. IN NO EVENT WILL LICENSOR BE LIABLE FOR ANY DAMAGES OF ANY
        KIND ARISING FROM YOUR USE OF THE SOFTWARE, INCLUDING DIRECT, INDIRECT,
        INCIDENTAL, CONSEQUENTIAL, SPECIAL, OR PUNITIVE DAMAGES.
License-File: LICENSE
Keywords: abs,aemo,aihw,api,apra,asic,ato,ausdata,australia,australian,cli,client,government-data,public-data,rba,sdk,wgea
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: httpx>=0.27
Requires-Dist: pydantic>=2.7
Requires-Dist: rich>=13
Requires-Dist: typer>=0.12
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest-httpx>=0.30; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: ruff>=0.5; extra == 'dev'
Description-Content-Type: text/markdown

# ausdataio — Python SDK + CLI for ausdata.io

Official Python client and command-line interface for [ausdata.io](https://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.

```bash
pip install ausdataio
```

## Quickstart (3 lines)

```python
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

```bash
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

```python
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

```python
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::

```python
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 → Slack** — `cron + 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 thread** — `cron + 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](https://ausdata.io/built-with) for working source.

## Companion projects

- **MCP server**: `npx -y ausdata-mcp@latest` — drop AU data into Claude Desktop, Cursor, Continue
- **Hosted API**: <https://api.ausdata.io> — same endpoints, language-agnostic
- **Free public sister MCPs**: [`abs-mcp`](https://pypi.org/project/abs-mcp/), [`rba-mcp`](https://pypi.org/project/rba-mcp/), [`ato-mcp`](https://pypi.org/project/ato-mcp/), [`apra-mcp`](https://pypi.org/project/apra-mcp/), [`aihw-mcp`](https://pypi.org/project/aihw-mcp/), [`asic-mcp`](https://pypi.org/project/asic-mcp/), [`aemo-mcp`](https://pypi.org/project/aemo-mcp/), [`au-weather-mcp`](https://pypi.org/project/au-weather-mcp/), [`wgea-mcp`](https://pypi.org/project/wgea-mcp/)

## Docs

- API reference + OpenAPI: <https://api.ausdata.io/docs>
- Pricing + signup: <https://ausdata.io>
- Status page: <https://api.ausdata.io/v1/status>

## 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](./LICENSE) — free for any non-competing use; reverts to MIT
after two years.
