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.7.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.7.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file digitz-0.7.0.tar.gz.

File metadata

  • Download URL: digitz-0.7.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.7.0.tar.gz
Algorithm Hash digest
SHA256 a341610ef2042708f5047c7fcd08224de16d2981d9d34abab1a1a875fb036186
MD5 5617fa3475b7404261f0c5fb46b9f61b
BLAKE2b-256 5fa564450c4f0d6ce2581c67c7e83313ae7ad40d9a4a4956612e1ed25c58c13d

See more details on using hashes here.

File details

Details for the file digitz-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: digitz-0.7.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.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0ad1ebb4f81595c8bed29883341d40cd7c18f3db3f81bffc77c0752364e9a3ab
MD5 87c0ade0839939b02dcdb308427c8611
BLAKE2b-256 409571bb57abdbfb7f1379fce231e2a7281a434663a16fdc6982fc2df097eeda

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