# 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
```python
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
```python
from nzbn import Entity
entity: Optional[Entity] = Entity.retrieve(
api_key="your nzbn API access token",
nzbn="9429049541410",
sandbox=False # defaults to False
)
```
Raw data
{
"_id": null,
"home_page": "https://github.com/procuret/nzbn-python",
"name": "nzbn",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "library http api web payments finance nzbn new-zealand nz business business-number",
"author": "Procuret",
"author_email": "hugh@procuret.com",
"download_url": "https://files.pythonhosted.org/packages/ba/a2/046d34574abf2e565166543b884ec167a3f0a8d0c8c47e91491e369fcacd/nzbn-1.0.0.tar.gz",
"platform": null,
"description": "# New Zealand Business Number Python Library\n\nA Python library for interacting with New Zealand Business Number (NZBN)\nservices provided by the New Zealand Ministry of Business, Innovation, and\nEmployment (MBIE).\n\n## Installation\n\n```\n$ pip install nzbn\n```\n\n## Nomenclature\n\nThe MBIE NZBN API has two main \"Entity\" types, where \"Entity\" is used to refer\nto a legal person recorded in the New Zealand Business Register (NZBR). The\nfirs is included in vector results from search queries, and is called\n`SearchEntity`. The second is returned in response to requests for a specific\nNBZN, and is called `FullEntity`.\n\nThe authors of this library find referring to these as `AbbreviatedEntity`\nand `Entity` to be more natural, and therefore those names are used. You can\nalso use `SearchEntity` and `FullEntity` in your Python code, as those names\nare effectively type-aliases for `AbbreviatedEntity` and `Entity`.\n\n## Example Usage\n\n### Get a list of abbreviated entities\n\n```python\nfrom nzbn import AbbreviatedEntity\n\nentities: List[AbbreviatedEntity] = AbbreviatedEntity.retrieve_many(\n api_key=\"your nzbn API access token\",\n search_text=\"some entity name\",\n page=0, # defaults to 0\n limit=20 # per page count, defaults to 20\n)\n```\n\n### Get detailed data about an entity\n\n```python\nfrom nzbn import Entity\n\nentity: Optional[Entity] = Entity.retrieve(\n api_key=\"your nzbn API access token\",\n nzbn=\"9429049541410\",\n sandbox=False # defaults to False\n)\n```\n\n\n",
"bugtrack_url": null,
"license": "",
"summary": "New Zealand Business Number library",
"version": "1.0.0",
"project_urls": {
"About": "https://github.com/procuret/nzbn-python",
"Github Repository": "https://github.com/procuret/nzbn-python",
"Homepage": "https://github.com/procuret/nzbn-python"
},
"split_keywords": [
"library",
"http",
"api",
"web",
"payments",
"finance",
"nzbn",
"new-zealand",
"nz",
"business",
"business-number"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1313474310fe21c34a46ecb8bd8cd990f563bec6e57e2953b340edbe6f4a8a7e",
"md5": "a2661234c77da7013505b4b5f3084a85",
"sha256": "7d3a7ea820d500db21834323820a41bbbcc15d6eda7a4a9861c01fcdf2447d82"
},
"downloads": -1,
"filename": "nzbn-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a2661234c77da7013505b4b5f3084a85",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 16311,
"upload_time": "2023-06-15T03:36:49",
"upload_time_iso_8601": "2023-06-15T03:36:49.187472Z",
"url": "https://files.pythonhosted.org/packages/13/13/474310fe21c34a46ecb8bd8cd990f563bec6e57e2953b340edbe6f4a8a7e/nzbn-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "baa2046d34574abf2e565166543b884ec167a3f0a8d0c8c47e91491e369fcacd",
"md5": "599e006bdab4cff7449cd228f496246b",
"sha256": "9cb399377ad460f4dfdf58c8cc1fad71503f746f5444b1fc15eb63c1c0c71d4c"
},
"downloads": -1,
"filename": "nzbn-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "599e006bdab4cff7449cd228f496246b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 11209,
"upload_time": "2023-06-15T03:36:52",
"upload_time_iso_8601": "2023-06-15T03:36:52.110541Z",
"url": "https://files.pythonhosted.org/packages/ba/a2/046d34574abf2e565166543b884ec167a3f0a8d0c8c47e91491e369fcacd/nzbn-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-06-15 03:36:52",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "procuret",
"github_project": "nzbn-python",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "nzbn"
}