NBN-Py
This package provides an unofficial wrapper of the National Broadband Network's (NBN) API. It allows you to programatically lookup address's and examine connection details such as the connection type (FTTP, HFC, etc), service type, connection status and more.
Disclaimer: This project is not affiliated with the NBN.
Installation
Install nbnpy from the Python Package Index:
$ pip install nbnpy
Requirements
- Python 3.8+
Usage
This example gets the LocationID for an address then looks up the NBN connection details for it.
import pprint
from nbnpy.nbn import NBN
nbn_client = NBN()
location_ids = nbn_client.get_location_ids_from_address("1 Flinders Street, Melbourne VIC")
# The "get_location_ids_*" methods return a list of nearby locations
# For the purpose of this example, the first result will suffice
location_id = location_ids["suggestions"][0]["id"]
location_info = nbn_client.location_information(location_id)
pprint.pprint(location_info)
Location Info Output
{
"addressDetail": {
"TC2SME": true,
"address1": "Unit 1 32 Flinders St",
"address2": "Melbourne VIC 3000 Australia",
"altReasonCode": "NULL_NA",
"cbdpricing": true,
"coatChangeReason": "",
"disconnectionDate": "Sep 2020",
"disconnectionStatus": "PAST",
"ee": true,
"eec": 1,
"formattedAddress": "UNIT 1 32 FLINDERS ST MELBOURNE VIC 3000 Australia",
"frustrated": false,
"id": "LOC000175010671",
"latitude": -37.81540657,
"longitude": 144.97344433,
"reasonCode": "FTTC_SA",
"serviceStatus": "available",
"serviceType": "Fixed line",
"speedTierAvailability": true,
"techFlip": "",
"techType": "FTTC",
"wp1DisconnectionDate": "11 September 2020",
"wp1DisconnectionStatus": "PAST",
"wp2DisconnectionDate": "11 September 2020",
"wp2DisconnectionStatus": "PAST",
"wp3DisconnectionDate": "11 September 2020",
"wp3DisconnectionStatus": "PAST",
"wp4DisconnectionDate": "11 September 2020",
"wp4DisconnectionStatus": "PAST",
"zeroBuildCost": true
},
"servingArea": {
"csaId": "CSA300000010316",
"description": "Exhibition",
"rfsMessage": "Sep 2018",
"serviceCategory": "brownfields",
"serviceStatus": "available",
"serviceType": "Fixed line",
"techType": "FTTC"
},
"timestamp": 1654656817504
}
Building the Project
This package uses poetry and nox for package management and building.
If nox is not already installed, install it:
$ pip install nox
Run everything including tests and documentation building
$ nox
# Or to run a specific stage:
$ nox -s <stage name>, eg
$ nox -s tests
Issues
If you encounter any problems, please file an issue along with a detailed description.
Metadata
Release files for nbnpy 0.5.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 | Actions |
|---|---|---|---|---|
| nbnpy-0.5.0.tar.gz | 5.1 kB | Without provenance | Details for nbnpy-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nbnpy-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for nbnpy-0.5.0-py3-none-any.whl |
Total release size: 9.8 kB
Release files / nbnpy-0.5.0.tar.gz
| Download URL | nbnpy-0.5.0.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1e23c3e4d56ac102f20500c722c045b3e83baf85b34a539dede229dbe8eba15b
|
|
BLAKE2b-256 checksum How to use checksums |
4a532460932084b5a822ac5a89ab082fc4eed186c37013ad8596b52f7ed49058
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.8.12 Linux/5.13.0-1025-azure
|
Release files / nbnpy-0.5.0-py3-none-any.whl
| Download URL | nbnpy-0.5.0-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
38fdec35b5db260d842b0b97887fd88693550ea73964d89a48183e6f51bb26d3
|
|
BLAKE2b-256 checksum How to use checksums |
1a31fc18216d85f68303c3d455eea9f79566a62be4d0efd7f32f743959c27c21
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.8.12 Linux/5.13.0-1025-azure
|
Security for nbnpy 0.5.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.