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.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.0.tar.gz (3.3 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.0-py2.py3-none-any.whl (4.3 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: ABN-0.4.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ABN-0.4.0.tar.gz
Algorithm Hash digest
SHA256 eac93fc6780b16997bf6a840638078b2fe228eade907ed361d363f5a11715a24
MD5 94acfb1c1088349cc302411697a952ed
BLAKE2b-256 0497ee58de445a50f261747c1a74b658abeeb1597af80bc82c688729b1217ae4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ABN-0.4.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 410becc66e3192a7f5e89fbe18539b2b8fb961a89652d319dd189aae176f28d8
MD5 a8e7a2c047a105d0169ef6d8b914b69a
BLAKE2b-256 d3ff33676d09d0a6dc6ce89903a86c1d95cefb74fee2b6534ccc2c27a863d49d

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