Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

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

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

This version
History Node

0.4.0

History Node

0.3.7

History Node

0.3.6

History Node

0.3.5

History Node

0.3.4

History Node

0.3.3

History Node

0.3.2

History Node

0.3.1

History Node

0.3

History Node

0.2

History Node

0.1

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
ABN-0.4.0-py2.py3-none-any.whl (4.3 kB) Copy SHA256 hash SHA256 Wheel py2.py3 May 1, 2018
ABN-0.4.0.tar.gz (3.3 kB) Copy SHA256 hash SHA256 Source None May 1, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page