Reference#
Client for the unofficial NBN API.
- class nbnpy.nbn.NBN#
Bases:
objectInteracts with NBN’s unofficial API.
- Return type
None
- get_location_ids_from_address(address)#
Returns NBN location ID’s present near the given address.
Location ID looks like LOC000000000000
- Parameters
address (str) – Location address
- Returns
Locations & their ID’s the address
- Return type
dict
Examples
>>> from nbnpy.nbn import NBN >>> nbn_client = NBN() >>> location_ids = nbn_client.get_location_ids_from_address( "1 Flinders Street, Melbourne VIC" ) >>> bool(location_ids)
- get_location_ids_from_lat_long(latitude, longitude)#
Returns NBN location ID’s present near the lat & long combination.
Location ID looks like LOC000000000000
- Parameters
latitude (float) – Address latitude
longitude (float) – Address longitude
- Returns
Locations & their ID’s for addresses near the lat/long pairs
- Return type
dict
Examples
>>> from nbnpy.nbn import NBN >>> nbn_client = NBN() >>> location_ids = nbn_client.get_location_ids_from_lat_long( -37.80978345290123, 144.96518949578348 ) >>> bool(location_ids)
- location_information(location_id)#
Get connection type & details for given location.
- Parameters
location_id (str) – NBN Location ID
- Returns
Information regarding the connection details & type
- Return type
dict
Examples
>>> from nbnpy.nbn import NBN >>> nbn_client = NBN() >>> location_info = nbn_client.location_information("LOC000175860243") >>> bool(location_info)