Python phone numbers made easy.
Project description
digitz
What is it?
digitz is a phone number parsing, validating, and formatting library built on top of python-phonenumbers. The goal of digitz is to bring a modern Python developer experience to working with phone numbers.
Table of Contents
Getting Started
Installing
Install digitz using pip.
pip install digitz
Documentation
The official documentation can be found here
Running the tests
It is recommended to run the tests using hatch.
hatch test
License
digitz is distributed under the terms of the MIT license.
Example Usage
>>> from digitz import PhoneNumber
>>> num = PhoneNumber.parse("+1 (201) 555-0123")
>>> num.region_code
'US'
>>> num.is_possible
True
>>> num.national_destination_code
'201'
>>> num.to_e164()
'+12015550123'
>>> num.to_national()
'(201) 555-0123'
>>> num.to_international()
'+1 201-555-0123'
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file digitz-0.8.0.tar.gz.
File metadata
- Download URL: digitz-0.8.0.tar.gz
- Upload date:
- Size: 14.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9bf38b29af9d28b1da389208baf51d7b2e8ca827773a9694facbd8e5af49690
|
|
| MD5 |
50d6d56179579f66e7b8862da6a77553
|
|
| BLAKE2b-256 |
8314cee0b37ce53244f135372163fe6209a1e8804a8b79a1c576ab42eb401035
|
File details
Details for the file digitz-0.8.0-py3-none-any.whl.
File metadata
- Download URL: digitz-0.8.0-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6b024547554efd5f98ecd43f01606a22838be8e6ea8d949ebeb97e48a77da92
|
|
| MD5 |
3cc756e682dbd1593c7118a5c63b0b05
|
|
| BLAKE2b-256 |
b58d406d063cc0f69408f46b471566d3e35ff4001923f14081a2a98b75b6fd88
|