> Every page of the ganymede website is listed in https://eugo.io/docs/ganymede/llms.txt.

# Phonenumbers

> Work with phonenumbers. A Python demo notebook from ganymede.

Web page: https://eugo.io/docs/ganymede/demo_notebooks/utilities/phonenumbers/
Notebook: https://eugo.io/docs/ganymede/demo_notebooks/utilities/phonenumbers/phonenumbers.ipynb (source: https://github.com/eugo-inc/ganymede/blob/main/demo_notebooks/utilities/phonenumbers.ipynb)

Description:
- Work with phonenumbers

Resources:
- [GitHub] https://github.com/daviddrysdale/python-phonenumbers

## Example 1

Parse, format and validate a phone number.

The first number uses the fictional area code 555, so it has a possible length but is not a valid number (expect `possible: True` and `valid: False`). The library's own example number for the US is valid.

```python
import phonenumbers

phone_number = "+15557543453"

x = phonenumbers.parse(phone_number, None)
print(phonenumbers.format_number(x, phonenumbers.PhoneNumberFormat.E164))
print("possible:", phonenumbers.is_possible_number(x))
print("valid:", phonenumbers.is_valid_number(x))

example = phonenumbers.example_number("US")
print(phonenumbers.format_number(example, phonenumbers.PhoneNumberFormat.INTERNATIONAL))
print("valid:", phonenumbers.is_valid_number(example))
```
