Skip to main content

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.

Release files for ABN 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ABN 1.0.0
File Size Uploaded
ABN-1.0.0.tar.gz 4.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ABN 1.0.0
File Interpreter ABI Platform
ABN-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.3 kB

Release files / ABN-1.0.0.tar.gz

Download URL ABN-1.0.0.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a4086e22cf0b46effe4e002aa3028095e6067100675271e75414da3f9875eb75
BLAKE2b-256 checksum
How to use checksums
92e96d4960f1f379fa8b7e21144de04db6284a3831cf7e9154b87e2af2877fb1
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / ABN-1.0.0-py3-none-any.whl

Download URL ABN-1.0.0-py3-none-any.whl
Size 3.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
02970ff1fb35c383ec1ed235cf038de21399df032642ee264478cc3911011aae
BLAKE2b-256 checksum
How to use checksums
55b9a9c8c8cac558b60b642262be8c3c081d0911baf73acc78eb4fa5ca64f459
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.4.2

2 release files

0.4.0

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

1 release file

0.3.3

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3

1 release file

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page