Brazil phone number formatting utils.
Phone Number Brazil provides a easy of formatting brazilian phone numbers. Typical usage often looks like this:
#!/usr/bin/env python from phone_numbers_br import clean_phone_number cleaned = clean_phone_number(number='33167700', ddd_default='65') # or cleaned = clean_phone_number(number='06533167700', ddd_default='65') print "Cleaned phone number:", cleaned['number'] print "Phone number type:", cleaned['type']
I’ve used Behaviour Driven Development with
for ease of using testing. After installing, you can simply run lettuce
to run the tests.