New Zealand Business Number library
Project description
New Zealand Business Number Python Library
A Python library for interacting with New Zealand Business Number (NZBN) services provided by the New Zealand Ministry of Business, Innovation, and Employment (MBIE).
Installation
$ pip install nzbn
Nomenclature
The MBIE NZBN API has two main "Entity" types, where "Entity" is used to refer
to a legal person recorded in the New Zealand Business Register (NZBR). The
firs is included in vector results from search queries, and is called
SearchEntity
. The second is returned in response to requests for a specific
NBZN, and is called FullEntity
.
The authors of this library find referring to these as AbbreviatedEntity
and Entity
to be more natural, and therefore those names are used. You can
also use SearchEntity
and FullEntity
in your Python code, as those names
are effectively type-aliases for AbbreviatedEntity
and Entity
.
Example Usage
Get a list of abbreviated entities
from nzbn import AbbreviatedEntity
entities: List[AbbreviatedEntity] = AbbreviatedEntity.retrieve_many(
api_key="your nzbn API access token",
search_text="some entity name",
page=0, # defaults to 0
limit=20 # per page count, defaults to 20
)
Get detailed data about an entity
from nzbn import Entity
entity: Optional[Entity] = Entity.retrieve(
api_key="your nzbn API access token",
nzbn="9429049541410",
sandbox=False # defaults to False
)
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
File details
Details for the file nzbn-1.0.0.tar.gz
.
File metadata
- Download URL: nzbn-1.0.0.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9cb399377ad460f4dfdf58c8cc1fad71503f746f5444b1fc15eb63c1c0c71d4c |
|
MD5 | 599e006bdab4cff7449cd228f496246b |
|
BLAKE2b-256 | baa2046d34574abf2e565166543b884ec167a3f0a8d0c8c47e91491e369fcacd |
File details
Details for the file nzbn-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: nzbn-1.0.0-py3-none-any.whl
- Upload date:
- Size: 16.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d3a7ea820d500db21834323820a41bbbcc15d6eda7a4a9861c01fcdf2447d82 |
|
MD5 | a2661234c77da7013505b4b5f3084a85 |
|
BLAKE2b-256 | 1313474310fe21c34a46ecb8bd8cd990f563bec6e57e2953b340edbe6f4a8a7e |