Analysis updated 2026-07-03
Validate and reformat phone numbers collected from a web form, handling numbers from any country in a consistent E.164 format for database storage.
Scan a block of text or customer notes to automatically extract all phone numbers mentioned, regardless of format or country.
Look up the geographic region, carrier, and time zone for a phone number to enrich user profile data.
| daviddrysdale/python-phonenumbers | django-haystack/django-haystack | lightly-ai/lightly | |
|---|---|---|---|
| Stars | 3,737 | 3,738 | 3,738 |
| Language | Python | Python | Python |
| Setup difficulty | easy | moderate | hard |
| Complexity | 2/5 | 3/5 | 4/5 |
| Audience | developer | developer | researcher |
Figures from each repo's GitHub metadata at analysis time.
Geographic, carrier, and timezone data are in separate optional packages, install only the ones your project needs to keep the footprint small.
This is a Python library for working with phone numbers from anywhere in the world. It is a port, meaning a faithful translation into Python, of Google's libphonenumber, which is the same system Google uses internally. The library knows the rules for phone number formats in every country: how many digits they have, what prefixes they use, which number ranges are actually assigned to real carriers, and how numbers should be displayed. The core workflow is: take a phone number as a string, tell the library what country it belongs to (or let it figure that out from an international prefix), and get back a structured object you can work with. From there you can check whether the number is plausible, whether it is actually valid in the real world, and format it in different ways. Common formats include the local national format used within a country, the international format with the country code prefix, and the E.164 format which is a standardized compact form used in databases and APIs. Beyond parsing and formatting, the library supports several related tasks. It can scan a block of text and find all phone numbers hidden inside a sentence or paragraph. It can report the geographic region associated with a number, like a city or country, in multiple languages. For mobile numbers in countries where this data is available, it can identify the carrier that originally issued the number. It can also return the time zone or time zones that correspond to a given number. Memory is handled thoughtfully: the base metadata loads only the country data it actually needs when your code first uses a particular region, rather than loading everything at once. Geographic, carrier, and timezone data are in separate optional packages so you include only what your project actually uses. Installation is a single pip command.
A Python library for parsing, validating, and formatting phone numbers from any country, based on Google's libphonenumber. Supports E.164 format, carrier lookup, geographic region detection, and text scanning.
Mainly Python. The stack also includes Python, pip.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.