I want to use python phonenumbers to get the number of digits that mobile phones have to have for each country.
I'm importing the phonenumbers/libphonenumber library.
I tried fetching the metadata with no success. Then I tried fetching an example number to then deduce it from there. It looks like I'm not being able to give with the adequate attributes or classes to fetch these. Do you know which are the attributes or classes I need to look for in order to get to this information?
country = phonenumbers.region_code_for_country_code(country_code)
metadata = phonenumbers.metadata_for_region(country)
or
region_code = phonenumbers.region_code_for_country_code(country_code)
example_number = phonenumbers.get_example_number_for_type(region_code, phonenumbers.PhoneNumberType.MOBILE)
I'm open to using other libraries too.