Registry / communication / id-phonenumbers

id-phonenumbers

JSON →
library0.4.0pypypi✓ verified 79d ago

Indonesian phone number parser and validator, based on Google's libphonenumber. Current version 0.4.0, with occasional releases. Parses, formats, and validates Indonesian mobile and fixed-line numbers, including area codes and operator prefixes.

pip install id-phonenumbers
INSTALL
IMPORT
SIG · ID-PHONENUMBERS
I
id-phonenumbers
communicationpythonv0.4.0
Install
1.9s avg
Import
Disk
21MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.4.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 23.1MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.9s · import 0.000s · 24MB
21MB installed
● package 21MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Number
from id_phonenumbers import Number
from id_phonenumbers import PhoneNumber
parse
from id_phonenumbers import parse
data
from id_phonenumbers import data

Parse, validate, and format an Indonesian phone number.

from id_phonenumbers import parse, is_valid_number, format_number, PhoneNumberFormat number = '+6281234567890' parsed = parse(number, 'ID') print('Valid:', is_valid_number(parsed)) print('Formatted:', format_number(parsed, PhoneNumberFormat.INTERNATIONAL))
Debug
Known issues
gotchaThe import module is named `id_phonenumbers` (underscore, not hyphen). Many users mistakenly use `id-phonenumbers` as import name, which is invalid.
fix
Use `from id_phonenumbers import ...` in your code.
affects: all
gotchaThe parse function requires the second argument `region='ID'` to ensure Indonesian number parsing. Omitting it may lead to incorrect parsing for numbers without country code.
fix
Always pass `region='ID'` or `region=None` if number includes country code but better to be explicit.
affects: all
deprecatedVersion 0.4.0 does not yet support Python 3.12+ officially (check setup.py). Using with Python 3.12+ may cause import errors due to removed APIs.
fix
Downgrade to Python 3.11 or use a virtual environment. Watch for updates.
affects: 0.4.0
Upgrade
Version history
0.4.0latest on PyPI · released May 7, 2019
Audit
Dependencies

No dependency data recorded yet.

Agent activity
24 hits · last 30 days
node
22
OpenAI (training)
1
Resources
id-phonenumbers — pip install id-phonenumbers · libregistry