Validate Australian Business Numbers.
Project description
This package validates Australian Business Numbers (ABNs) and converts Australian Company Numbers (ACNs) or Australian Registered Body Numbers (ARBNs) to ABNs.
The following example show checking of a valid and an invalid ABN:
>>> import abn
>>> abn.validate('53004085616')
'53 004 085 616'
>>> abn.validate('99999999999')
False
To calculate the ABN based on an existing ACN or ARBN:
>>> abn.acn_to_abn('004085616')
'53 004 085 616'
To run the tests or your current Python:
$ python setup.py test
To run the tests over all supported Python versions, install Tox and run:
$ tox
Release History
1.0.0 (2021-09-29)
Switch to setup.cfg.
Require Python 3.6.
0.4.2 (2018-09-06)
Bug fixes
Update CI testing to run on Python 3.5 (3.4 no longer available in testing environment).
Fix acn_to_abn for a single-digit remainder (nikicc).
0.4.0 (2018-05-01)
Improvements
Add GitLab continuous integration script to run tox tests.
Bug fixes
Treat an ABN with leading zero as invalid (Charley Peng).
0.3.7 (2016-08-03)
Improvements
Add test suite to setup.py. You can run with python setup.py test.
0.3.6 (2015-08-03)
Bug fixes
Enable tests for Python 2.7, 3.3 and 3.4.
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 ABN-1.0.0.tar.gz
.
File metadata
- Download URL: ABN-1.0.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.7.0 requests/2.25.0 setuptools/41.2.0 requests-toolbelt/0.8.0 tqdm/4.43.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4086e22cf0b46effe4e002aa3028095e6067100675271e75414da3f9875eb75 |
|
MD5 | 3f529931e3863ade38f6e4c9d453d98c |
|
BLAKE2b-256 | 92e96d4960f1f379fa8b7e21144de04db6284a3831cf7e9154b87e2af2877fb1 |
File details
Details for the file ABN-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: ABN-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.7.0 requests/2.25.0 setuptools/41.2.0 requests-toolbelt/0.8.0 tqdm/4.43.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02970ff1fb35c383ec1ed235cf038de21399df032642ee264478cc3911011aae |
|
MD5 | 9ef54b82771565579aea964f25ac2846 |
|
BLAKE2b-256 | 55b9a9c8c8cac558b60b642262be8c3c081d0911baf73acc78eb4fa5ca64f459 |