Australia Post data grabber
A quick module for searching and pulling suburb data from the Australia Post website.
Development
This repository now uses uv for package management.
uv sync --dev
uv run ruff check .
uv run ty check
uv run pytest
Usage
Example below, it's pretty simple and yields namedtuples:
import auspost
for data in auspost.search_postcode("Sydney"):
print(data)
AusPostData(postcode='2055', suburb='NORTH SYDNEY', state='NSW')
AusPostData(postcode='2059', suburb='NORTH SYDNEY', state='NSW')
AusPostData(postcode='2060', suburb='NORTH SYDNEY', state='NSW')
AusPostData(postcode='2060', suburb='NORTH SYDNEY SHOPPINGWORLD', state='NSW')
AusPostData(postcode='2001', suburb='SYDNEY', state='NSW')
AusPostData(postcode='2000', suburb='SYDNEY', state='NSW')
AusPostData(postcode='2020', suburb='SYDNEY DOMESTIC AIRPORT', state='NSW')
AusPostData(postcode='2020', suburb='SYDNEY INTERNATIONAL AIRPORT', state='NSW')
AusPostData(postcode='2129', suburb='SYDNEY MARKETS', state='NSW')
AusPostData(postcode='2127', suburb='SYDNEY OLYMPIC PARK', state='NSW')
AusPostData(postcode='1235', suburb='SYDNEY SOUTH', state='NSW')
AusPostData(postcode='2000', suburb='SYDNEY SOUTH', state='NSW')
AusPostData(postcode='2006', suburb='SYDNEY UNIVERSITY', state='NSW')
AusPostData(postcode='2006', suburb='THE UNIVERSITY OF SYDNEY', state='NSW')
AusPostData(postcode='1466', suburb='UNSW SYDNEY', state='NSW')
Errors
It'll raise a RunTimeError if something goes wrong with fetching the data
Changelog
- 2019-11-16 - Changed from a namedtuple response to a dict because... I don't even know why I was returning them at the time.
- 2021-01-23 - Fixed example code typo
- 2022-03-28 - Adding typing, bumped to 0.0.10
- 2022-06-04 - v0.0.11 - Added more typing, more testing.
- 2026-03-24 - v0.1.0 - Switched package management to uv and replaced validation with ruff, ty, and pytest.
Metadata
Release files for auspost 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| auspost-0.1.0.tar.gz | 3.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| auspost-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.6 kB
Release files / auspost-0.1.0.tar.gz
| Download URL | auspost-0.1.0.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aa6b1c4fadb429068b97d02cd1e9c8ecb5a7792362ac2291a2507d568ba6a7a5
|
|
BLAKE2b-256 checksum How to use checksums |
5f7798251c778c78a0667f4e2f5ba41659cbde81e093aad7c9a6d56c02bb8c33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","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 / auspost-0.1.0-py3-none-any.whl
| Download URL | auspost-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3a0fb73ad9ff50d5b9d89705716191f99f5a46aa3ccf8151caa3ce24503a2ef6
|
|
BLAKE2b-256 checksum How to use checksums |
bae5cbb87264051824cafa3299ec5513194a51e3666516614c45b7a9ccee3360
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","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 auspost 0.1.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.