Skip to main content

Python phone numbers made easy.

Project description

digitz

PyPI - Version PyPI - Python Version codecov PyPI - Downloads


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

digitz-0.8.0.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

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

digitz-0.8.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

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

Hashes for digitz-0.8.0.tar.gz
Algorithm Hash digest
SHA256 b9bf38b29af9d28b1da389208baf51d7b2e8ca827773a9694facbd8e5af49690
MD5 50d6d56179579f66e7b8862da6a77553
BLAKE2b-256 8314cee0b37ce53244f135372163fe6209a1e8804a8b79a1c576ab42eb401035

See more details on using hashes here.

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

Hashes for digitz-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d6b024547554efd5f98ecd43f01606a22838be8e6ea8d949ebeb97e48a77da92
MD5 3cc756e682dbd1593c7118a5c63b0b05
BLAKE2b-256 b58d406d063cc0f69408f46b471566d3e35ff4001923f14081a2a98b75b6fd88

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