A quick module for searching and pulling suburb data from the Australia Post website.
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file auspost-0.1.0.tar.gz.
File metadata
- Download URL: auspost-0.1.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa6b1c4fadb429068b97d02cd1e9c8ecb5a7792362ac2291a2507d568ba6a7a5
|
|
| MD5 |
90f921b0c86094ff1bacc06fe9449b59
|
|
| BLAKE2b-256 |
5f7798251c778c78a0667f4e2f5ba41659cbde81e093aad7c9a6d56c02bb8c33
|
File details
Details for the file auspost-0.1.0-py3-none-any.whl.
File metadata
- Download URL: auspost-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a0fb73ad9ff50d5b9d89705716191f99f5a46aa3ccf8151caa3ce24503a2ef6
|
|
| MD5 |
edf874367540a7016b03c963d4514cef
|
|
| BLAKE2b-256 |
bae5cbb87264051824cafa3299ec5513194a51e3666516614c45b7a9ccee3360
|