A Python port of Google's libphonenumber library for parsing, formatting, and validating international phone numbers.
phonenumbers is a Python library for parsing, formatting, and validating international phone numbers. It is a direct port of Google's libphonenumber, providing the same functionality in Python to handle phone numbers accurately across different regions and formats. It solves the problem of inconsistent phone number handling by offering a standardized, reliable solution.
Python developers building applications that require phone number input, validation, or formatting, such as contact management systems, user registration forms, or telecommunication services.
Developers choose phonenumbers because it is the definitive Python solution for phone number handling, offering feature parity with Google's industry-standard library, extensive metadata for global numbers, and a memory-efficient design with optional lightweight packages.
Python port of Google's libphonenumber
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Ensures accuracy and feature parity with the industry-standard Java library, providing reliable parsing and validation globally.
Metadata loads on-demand by region, and a lightweight phonenumberslite version is available for environments with space limitations.
Includes parsing, validation, formatting, geocoding, carrier lookup, time zone identification, and an as-you-type formatter for UI applications.
Type stub files are included for improved IDE integration and static type checking in Python 3, enhancing developer experience.
Extended features like geocoding require separate metadata packages (e.g., ~19 MiB for geocoder), which can be prohibitive for memory-sensitive deployments.
Static typing stubs are only for Python 3, while the library supports Python 2.5-2.7, leading to potential type-checking gaps in older environments.
On-demand metadata loading can cause initial pauses during parsing or validation, impacting real-time or high-throughput applications.