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

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ABN-0.4.2.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ABN-0.4.2-py2.py3-none-any.whl (4.5 kB view details)

Uploaded Python 2Python 3

File details

Details for the file ABN-0.4.2.tar.gz.

File metadata

  • Download URL: ABN-0.4.2.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.9.1 pkginfo/1.4.2 requests/2.13.0 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.6.5

File hashes

Hashes for ABN-0.4.2.tar.gz
Algorithm Hash digest
SHA256 9af108aab66e9c159a0540cad9f7d19527bbb2041954b4fb378b0234f3620502
MD5 bf510afeebd4d554f2b77c10f7055161
BLAKE2b-256 513751ac443ccfa581e44c247b9254c51a2b3c7589836f0cf75fd43fa433dc75

See more details on using hashes here.

File details

Details for the file ABN-0.4.2-py2.py3-none-any.whl.

File metadata

  • Download URL: ABN-0.4.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.9.1 pkginfo/1.4.2 requests/2.13.0 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.6.5

File hashes

Hashes for ABN-0.4.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 518391d55de01f789b620261c9d788ce747833dcd4fd48be60c75eabe282bf2b
MD5 e91e6c25c6ab279f60cf8d03ed83cd23
BLAKE2b-256 e9dc78056a603f6396cd371266e76e75f2c270fda1da55e41f687404748d7e6e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page