Skip to content

Latest commit

 

History

History
50 lines (30 loc) · 500 Bytes

README.md

File metadata and controls

50 lines (30 loc) · 500 Bytes

CPF e CNPJ

Validador de CPF e CNPJ.

Install

  pip install cpf_cnpj

Usage

  from cpf_cnpj import Cpf, Cnpj
  
  cpf = Cpf('85725262502')

  cpf.format()
  '857.252.625-02'
  
  cpf.cleaning()
  '85725262502'
  
  cpf.validate()
  True
  
  cnpj = Cnpj('97373439000100')

  cnpj.format()
  '97.373.439/0001-00'
  
  cnpj.cleaning()
  '97373439000100'
  
  cnpj.validate()
  True

Tests

  cd cpf_cnpj/tests

  ./run_tests.sh