Brazil phone number formatting utils.
Project description
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']
Testing
I’ve used Behaviour Driven Development with Lettuce <http://lettuce.it/> for ease of using testing. After installing, you can simply run lettuce to run the tests.