br_documents

Provide objects for brazilian documents like CPF and others, with validation


License
Other
Install
pip install br_documents==0.0.1-p1

Documentation

br_documents

Provide objects for brazilian documents like CPF, CNPJ and others, with validation

CPF

Represents a CPF. Raises a InvalidCPF error when it is invalid.

>>> from br_documents import CPF
>>> a = CPF(87234238115)
>>> a
<CPF: 87234238115>
>>> str(a) == '87234238115'
True
>>> b = CPF('29057139332')
>>> c = CPF(29057139332)
>>> d = CPF('290.571.393-32')
>>> b == c, b == d
(True, True)
>>> c.formated == '290.571.393-32'
True

CPFGenerator

A method to create CPFs.

>>> import br_documents
>>> br_documents.CPFGenerator()
08001268152