ausnumtools


Nameausnumtools JSON
Version 1.0.0 PyPI version JSON
download
home_pageNone
SummaryA lightweight Python module that validates Australian phone numbers.
upload_time2025-07-20 03:51:56
maintainerNone
docs_urlNone
authorNone
requires_python>=3.0
licenseNone
keywords australia telephone number validation
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <!--
SPDX-FileCopyrightText: 2025 Ben Bonacci <ben at benbonacci dot com>

SPDX-License-Identifier: GPL-3.0-only
-->

# AUSnumtools

## About
AUSnumtools is a lightweight Python module that validates Australian phone numbers. 

## How it works
The Australian Communications and Media Authority (ACMA) outlines the telephone numbering plan for Australia. Specifically, it details the format of a phone number, such as which groups of digits represent an area code or a mobile carrier. This module uses a RegEx pattern of valid Australian phone number ranges and returns a Boolean ```true``` or ```false``` value.

- ```is_au_landline("0212345678")``` can be used to validate an Australian landline number
- ```is_au_mobile("0412345678")``` can be used to validate an Australian mobile number
- ```is_au_number("0812345678")``` can be used to validate an Australian landline _or_ mobile number.

However, please note that there are limitations to this type of validation:
 - It cannot validate if the phone number is available to subscribers (Designated numbers reserved by the ACMA for fictional use can be optionally blocked in the v1.0.1 release)
 - It cannot validate if the geographical code of a landline number does exist (These types of validation may be supported in a future release)
 - It cannot validate "smartnumbers" such as 1800 XXX XXX, 1300 XXX XXX, and 13 XXXX numbers (These numbers may be supported in a future release)

## Example
If ```0412 345 678``` is checked as an Australian mobile number:
> ```print(ausnumtools.is_au_mobile("0412345678"))```

The output would be ```True```, as Australian mobile numbers begin with ```04``` followed by eight digits.


If ```(09) 1234 56789``` is checked as an Australian landline number:
> ```print(ausnumtools.is_au_landline("09123456789"))```

The output would be ```False```, as the ```09``` area code does not exist in Australia and is followed by more than eight digits.

## Install
AUSnumtools is listed on the Python Package Index and can be download via Python's package manager, pip.

> ```pip install ausnumtools```

Then, the module can be imported into the desired Python script.

> ```import ausnumtools```

Alternatively, the module can be packaged and installed manually. Please consult Python's documentation for such instructions.



            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ausnumtools",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.0",
    "maintainer_email": null,
    "keywords": "australia, telephone, number, validation",
    "author": null,
    "author_email": "Ben Bonacci <ben@benbonacci.com>",
    "download_url": "https://files.pythonhosted.org/packages/8c/4b/2b9478b9cfc4f21784931b6c8329c83d0c6998fe44e0e2d786d50422f502/ausnumtools-1.0.0.tar.gz",
    "platform": null,
    "description": "<!--\nSPDX-FileCopyrightText: 2025 Ben Bonacci <ben at benbonacci dot com>\n\nSPDX-License-Identifier: GPL-3.0-only\n-->\n\n# AUSnumtools\n\n## About\nAUSnumtools is a lightweight Python module that validates Australian phone numbers. \n\n## How it works\nThe Australian Communications and Media Authority (ACMA) outlines the telephone numbering plan for Australia. Specifically, it details the format of a phone number, such as which groups of digits represent an area code or a mobile carrier. This module uses a RegEx pattern of valid Australian phone number ranges and returns a Boolean ```true``` or ```false``` value.\n\n- ```is_au_landline(\"0212345678\")``` can be used to validate an Australian landline number\n- ```is_au_mobile(\"0412345678\")``` can be used to validate an Australian mobile number\n- ```is_au_number(\"0812345678\")``` can be used to validate an Australian landline _or_ mobile number.\n\nHowever, please note that there are limitations to this type of validation:\n - It cannot validate if the phone number is available to subscribers (Designated numbers reserved by the ACMA for fictional use can be optionally blocked in the v1.0.1 release)\n - It cannot validate if the geographical code of a landline number does exist (These types of validation may be supported in a future release)\n - It cannot validate \"smartnumbers\" such as 1800 XXX XXX, 1300 XXX XXX, and 13 XXXX numbers (These numbers may be supported in a future release)\n\n## Example\nIf ```0412 345 678``` is checked as an Australian mobile number:\n> ```print(ausnumtools.is_au_mobile(\"0412345678\"))```\n\nThe output would be ```True```, as Australian mobile numbers begin with ```04``` followed by eight digits.\n\n\nIf ```(09) 1234 56789``` is checked as an Australian landline number:\n> ```print(ausnumtools.is_au_landline(\"09123456789\"))```\n\nThe output would be ```False```, as the ```09``` area code does not exist in Australia and is followed by more than eight digits.\n\n## Install\nAUSnumtools is listed on the Python Package Index and can be download via Python's package manager, pip.\n\n> ```pip install ausnumtools```\n\nThen, the module can be imported into the desired Python script.\n\n> ```import ausnumtools```\n\nAlternatively, the module can be packaged and installed manually. Please consult Python's documentation for such instructions.\n\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A lightweight Python module that validates Australian phone numbers.",
    "version": "1.0.0",
    "project_urls": {
        "Documentation": "https://code.benbonacci.com/ben/ausnumtools/wiki",
        "Issues": "https://lists.benbonacci.com/ausnumtools-bugs",
        "Repository": "https://code.benbonacci.com/ben/ausnumtools"
    },
    "split_keywords": [
        "australia",
        " telephone",
        " number",
        " validation"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "4b3125a5455803d7cd81f3e4f748f624f8e1161fe167ef8e57e39a746505afae",
                "md5": "4a2364f9bbb1970a6c3699061ad80a01",
                "sha256": "84850fd417c3b49345ab2dec2ab5e4b5e7c2569f65fa9dc1af48eded56a0a4f5"
            },
            "downloads": -1,
            "filename": "ausnumtools-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4a2364f9bbb1970a6c3699061ad80a01",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.0",
            "size": 18634,
            "upload_time": "2025-07-20T03:51:54",
            "upload_time_iso_8601": "2025-07-20T03:51:54.804469Z",
            "url": "https://files.pythonhosted.org/packages/4b/31/25a5455803d7cd81f3e4f748f624f8e1161fe167ef8e57e39a746505afae/ausnumtools-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "8c4b2b9478b9cfc4f21784931b6c8329c83d0c6998fe44e0e2d786d50422f502",
                "md5": "2905b6e64c69c46a1e52c0c36a7819c2",
                "sha256": "13296422f165087163d91a1d54db96d7f922138fa06028241f5db34bec7c2ea1"
            },
            "downloads": -1,
            "filename": "ausnumtools-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "2905b6e64c69c46a1e52c0c36a7819c2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.0",
            "size": 17363,
            "upload_time": "2025-07-20T03:51:56",
            "upload_time_iso_8601": "2025-07-20T03:51:56.344519Z",
            "url": "https://files.pythonhosted.org/packages/8c/4b/2b9478b9cfc4f21784931b6c8329c83d0c6998fe44e0e2d786d50422f502/ausnumtools-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-20 03:51:56",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "ausnumtools"
}
        
Elapsed time: 1.39749s