# statsnz
A collection of functions to enable ease of use of the various Stats New Zealand APIs, in python.
Installion:
pip install statsnz
Examples:
Geocoding:
To get the region with a set of coordinates:
from statsnz import statsnz
region_example = statsnz(“YOUR_API_KEY”).get_region(-41.242,172.323)
Or TLA:
region_example = statsnz(“YOUR_API_KEY”).get_tla(-41.242,172.323)
Or DHB:
region_example = statsnz(“YOUR_API_KEY”).get_dhb(-41.242,172.323)
Or a custom layer:
region_example = statsnz(“YOUR_API_KEY”).get_custom(-41.242,172.323)
Odata API:
from statsnz import statsnz
statsnz = statsnz(“YOUR_API_KEY”) service = ‘https://api.stats.govt.nz/opendata/v1’ endpoint = ‘EmploymentIndicators’ entity = ‘Resources’ query_option = “10” ##Top 10 records
Observations = statsnz.get_odata_api(service, endpoint, entity, query_option)
Metadata
Release files for statsnz 1.0.7
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 |
|---|---|---|---|---|
| statsnz-1.0.7.tar.gz | 3.1 kB | Without provenance | Details for statsnz-1.0.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| statsnz-1.0.7-py3-none-any.whl | Python 3 | none | any | Details for statsnz-1.0.7-py3-none-any.whl |
Total release size: 6.3 kB
Release files / statsnz-1.0.7.tar.gz
| Download URL | statsnz-1.0.7.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1895257bd8b55f368e68b59d9671e1e57d6141537cad46515aceca766d98cb32
|
|
BLAKE2b-256 checksum How to use checksums |
caec336789eb127457e2c5ef0311e89f8547720020ac5339147a78d78f1ff31d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8
|
Release files / statsnz-1.0.7-py3-none-any.whl
| Download URL | statsnz-1.0.7-py3-none-any.whl |
|---|---|
| Size | 3.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5dbc2663e6ef47a23e9c2e92ad53d181f045de3dfca1e09cf80ed8dad9f4df1a
|
|
BLAKE2b-256 checksum How to use checksums |
3a97daf15d70b57a68f8d6d6be0a9224507aa9678dc03f2f018e2f64b8e3d979
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8
|
Security for statsnz 1.0.7
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.