Biblioteca Python
O que a biblioteca Python implementa do contrato compartilhado, o que falha e o que fazer agora.
- Repositório
- github.com/brazilian-utils/python
ba0a96b - Pacote
- brutils
Instalação
pip install brutilsPython implementa 40 das 182 funções do contrato e 17.5% das funções principais. 500 casos compartilhados passam e 493 falham. 7 funções têm assinatura diferente da do contrato.
Comparação com as outras bibliotecas
| Biblioteca | Funções principais | Implementadas | Casos que passam |
|---|---|---|---|
| JavaScript, biblioteca | 100% | 180/182 | 5033 |
| Rust, biblioteca | 37.5% | 132/182 | 1732 |
| Go, biblioteca | 35% | 136/182 | 2081 |
| .NET, biblioteca | 32.5% | 133/182 | 2194 |
| Ruby, biblioteca | 27.5% | 133/182 | 2589 |
| Python | 17.5% | 40/182 | 500 |
| Erlang, biblioteca | 12.5% | 29/182 | 340 |
O que fazer agora
A lista começa pelas funções que falham, depois assinaturas erradas, depois funções principais que faltam, depois o resto. Em cada grupo, vêm primeiro as funções implementadas por mais bibliotecas, porque há mais código de onde portar. Cada item também é uma issue no repositório da biblioteca.
31 funções falham
Ver as 31 funções que falham
| Função | Situação | Detalhes | Implementada por |
|---|---|---|---|
CEP: Formatarcep.format (principal) | falha | 13 casos falham | 6: JavaScript, Go, Ruby, Rust, .NET, Erlang |
CEP: Validarcep.isValid (principal) | falha | 10 casos falham | 6: JavaScript, Go, Ruby, Rust, .NET, Erlang |
CNH: Validarcnh.isValid (principal) | falha | 5 casos falham | 6: JavaScript, Go, Ruby, Rust, .NET, Erlang |
CNPJ: Formatarcnpj.format (principal) | falha | 36 casos falham | 6: JavaScript, Go, Ruby, Rust, .NET, Erlang |
CNPJ: Validarcnpj.isValid (principal) | falha | 4 casos falham | 6: JavaScript, Go, Ruby, Rust, .NET, Erlang |
CPF: Formatarcpf.format (principal) | falha | 28 casos falham | 6: JavaScript, Go, Ruby, Rust, .NET, Erlang |
CPF: Validarcpf.isValid (principal) | falha | 5 casos falham | 6: JavaScript, Go, Ruby, Rust, .NET, Erlang |
Placa de veículo: Convert to mercosullicensePlate.convertToMercosul (principal) | falha | 8 casos falham | 6: JavaScript, Go, Ruby, Rust, .NET, Erlang |
Placa de veículo: FormatarlicensePlate.format (principal) | falha | 17 casos falham | 6: JavaScript, Go, Ruby, Rust, .NET, Erlang |
Placa de veículo: GerarlicensePlate.generate (principal) | falha | 4 casos falham | 6: JavaScript, Go, Ruby, Rust, .NET, Erlang |
Placa de veículo: ValidarlicensePlate.isValid (principal) | falha | 10 casos falham | 6: JavaScript, Go, Ruby, Rust, .NET, Erlang |
Passaporte: Formatarpassport.format | falha | 17 casos falham | 6: JavaScript, Go, Ruby, Rust, .NET, Erlang |
Passaporte: Validarpassport.isValid | falha | 4 casos falham | 6: JavaScript, Go, Ruby, Rust, .NET, Erlang |
Telefone: Formatarphone.format (principal) | falha | 15 casos falham | 6: JavaScript, Go, Ruby, Rust, .NET, Erlang |
Telefone: Gerarphone.generate (principal) | falha | 1 caso falha | 6: JavaScript, Go, Ruby, Rust, .NET, Erlang |
PIS/PASEP: Formatarpis.format (principal) | falha | 54 casos falham | 6: JavaScript, Go, Ruby, Rust, .NET, Erlang |
PIS/PASEP: Validarpis.isValid (principal) | falha | 6 casos falham | 6: JavaScript, Go, Ruby, Rust, .NET, Erlang |
RENAVAM: Validarrenavam.isValid (principal) | falha | 7 casos falham | 6: JavaScript, Go, Ruby, Rust, .NET, Erlang |
Título de eleitor: FormatarvoterId.format (principal) | falha | 24 casos falham | 6: JavaScript, Go, Ruby, Rust, .NET, Erlang |
Título de eleitor: ValidarvoterId.isValid (principal) | falha | 18 casos falham | 6: JavaScript, Go, Ruby, Rust, .NET, Erlang |
CNPJ: Gerarcnpj.generate (principal) | falha | 5 casos falham | 5: JavaScript, Go, Ruby, .NET, Erlang |
Moeda (real): Escrever por extensocurrency.convertToWords (principal) | falha | 31 casos falham | 5: JavaScript, Go, Ruby, Rust, .NET |
Moeda (real): Formatarcurrency.format (principal) | falha | 37 casos falham | 5: JavaScript, Go, Ruby, Rust, .NET |
Datas e feriados: Escrever por extensodate.convertToWords | falha | 32 casos falham | 5: JavaScript, Go, Ruby, Rust, .NET |
E-mail: Validaremail.isValid (principal) | falha | 13 casos falham | 5: JavaScript, Go, Ruby, Rust, .NET |
Natureza jurídica: ValidarlegalNature.isValid (principal) | falha | 22 casos falham | 5: JavaScript, Go, Ruby, Rust, .NET |
Natureza jurídica: ListarlegalNature.list (principal) | falha | 1 caso falha | 5: JavaScript, Go, Ruby, Rust, .NET |
Processo judicial: FormatarlegalProcess.format (principal) | falha | 25 casos falham | 5: JavaScript, Go, Ruby, Rust, .NET |
Processo judicial: GerarlegalProcess.generate (principal) | falha | 6 casos falham | 5: JavaScript, Go, Ruby, Rust, .NET |
Processo judicial: ValidarlegalProcess.isValid (principal) | falha | 25 casos falham | 5: JavaScript, Go, Ruby, Rust, .NET |
Estados (UF): Get code by namestate.getCodeByName | falha | 1 caso falha | 5: JavaScript, Go, Ruby, Rust, .NET |
7 funções têm assinatura diferente
| Função | Situação | Detalhes | Implementada por |
|---|---|---|---|
Telefone: Validarphone.isValid (principal) | assinatura diferente | parameter "options.accept": expects ("mobile" | "landline" | "service")[], lib takes string | 6: JavaScript, Go, Ruby, Rust, .NET, Erlang |
CEP: Get address infocep.getAddressInfo (principal) | assinatura diferente | parameter "options.providers": expects CepProvider[], lib takes boolean | 5: JavaScript, Go, Ruby, Rust, .NET |
Datas e feriados: Is holidaydate.isHoliday (principal) | assinatura diferente | parameter "target_date" (contract "options.targetDate") is required, contract makes it optional | 5: JavaScript, Go, Ruby, Rust, .NET |
Municípios: Get by codemunicipality.getByCode | assinatura diferente | return: returns string[]?, contract says Municipality? | 5: JavaScript, Go, Ruby, Rust, .NET |
CEP: Get info by addresscep.getInfoByAddress (principal) | assinatura diferente | requires 3 argument(s), contract passes at most 1 (getCepInfoByAddress(params: GetCepInfoByAddressParams) -> CepAddressInfo[]). parameter "params": expects GetCepInfoByAddressParams, lib takes string | 4: JavaScript, Go, Rust, .NET |
Estados (UF): Get by ibge codestate.getByIbgeCode | assinatura diferente | return: returns string?, contract says State? | 4: JavaScript, Go, Ruby, .NET |
Municípios: Get code by namemunicipality.getCodeByName (principal) | assinatura diferente | parameter "municipality_name" (contract "params.municipalityName") is required, contract makes it optional. parameter "uf" (contract "params.stateCode") is required, contract makes it optional | 1: JavaScript |
135 funções estão faltando
Ver as 135 funções que faltam
| Função | Situação | Implementada por |
|---|---|---|
Boleto: Validarboleto.isValid (principal) | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
DDD: List by stateareaCode.listByState | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Bancos: Get by codebank.getByCode | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Bancos: Get by ispbbank.getByIspb | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Bancos: Listarbank.list | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Conta bancária: ValidarbankAccount.isValid | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Boleto: Formatarboleto.format | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Boleto: Gerarboleto.generate | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Boleto: Interpretarboleto.parse | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
CAEPF: Formatarcaepf.format | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
CAEPF: Validarcaepf.isValid | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
CAEPF: Interpretarcaepf.parse | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
CBO: Consultarcbo.get | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
CBO: Validarcbo.isValid | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
CBO: Interpretarcbo.parse | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
CEI: Formatarcei.format | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
CEI: Validarcei.isValid | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
CEI: Interpretarcei.parse | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
CEP: Interpretarcep.parse | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Certidão: Formatarcertidao.format | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Certidão: Decodificarcertidao.getInfo | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Certidão: Interpretarcertidao.parse | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
CFOP: Consultarcfop.get | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
CFOP: Validarcfop.isValid | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
CFOP: Interpretarcfop.parse | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
CNAE: Formatarcnae.format | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
CNAE: Consultarcnae.get | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
CNAE: Validarcnae.isValid | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
CNAE: Interpretarcnae.parse | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
CNH: Formatarcnh.format | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
CNH: Gerarcnh.generate | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
CNH: Interpretarcnh.parse | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
CNO: Formatarcno.format | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
CNO: Validarcno.isValid | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
CNO: Interpretarcno.parse | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
CNPJ: Interpretarcnpj.parse | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
CNS (Cartão SUS): Formatarcns.format | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
CNS (Cartão SUS): Validarcns.isValid | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
CNS (Cartão SUS): Interpretarcns.parse | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
CPF: Interpretarcpf.parse | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Cartão de pagamento: ValidarcreditCard.isValid | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
CSOSN: Validarcsosn.isValid | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
CST: Validarcst.isValid | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Moeda (real): Interpretarcurrency.parse | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Datas e feriados: Difference in business daysdate.differenceInBusinessDays | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Datas e feriados: Is business daydate.isBusinessDay | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
IBAN: Formatariban.format | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
IBAN: Decodificariban.getInfo | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
IBAN: Validariban.isValid | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
IBAN: Interpretariban.parse | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Natureza jurídica: FormatarlegalNature.format | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Natureza jurídica: GerarlegalNature.generate | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Natureza jurídica: ConsultarlegalNature.get | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Natureza jurídica: List by categorylegalNature.listByCategory | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Natureza jurídica: InterpretarlegalNature.parse | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Processo judicial: InterpretarlegalProcess.parse | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Placa de veículo: InterpretarlicensePlate.parse | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Municípios: Listarmunicipality.list | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
NCM: Formatarncm.format | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
NCM: Validarncm.isValid | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
NCM: Interpretarncm.parse | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Chave de acesso NF-e: FormatarnfeKey.format | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Chave de acesso NF-e: DecodificarnfeKey.getInfo | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Chave de acesso NF-e: ValidarnfeKey.isValid | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Chave de acesso NF-e: InterpretarnfeKey.parse | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Números por extenso: Escrever por extensonumber.convertToWords | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Passaporte: Interpretarpassport.parse | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Telefone: Is valid landlinephone.isValidLandline | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Telefone: Is valid mobilephone.isValidMobile | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Telefone: Is valid servicephone.isValidService | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Telefone: Interpretarphone.parse | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
PIS/PASEP: Interpretarpis.parse | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Chave Pix: DecodificarpixKey.getInfo | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Chave Pix: ValidarpixKey.isValid | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Pix copia e cola (BR Code): DecodificarpixPayload.getInfo | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Pix copia e cola (BR Code): ValidarpixPayload.isValid | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Registro profissional: ValidarregistroProfissional.isValid | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
RENAVAM: Gerarrenavam.generate | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Estados (UF): Get timezonestate.getTimezone | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Estados (UF): Listarstate.list | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Texto: Capitalizetext.capitalize | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Texto: Remove accentstext.removeAccents | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Chassi (VIN): Validarvin.isValid | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
Título de eleitor: InterpretarvoterId.parse | ausente | 5: JavaScript, Go, Ruby, Rust, .NET |
DDD: DecodificarareaCode.getInfo | ausente | 4: JavaScript, Go, Ruby, .NET |
Certidão: Validarcertidao.isValid | ausente | 4: JavaScript, Go, Ruby, Rust |
Datas e feriados: Get holidaysdate.getHolidays | ausente | 4: JavaScript, Go, Rust, .NET |
Inscrição estadual: Validarie.isValid | ausente | 4: JavaScript, Go, Rust, .NET |
Pix copia e cola (BR Code): GerarpixPayload.generate | ausente | 4: JavaScript, Go, Ruby, Rust |
Boleto: Decodificarboleto.getInfo | ausente | 3: JavaScript, Go, Ruby |
DDD: Get by municipality codeareaCode.getByMunicipalityCode | ausente | 1: JavaScript |
CBO: Formatarcbo.format | ausente | 1: JavaScript |
CEP: Get statecep.getState | ausente | 1: JavaScript |
CEST: Formatarcest.format | ausente | 1: JavaScript |
CEST: Consultarcest.get | ausente | 1: JavaScript |
CEST: Validarcest.isValid | ausente | 1: JavaScript |
CEST: Interpretarcest.parse | ausente | 1: JavaScript |
CFOP: Formatarcfop.format | ausente | 1: JavaScript |
CID-10: Formatarcid10.format | ausente | 1: JavaScript |
CID-10: Consultarcid10.get | ausente | 1: JavaScript |
CID-10: Validarcid10.isValid | ausente | 1: JavaScript |
CID-10: Interpretarcid10.parse | ausente | 1: JavaScript |
cClassTrib: ConsultarclassTrib.get | ausente | 1: JavaScript |
cClassTrib: ValidarclassTrib.isValid | ausente | 1: JavaScript |
CNPJ: Decodificarcnpj.getInfo | ausente | 1: JavaScript |
CPF: Decodificarcpf.getInfo | ausente | 1: JavaScript |
CST IBS/CBS: ConsultarcstIbsCbs.get | ausente | 1: JavaScript |
CST IBS/CBS: ValidarcstIbsCbs.isValid | ausente | 1: JavaScript |
Datas e feriados: Add business daysdate.addBusinessDays | ausente | 1: JavaScript |
Datas e feriados: Sub business daysdate.subBusinessDays | ausente | 1: JavaScript |
GTIN (EAN/UPC): Decodificargtin.getInfo | ausente | 1: JavaScript |
GTIN (EAN/UPC): Validargtin.isValid | ausente | 1: JavaScript |
ISBN: Formatarisbn.format | ausente | 1: JavaScript |
ISBN: Decodificarisbn.getInfo | ausente | 1: JavaScript |
ISBN: Validarisbn.isValid | ausente | 1: JavaScript |
ISBN: Interpretarisbn.parse | ausente | 1: JavaScript |
Processo judicial: DecodificarlegalProcess.getInfo | ausente | 1: JavaScript |
Municípios: List by area codemunicipality.listByAreaCode | ausente | 1: JavaScript |
NBS: Formatarnbs.format | ausente | 1: JavaScript |
NBS: Consultarnbs.get | ausente | 1: JavaScript |
NBS: Validarnbs.isValid | ausente | 1: JavaScript |
NBS: Interpretarnbs.parse | ausente | 1: JavaScript |
Chave de acesso NFS-e: DecodificarnfseKey.getInfo | ausente | 1: JavaScript |
Chave de acesso NFS-e: ValidarnfseKey.isValid | ausente | 1: JavaScript |
Chave de acesso NFS-e: InterpretarnfseKey.parse | ausente | 1: JavaScript |
Lista de serviços (LC 116): ConsultarserviceItem.get | ausente | 1: JavaScript |
Lista de serviços (LC 116): ValidarserviceItem.isValid | ausente | 1: JavaScript |
Estados (UF): Get capitalstate.getCapital | ausente | 1: JavaScript |
Estados (UF): Get regionsstate.getRegions | ausente | 1: JavaScript |
Estados (UF): List by regionstate.listByRegion | ausente | 1: JavaScript |
Inscrição SUFRAMA: Formatarsuframa.format | ausente | 1: JavaScript |
Inscrição SUFRAMA: Gerarsuframa.generate | ausente | 1: JavaScript |
Inscrição SUFRAMA: Validarsuframa.isValid | ausente | 1: JavaScript |
Inscrição SUFRAMA: Interpretarsuframa.parse | ausente | 1: JavaScript |
Título de eleitor: DecodificarvoterId.getInfo | ausente | 1: JavaScript |
Casos que falham
Ver os 493 casos que falham
| Caso | Esperado | Obtido |
|---|---|---|
cep.format#[""] | "" | expected "", got null |
cep.format#["0"] | "0" | expected "0", got null |
cep.format#["01"] | "01" | expected "01", got null |
cep.format#["010"] | "010" | expected "010", got null |
cep.format#["0100"] | "0100" | expected "0100", got null |
cep.format#["01001"] | "01001" | expected "01001", got null |
cep.format#["010010"] | "01001-0" | expected "01001-0", got null |
cep.format#["0100100"] | "01001-00" | expected "01001-00", got null |
cep.format#["01001000000000"] | "01001-000" | expected "01001-000", got null |
cep.format#["a0.10cr01?00#ab0"] | "01001-000" | expected "01001-000", got null |
cep.format#negative-number | "" | expected "", got null |
cep.format#fractional-number | "" | expected "", got null |
cep.format#unsafe-number | "" | expected "", got null |
cep.isValid#["01310-100"] | true | false |
cep.isValid#[20040020] | true | false |
cep.isValid#[" 01310-100 "] | true | false |
cep.isValid#["92.500-000"] | true | false |
cep.isValid#["013 10 100"] | true | false |
cep.isValid#["01310.100"] | true | false |
cep.isValid#["01310/100"] | true | false |
cep.isValid#["0131/0100"] | true | false |
cep.isValid#["--0131 0100"] | true | false |
cep.isValid#["01310/100/"] | true | false |
cnh.isValid#valid-sample | true | false |
cnh.isValid#["00000009309"] | true | false |
cnh.isValid#["ab00000000119"] | false | true |
cnh.isValid#["00000000119ab"] | false | true |
cnh.isValid#["000000001_19"] | false | true |
cnpj.format#[""] | "" | expected "", got null |
cnpj.format#["4"] | "4" | expected "4", got null |
cnpj.format#["46"] | "46" | expected "46", got null |
cnpj.format#["468"] | "46.8" | expected "46.8", got null |
cnpj.format#["4684"] | "46.84" | expected "46.84", got null |
cnpj.format#["46843"] | "46.843" | expected "46.843", got null |
cnpj.format#["468434"] | "46.843.4" | expected "46.843.4", got null |
cnpj.format#["4684348"] | "46.843.48" | expected "46.843.48", got null |
cnpj.format#["46843485"] | "46.843.485" | expected "46.843.485", got null |
cnpj.format#["468434850"] | "46.843.485/0" | expected "46.843.485/0", got null |
cnpj.format#["4684348500"] | "46.843.485/00" | expected "46.843.485/00", got null |
cnpj.format#["46843485000"] | "46.843.485/000" | expected "46.843.485/000", got null |
cnpj.format#["468434850001"] | "46.843.485/0001" | expected "46.843.485/0001", got null |
cnpj.format#["4684348500018"] | "46.843.485/0001-8" | expected "46.843.485/0001-8", got null |
cnpj.format#[4] | "4" | expected "4", got null |
cnpj.format#[46] | "46" | expected "46", got null |
cnpj.format#[468] | "46.8" | expected "46.8", got null |
cnpj.format#[4684] | "46.84" | expected "46.84", got null |
cnpj.format#[46843] | "46.843" | expected "46.843", got null |
cnpj.format#[468434] | "46.843.4" | expected "46.843.4", got null |
cnpj.format#[4684348] | "46.843.48" | expected "46.843.48", got null |
cnpj.format#[46843485] | "46.843.485" | expected "46.843.485", got null |
cnpj.format#[468434850] | "46.843.485/0" | expected "46.843.485/0", got null |
cnpj.format#[4684348500] | "46.843.485/00" | expected "46.843.485/00", got null |
cnpj.format#[46843485000] | "46.843.485/000" | expected "46.843.485/000", got null |
cnpj.format#[468434850001] | "46.843.485/0001" | expected "46.843.485/0001", got null |
cnpj.format#[4684348500018] | "46.843.485/0001-8" | expected "46.843.485/0001-8", got null |
cnpj.format#[46843485000186] | "46.843.485/0001-86" | expected "46.843.485/0001-86", got null |
cnpj.format#["468434850001860000000000"] | "46.843.485/0001-86" | expected "46.843.485/0001-86", got null |
cnpj.format#["46.?ABC843.485/0001-86abc"] | "46.843.485/0001-86" | expected "46.843.485/0001-86", got null |
cnpj.format#[-11222333000181] | "" | expected "", got null |
cnpj.format#[-1] | "" | expected "", got null |
cnpj.format#[1.5] | "" | expected "", got null |
cnpj.format#[9007199254740992] | "" | expected "", got null |
cnpj.format#["24522200000174"] | "24.522.200/0001-74" | expected "24.522.200/0001-74", got null |
cnpj.format#["12OUT345000199"] | "12.345.000/199" | expected "12.345.000/199", got null |
cnpj.generate#given-branch | null | expected /^[0-9]{8}0003[0-9]{2}$/, threw: TypeError: int() argument must be a string, a bytes-like object or a real number, not 'dict' |
cnpj.generate#[{"version":2,"branch":1}] | null | expected /^[0-9A-Z]{8}0001[0-9]{2}$/, threw: TypeError: int() argument must be a string, a bytes-like object or a real number, not 'dict' |
cnpj.generate#[{"branch":0}] | null | expected /^[0-9]{14}$/, threw: TypeError: int() argument must be a string, a bytes-like object or a real number, not 'dict' |
cnpj.generate#[{"branch":9999}] | null | expected /^[0-9]{8}9999[0-9]{2}$/, threw: TypeError: int() argument must be a string, a bytes-like object or a real number, not 'dict' |
cnpj.generate#[{"branch":42}] | null | expected /^[0-9]{8}0042[0-9]{2}$/, threw: TypeError: int() argument must be a string, a bytes-like object or a real number, not 'dict' |
cnpj.isValid#["Q0SLFMBD7VX439"] | false | true |
cnpj.isValid#["60.391.947/0001-00"] | true | false |
cnpj.isValid#["11 222 333 0001 81"] | true | false |
cnpj.isValid#[" 13723705000189 "] | true | false |
cpf.format#[""] | "" | expected "", got null |
cpf.format#["9"] | "9" | expected "9", got null |
cpf.format#["94"] | "94" | expected "94", got null |
cpf.format#["943"] | "943" | expected "943", got null |
cpf.format#["9438"] | "943.8" | expected "943.8", got null |
cpf.format#["94389"] | "943.89" | expected "943.89", got null |
cpf.format#["943895"] | "943.895" | expected "943.895", got null |
cpf.format#["9438957"] | "943.895.7" | expected "943.895.7", got null |
cpf.format#["94389575"] | "943.895.75" | expected "943.895.75", got null |
cpf.format#["943895751"] | "943.895.751" | expected "943.895.751", got null |
cpf.format#["9438957510"] | "943.895.751-0" | expected "943.895.751-0", got null |
cpf.format#[9] | "9" | expected "9", got null |
cpf.format#[94] | "94" | expected "94", got null |
cpf.format#[943] | "943" | expected "943", got null |
cpf.format#[9438] | "943.8" | expected "943.8", got null |
cpf.format#[94389] | "943.89" | expected "943.89", got null |
cpf.format#[943895] | "943.895" | expected "943.895", got null |
cpf.format#[9438957] | "943.895.7" | expected "943.895.7", got null |
cpf.format#[94389575] | "943.895.75" | expected "943.895.75", got null |
cpf.format#[943895751] | "943.895.751" | expected "943.895.751", got null |
cpf.format#[9438957510] | "943.895.751-0" | expected "943.895.751-0", got null |
cpf.format#[94389575104] | "943.895.751-04" | expected "943.895.751-04", got null |
cpf.format#["94389575104000000"] | "943.895.751-04" | expected "943.895.751-04", got null |
cpf.format#["943.?ABC895.751-04abc"] | "943.895.751-04" | expected "943.895.751-04", got null |
cpf.format#[123456789.09] | "" | expected "", got null |
cpf.format#[-1] | "" | expected "", got null |
cpf.format#[1.5] | "" | expected "", got null |
cpf.format#[9007199254740992] | "" | expected "", got null |
cpf.isValid#["962.718.458-60"] | true | false |
cpf.isValid#["123 456 789 09"] | true | false |
cpf.isValid#[" 12345678909"] | true | false |
cpf.isValid#["12345678909 "] | true | false |
cpf.isValid#["280.012.389-38"] | true | false |
currency.convertToWords#zero | "zero reais" | "Zero reais" |
currency.convertToWords#one-cent | "um centavo" | "Um centavo" |
currency.convertToWords#one-real | "um real" | "Um real" |
currency.convertToWords#one-real-one-cent | "um real e um centavo" | "Um real e um centavo" |
currency.convertToWords#only-cents | "cinquenta centavos" | "Cinquenta centavos" |
currency.convertToWords#cem | "cem reais" | "Cem reais" |
currency.convertToWords#summary-example | "mil quinhentos e vinte e três reais e quarenta e cinco centavos" | "Mil, quinhentos e vinte e três reais e quarenta e cinco centavos" |
currency.convertToWords#round-million | "um milhão de reais" | "Um milhão de reais" |
currency.convertToWords#round-millions | "dois milhões de reais" | "Dois milhões de reais" |
currency.convertToWords#million-and-more | "um milhão duzentos e trinta reais" | "Um milhão, duzentos e trinta reais" |
currency.convertToWords#negative | "menos cinco reais e cinquenta centavos" | "Menos cinco reais e cinquenta centavos" |
currency.convertToWords#truncates-sub-cent | "um real e noventa e nove centavos" | "Um real e noventa e nove centavos" |
currency.convertToWords#[-0.01] | "menos um centavo" | "Menos um centavo" |
currency.convertToWords#[-0.001] | "zero reais" | "Zero reais" |
currency.convertToWords#[-0.009] | "zero reais" | "Zero reais" |
currency.convertToWords#[0.004] | "zero reais" | "Zero reais" |
currency.convertToWords#[100000000000000.02] | "cem trilhões de reais" | "Cem trilhões de reais e dois centavos" |
currency.convertToWords#[90071992547409.9] | "noventa trilhões setenta e um bilhões novecentos e noventa e dois milhões quinhentos e quarenta e sete mil quatrocentos e nove reais e noventa centavos" | "Noventa trilhões e setenta e um bilhões, novecentos e noventa e dois milhões, quinhentos e quarenta e sete mil, quatrocentos e nove reais e noventa centavos" |
currency.convertToWords#[0.009999999] | "zero reais" | "Zero reais" |
currency.convertToWords#[1.999999999] | "um real e noventa e nove centavos" | "Um real e noventa e nove centavos" |
currency.convertToWords#[1.15] | "um real e quinze centavos" | "Um real e quinze centavos" |
currency.convertToWords#[0.29] | "vinte e nove centavos" | "Vinte e nove centavos" |
currency.convertToWords#[19.99] | "dezenove reais e noventa e nove centavos" | "Dezenove reais e noventa e nove centavos" |
currency.convertToWords#[1000000000000.0099] | "um trilhão de reais" | "Um trilhão de reais" |
currency.convertToWords#[1.5e-7] | "zero reais" | "Zero reais" |
currency.convertToWords#[-1.5e-7] | "zero reais" | "Zero reais" |
currency.convertToWords#[1000] | "mil reais" | "Mil reais" |
currency.convertToWords#[1000000000000000] | "" | "Um quatrilhão de reais" |
currency.convertToWords#[999999999999999] | "novecentos e noventa e nove trilhões novecentos e noventa e nove bilhões novecentos e noventa e nove milhões novecentos e noventa e nove mil novecentos e noventa e nove reais" | "Novecentos e noventa e nove trilhões, novecentos e noventa e nove bilhões, novecentos e noventa e nove milhões, novecentos e noventa e nove mil, novecentos e noventa e nove reais" |
currency.convertToWords#[100000000000000] | "cem trilhões de reais" | "Cem trilhões de reais" |
currency.convertToWords#[1000000000.5] | "um bilhão de reais e cinquenta centavos" | "Um bilhão de reais e cinquenta centavos" |
currency.format#thousands | "1.000,01" | "R$ 1.000,01" |
currency.format#cents | "0,01" | "R$ 0,01" |
currency.format#integer | "1,00" | "R$ 1,00" |
currency.format#millions | "1.000.000,01" | "R$ 1.000.000,01" |
currency.format#negative | "-10,10" | "R$ -10,10" |
currency.format#string-dot-decimal | "1.234,56" | "R$ 1.234,56" |
currency.format#string-brazilian | "1.234,56" | expected "1.234,56", got null |
currency.format#string-with-symbol | "1.234,56" | expected "1.234,56", got null |
currency.format#[0.1] | "0,10" | "R$ 0,10" |
currency.format#[10] | "10,00" | "R$ 10,00" |
currency.format#[10.1] | "10,10" | "R$ 10,10" |
currency.format#[10.01] | "10,01" | "R$ 10,01" |
currency.format#[100.01] | "100,01" | "R$ 100,01" |
currency.format#[10000.01] | "10.000,01" | "R$ 10.000,01" |
currency.format#[100000.01] | "100.000,01" | "R$ 100.000,01" |
currency.format#[-0.01] | "-0,01" | "R$ -0,01" |
currency.format#[-0.1] | "-0,10" | "R$ -0,10" |
currency.format#[-1] | "-1,00" | "R$ -1,00" |
currency.format#[-10] | "-10,00" | "R$ -10,00" |
currency.format#[-10.01] | "-10,01" | "R$ -10,01" |
currency.format#[-100.01] | "-100,01" | "R$ -100,01" |
currency.format#[-1000.01] | "-1.000,01" | "R$ -1.000,01" |
currency.format#[-10000.01] | "-10.000,01" | "R$ -10.000,01" |
currency.format#[-100000.01] | "-100.000,01" | "R$ -100.000,01" |
currency.format#[-1000000.01] | "-1.000.000,01" | "R$ -1.000.000,01" |
currency.format#["1234,56"] | "1.234,56" | expected "1.234,56", got null |
currency.format#["1.234,5"] | "1.234,50" | expected "1.234,50", got null |
currency.format#["R$ 1.234"] | "1.234,00" | expected "1.234,00", got null |
currency.format#["-10.5"] | "-10,50" | "R$ -10,50" |
currency.format#["-1.234,56"] | "-1.234,56" | expected "-1.234,56", got null |
currency.format#[""] | "0,00" | expected "0,00", got null |
currency.format#["0"] | "0,00" | "R$ 0,00" |
currency.format#["123456"] | "123.456,00" | "R$ 123.456,00" |
currency.format#["-1234"] | "-1.234,00" | "R$ -1.234,00" |
currency.format#["abc"] | "0,00" | expected "0,00", got null |
currency.format#[null] | "0,00" | expected "0,00", got null |
currency.format#[-1050] | "-1.050,00" | "R$ -1.050,00" |
date.convertToWords#first-of-month | "primeiro de janeiro de dois mil e vinte e quatro" | "Primeiro de janeiro de dois mil e vinte e quatro" |
date.convertToWords#["02/01/2024"] | "dois de janeiro de dois mil e vinte e quatro" | "Dois de janeiro de dois mil e vinte e quatro" |
date.convertToWords#["25/12/2024"] | "vinte e cinco de dezembro de dois mil e vinte e quatro" | "Vinte e cinco de dezembro de dois mil e vinte e quatro" |
date.convertToWords#iso-string | "vinte e cinco de dezembro de dois mil e vinte e quatro" | expected "vinte e cinco de dezembro de dois mil e vinte e quatro", got null |
date.convertToWords#leap-day | "vinte e nove de fevereiro de dois mil" | "Vinte e nove de fevereiro de dois mil" |
date.convertToWords#not-a-leap-year | "" | expected "", got null |
date.convertToWords#day-out-of-range | "" | expected "", got null |
date.convertToWords#garbage | "" | expected "", got null |
date.convertToWords#empty | "" | expected "", got null |
date.convertToWords#["15/13/2024"] | "" | expected "", got null |
date.convertToWords#["15/00/2024"] | "" | expected "", got null |
date.convertToWords#["00/01/2024"] | "" | expected "", got null |
date.convertToWords#["32/01/2024"] | "" | expected "", got null |
date.convertToWords#["02/03/2024"] | "dois de março de dois mil e vinte e quatro" | "Dois de marco de dois mil e vinte e quatro" |
date.convertToWords#["2024/01/01"] | "" | expected "", got null |
date.convertToWords#["01-01-2024"] | "" | expected "", got null |
date.convertToWords#["01/01/2024xyz"] | "" | expected "", got null |
date.convertToWords#["xyz01/01/2024"] | "" | expected "", got null |
date.convertToWords#["2024-01-02xyz"] | "" | expected "", got null |
date.convertToWords#["xyz2024-01-02"] | "" | expected "", got null |
date.convertToWords#["01/01/0000"] | "" | expected "", got null |
date.convertToWords#["0000-01-01"] | "" | expected "", got null |
date.convertToWords#["01/01/0001"] | "primeiro de janeiro de um" | "Primeiro de janeiro de um" |
date.convertToWords#["29/02/1600"] | "vinte e nove de fevereiro de mil e seiscentos" | "Vinte e nove de fevereiro de mil e seiscentos" |
date.convertToWords#["29/02/1900"] | "" | expected "", got null |
date.convertToWords#["29/02/2100"] | "" | expected "", got null |
date.convertToWords#["29/02/1800"] | "" | expected "", got null |
date.convertToWords#["29/02/0004"] | "vinte e nove de fevereiro de quatro" | "Vinte e nove de fevereiro de quatro" |
date.convertToWords#["29/02/0096"] | "vinte e nove de fevereiro de noventa e seis" | "Vinte e nove de fevereiro de noventa e seis" |
date.convertToWords#["29/02/0003"] | "" | expected "", got null |
date.convertToWords#["29/02/0100"] | "" | expected "", got null |
date.convertToWords#year-1999 | "dez de maio de mil novecentos e noventa e nove" | "Dez de maio de mil novecentos e noventa e nove" |
email.isValid#["[email protected]"] | false | true |
email.isValid#["[email protected]"] | false | true |
email.isValid#["[email protected]"] | false | true |
email.isValid#["[email protected]"] | false | true |
email.isValid#["user@aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.com"] | false | true |
email.isValid#["user@example.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"] | false | true |
email.isValid#["aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@example.com"] | false | true |
email.isValid#["aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa@a.com"] | false | true |
email.isValid#["user@aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.com"] | false | true |
email.isValid#["[email protected]"] | true | false |
email.isValid#["[email protected]"] | true | false |
email.isValid#["user@example.xn--aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"] | true | false |
email.isValid#["a%[email protected]"] | false | true |
legalNature.isValid#["5010"] | true | false |
legalNature.isValid#["1244"] | true | false |
legalNature.isValid#["1252"] | true | false |
legalNature.isValid#["2348"] | true | false |
legalNature.isValid#["2356"] | true | false |
legalNature.isValid#["3301"] | true | false |
legalNature.isValid#["4090"] | true | false |
legalNature.isValid#["4111"] | true | false |
legalNature.isValid#["4120"] | true | false |
legalNature.isValid#["2062a"] | false | true |
legalNature.isValid#["a2062"] | false | true |
legalNature.isValid#["20/62"] | false | true |
legalNature.isValid#[2062] | true | false |
legalNature.isValid#[2208] | true | false |
legalNature.isValid#["20_62"] | false | true |
legalNature.isValid#["-2062"] | false | true |
legalNature.isValid#["2062-"] | false | true |
legalNature.isValid#["-2-0-6-2"] | false | true |
legalNature.isValid#["2-0-6-2"] | false | true |
legalNature.isValid#["20.6.2"] | false | true |
legalNature.isValid#["20 62"] | false | true |
legalNature.isValid#["2-062"] | false | true |
legalNature.list#in-force-codes | {"1015":"Órgão Público do Poder Executivo Federal","1023":"Órgão Público do Poder Executivo Estadual ou do Distrito Federal","1031":"Órgão Público do Poder Executivo Municipal","1040":"Órgão Público do Poder Legislativo Federal","1058":"Órgão Público do Poder Legislativo Estadual ou do Distrito Federal","1066":"Órgão Público do Poder Legislativo Municipal","1074":"Órgão Público do Poder Judiciário Federal","1082":"Órgão Público do Poder Judiciário Estadual","1104":"Autarquia Federal","1112":"Autarquia Estadual ou do Distrito Federal","1120":"Autarquia Municipal","1139":"Fundação Pública de Direito Público Federal","1147":"Fundação Pública de Direito Público Estadual ou do Distrito Federal","1155":"Fundação Pública de Direito Público Municipal","1163":"Órgão Público Autônomo Federal","1171":"Órgão Público Autônomo Estadual ou do Distrito Federal","1180":"Órgão Público Autônomo Municipal","1198":"Comissão Polinacional","1210":"Consórcio Público de Direito Público (Associação Pública)","1228":"Consórcio Público de Direito Privado","1236":"Estado ou Distrito Federal","1244":"Município","1252":"Fundação Pública de Direito Privado Federal","1260":"Fundação Pública de Direito Privado Estadual ou do Distrito Federal","1279":"Fundação Pública de Direito Privado Municipal","1287":"Fundo Público da Administração Indireta Federal","1295":"Fundo Público da Administração Indireta Estadual ou do Distrito Federal","1309":"Fundo Público da Administração Indireta Municipal","1317":"Fundo Público da Administração Direta Federal","1325":"Fundo Público da Administração Direta Estadual ou do Distrito Federal","1333":"Fundo Público da Administração Direta Municipal","1341":"União","2011":"Empresa Pública","2038":"Sociedade de Economia Mista","2046":"Sociedade Anônima Aberta","2054":"Sociedade Anônima Fechada","2062":"Sociedade Empresária Limitada","2070":"Sociedade Empresária em Nome Coletivo","2089":"Sociedade Empresária em Comandita Simples","2097":"Sociedade Empresária em Comandita por Ações","2127":"Sociedade em Conta de Participação","2135":"Empresário (Individual)","2143":"Cooperativa","2151":"Consórcio de Sociedades","2160":"Grupo de Sociedades","2178":"Estabelecimento, no Brasil, de Sociedade Estrangeira","2194":"Estabelecimento, no Brasil, de Empresa Binacional Argentino-Brasileira","2216":"Empresa Domiciliada no Exterior","2224":"Clube/Fundo de Investimento","2232":"Sociedade Simples Pura","2240":"Sociedade Simples Limitada","2259":"Sociedade Simples em Nome Coletivo","2267":"Sociedade Simples em Comandita Simples","2275":"Empresa Binacional","2283":"Consórcio de Empregadores","2291":"Consórcio Simples","2305":"Empresa Individual de Responsabilidade Limitada (de Natureza Empresária)","2313":"Empresa Individual de Responsabilidade Limitada (de Natureza Simples)","2321":"Sociedade Unipessoal de Advogados","2330":"Cooperativas de Consumo","2348":"Empresa Simples de Inovação - Inova Simples","2356":"Investidor Não Residente","3034":"Serviço Notarial e Registral (Cartório)","3069":"Fundação Privada","3077":"Serviço Social Autônomo","3085":"Condomínio Edilício","3107":"Comissão de Conciliação Prévia","3115":"Entidade de Mediação e Arbitragem","3131":"Entidade Sindical","3204":"Estabelecimento, no Brasil, de Fundação ou Associação Estrangeiras","3212":"Fundação ou Associação Domiciliada no Exterior","3220":"Organização Religiosa","3239":"Comunidade Indígena","3247":"Fundo Privado","3255":"Órgão de Direção Nacional de Partido Político","3263":"Órgão de Direção Regional de Partido Político","3271":"Órgão de Direção Local de Partido Político","3280":"Comitê Financeiro de Partido Político","3298":"Frente Plebiscitária ou Referendária","3301":"Organização Social (OS)","3310":"Demais Condomínios","3328":"Plano de Benefícios de Previdência Complementar Fechada","3999":"Associação Privada","4014":"Empresa Individual Imobiliária","4022":"Segurado Especial","4081":"Contribuinte individual","4090":"Candidato a Cargo Político Eletivo","4111":"Leiloeiro","4120":"Produtor Rural (Pessoa Física)","5010":"Organização Internacional","5029":"Representação Diplomática Estrangeira","5037":"Outras Instituições Extraterritoriais"} | {"1015":"Órgão Público do Poder Executivo Federal","1023":"Órgão Público do Poder Executivo Estadual ou do Distrito Federal","1031":"Órgão Público do Poder Executivo Municipal","1040":"Órgão Público do Poder Legislativo Federal","1058":"Órgão Público do Poder Legislativo Estadual ou do Distrito Federal","1066":"Órgão Público do Poder Legislativo Municipal","1074":"Órgão Público do Poder Judiciário Federal","1082":"Órgão Público do Poder Judiciário Estadual","1104":"Autarquia Federal","1112":"Autarquia Estadual ou do Distrito Federal","1120":"Autarquia Municipal","1139":"Fundação Federal","1147":"Fundação Estadual ou do Distrito Federal","1155":"Fundação Municipal","1163":"Órgão Público Autônomo da União","1171":"Órgão Público Autônomo Estadual ou do Distrito Federal","1180":"Órgão Público Autônomo Municipal","2011":"Empresa Pública","2038":"Sociedade de Economia Mista","2046":"Sociedade Anônima Aberta","2054":"Sociedade Anônima Fechada","2062":"Sociedade Empresária Limitada","2076":"Sociedade Empresária em Nome Coletivo","2089":"Sociedade Empresária em Comandita Simples","2097":"Sociedade Empresária em Comandita por Ações","2100":"Sociedade Mercantil de Capital e Indústria (extinta pelo NCC/2002)","2127":"Sociedade Empresária em Conta de Participação","2135":"Empresário (Individual)","2143":"Cooperativa","2151":"Consórcio de Sociedades","2160":"Grupo de Sociedades","2178":"Estabelecimento, no Brasil, de Sociedade Estrangeira","2194":"Estabelecimento, no Brasil, de Empresa Binacional Argentino-Brasileira","2208":"Entidade Binacional Itaipu","2216":"Empresa Domiciliada no Exterior","2224":"Clube/Fundo de Investimento","2232":"Sociedade Simples Pura","2240":"Sociedade Simples Limitada","2259":"Sociedade em Nome Coletivo","2267":"Sociedade em Comandita Simples","2275":"Sociedade Simples em Conta de Participação","2305":"Empresa Individual de Responsabilidade Limitada","3034":"Serviço Notarial e Registral (Cartório)","3042":"Organização Social","3050":"Organização da Sociedade Civil de Interesse Público (Oscip)","3069":"Outras Formas de Fundações Mantidas com Recursos Privados","3077":"Serviço Social Autônomo","3085":"Condomínio Edilícios","3093":"Unidade Executora (Programa Dinheiro Direto na Escola)","3107":"Comissão de Conciliação Prévia","3115":"Entidade de Mediação e Arbitragem","3123":"Partido Político","3131":"Entidade Sindical","3204":"Estabelecimento, no Brasil, de Fundação ou Associação Estrangeiras","3212":"Fundação ou Associação Domiciliada no Exterior","3999":"Outras Formas de Associação","4014":"Empresa Individual Imobiliária","4022":"Segurado Especial","4081":"Contribuinte individual","5002":"Organização Internacional e Outras Instituições Extraterritoriais"} |
legalProcess.format#[""] | "" | expected "", got null |
legalProcess.format#["0"] | "0" | expected "0", got null |
legalProcess.format#["00"] | "00" | expected "00", got null |
legalProcess.format#["000"] | "000" | expected "000", got null |
legalProcess.format#["0002"] | "0002" | expected "0002", got null |
legalProcess.format#["00020"] | "00020" | expected "00020", got null |
legalProcess.format#["000208"] | "000208" | expected "000208", got null |
legalProcess.format#["0002080"] | "0002080" | expected "0002080", got null |
legalProcess.format#["00020802"] | "0002080-2" | expected "0002080-2", got null |
legalProcess.format#["000208025"] | "0002080-25" | expected "0002080-25", got null |
legalProcess.format#["0002080252"] | "0002080-25.2" | expected "0002080-25.2", got null |
legalProcess.format#["00020802520"] | "0002080-25.20" | expected "0002080-25.20", got null |
legalProcess.format#["000208025201"] | "0002080-25.201" | expected "0002080-25.201", got null |
legalProcess.format#["0002080252012"] | "0002080-25.2012" | expected "0002080-25.2012", got null |
legalProcess.format#["00020802520125"] | "0002080-25.2012.5" | expected "0002080-25.2012.5", got null |
legalProcess.format#["000208025201251"] | "0002080-25.2012.5.1" | expected "0002080-25.2012.5.1", got null |
legalProcess.format#["0002080252012515"] | "0002080-25.2012.5.15" | expected "0002080-25.2012.5.15", got null |
legalProcess.format#["00020802520125150"] | "0002080-25.2012.5.15.0" | expected "0002080-25.2012.5.15.0", got null |
legalProcess.format#["000208025201251500"] | "0002080-25.2012.5.15.00" | expected "0002080-25.2012.5.15.00", got null |
legalProcess.format#["0002080252012515004"] | "0002080-25.2012.5.15.004" | expected "0002080-25.2012.5.15.004", got null |
legalProcess.format#["00020802520125150049123123"] | "0002080-25.2012.5.15.0049" | expected "0002080-25.2012.5.15.0049", got null |
legalProcess.format#["0002080@$25201%!@2515.%0049123123"] | "0002080-25.2012.5.15.0049" | expected "0002080-25.2012.5.15.0049", got null |
legalProcess.format#[-1] | "" | expected "", threw: AttributeError: 'int' object has no attribute 'isdigit' |
legalProcess.format#[1.5] | "" | expected "", threw: AttributeError: 'float' object has no attribute 'isdigit' |
legalProcess.format#[9007199254740992] | "" | expected "", threw: AttributeError: 'int' object has no attribute 'isdigit' |
legalProcess.generate#[{"year":10000}] | null | "267203707100007030004" |
legalProcess.generate#[{"year":99999}] | null | "428142692999997070201" |
legalProcess.generate#[{"court":0}] | null | expected null, threw: TypeError: '<' not supported between instances of 'NoneType' and 'int' |
legalProcess.generate#[{"court":10}] | null | expected null, threw: TypeError: '<' not supported between instances of 'NoneType' and 'int' |
legalProcess.generate#[{"court":1.5}] | null | expected null, threw: TypeError: '<' not supported between instances of 'NoneType' and 'int' |
legalProcess.generate#[{"court":-1}] | null | expected null, threw: TypeError: '<' not supported between instances of 'NoneType' and 'int' |
legalProcess.isValid#["-00020802520125150049"] | false | true |
legalProcess.isValid#["00020802520125150049."] | false | true |
legalProcess.isValid#[".0002080-25.2012.5.15.0049-"] | false | true |
legalProcess.isValid#["ab00020802520125150049"] | false | expected false, threw: ValueError: invalid literal for int() with base 10: 'ab000202520125150049' |
legalProcess.isValid#["00020802520125150049ab"] | false | expected false, threw: ValueError: invalid literal for int() with base 10: '0049ab' |
legalProcess.isValid#["0002080/25.2012.5.15.0049"] | true | false |
legalProcess.isValid#["000208-0252012.5.15.0049"] | false | true |
legalProcess.isValid#["0000100-58.2008.1.01.0000"] | false | true |
legalProcess.isValid#[" 0002080-25.2012.5.15.0049 "] | true | false |
legalProcess.isValid#["\n00020802520125150049\t"] | true | false |
legalProcess.isValid#["0000100-85.2008.1.00.0000"] | true | false |
legalProcess.isValid#["0000100-04.2008.2.00.0000"] | true | false |
legalProcess.isValid#["0000100-20.2008.3.00.0000"] | true | false |
legalProcess.isValid#["0000100-09.2008.4.01.0000"] | true | false |
legalProcess.isValid#["0000100-18.2008.6.27.0000"] | true | false |
legalProcess.isValid#["0000100-51.2008.7.12.0000"] | true | false |
legalProcess.isValid#["0000100-68.2008.4.06.0000"] | true | false |
legalProcess.isValid#["0000100-31.2008.4.90.0000"] | true | false |
legalProcess.isValid#["0000100-47.2008.5.90.0000"] | true | false |
legalProcess.isValid#["0000100-52.2008.5.00.0000"] | true | false |
legalProcess.isValid#["0000100-68.2008.6.00.0000"] | true | false |
legalProcess.isValid#["0000100-84.2008.7.00.0000"] | true | false |
legalProcess.isValid#space-separated-fields | true | expected true, threw: ValueError: invalid literal for int() with base 10: '00020805 2012 5 15 0049' |
legalProcess.isValid#mixed-separators | true | false |
legalProcess.isValid#[null] | false | expected false, threw: AttributeError: 'NoneType' object has no attribute 'replace' |
licensePlate.convertToMercosul#hyphen-mask | "ABC1C34" | expected "ABC1C34", got null |
licensePlate.convertToMercosul#already-mercosul | "" | expected "", got null |
licensePlate.convertToMercosul#invalid | "" | expected "", got null |
licensePlate.convertToMercosul#empty | "" | expected "", got null |
licensePlate.convertToMercosul#["ABC12D3"] | "" | expected "", got null |
licensePlate.convertToMercosul#["ABC1234EXTRA"] | "" | expected "", got null |
licensePlate.convertToMercosul#["ABC12345"] | "" | expected "", got null |
licensePlate.convertToMercosul#["ABC123"] | "" | expected "", got null |
licensePlate.format#[""] | "" | expected "", got null |
licensePlate.format#["a"] | "A" | expected "A", got null |
licensePlate.format#["ab"] | "AB" | expected "AB", got null |
licensePlate.format#["abc"] | "ABC" | expected "ABC", got null |
licensePlate.format#["abc1"] | "ABC-1" | expected "ABC-1", got null |
licensePlate.format#["abc12"] | "ABC-12" | expected "ABC-12", got null |
licensePlate.format#["abc123"] | "ABC-123" | expected "ABC-123", got null |
licensePlate.format#["abc1d"] | "ABC1D" | expected "ABC1D", got null |
licensePlate.format#["abc1d2"] | "ABC1D2" | expected "ABC1D2", got null |
licensePlate.format#["abc-1234"] | "ABC-1234" | expected "ABC-1234", got null |
licensePlate.format#["abc1-d23"] | "ABC1D23" | expected "ABC1D23", got null |
licensePlate.format#["abc1da2"] | "" | expected "", got null |
licensePlate.format#["abc12d"] | "" | expected "", got null |
licensePlate.format#["abc12d3"] | "" | expected "", got null |
licensePlate.format#["1"] | "" | expected "", got null |
licensePlate.format#["1ab4"] | "" | expected "", got null |
licensePlate.format#["ab14"] | "" | expected "", got null |
licensePlate.generate#mercosul-fifth-char-k-to-z | null | "WHW4D55" |
licensePlate.generate#explicit-mercosul | null | "PAK8D58" |
licensePlate.generate#unknown-format-falls-back | null | expected /^[A-Z]{3}[0-9][K-Z][0-9]{2}$/, got null |
licensePlate.generate#bogus-format-falls-back | null | null does not satisfy licensePlate.isValid (got false) |
licensePlate.isValid#["abc-1234"] | true | false |
licensePlate.isValid#["ABC-1234"] | true | false |
licensePlate.isValid#["ABC 1234"] | true | false |
licensePlate.isValid#["ABC-1D23"] | true | false |
licensePlate.isValid#["ABC1D23",{"format":"LLLNNNN"}] | false | true |
licensePlate.isValid#["ABC1234",{"format":"LLLNLNN"}] | false | true |
licensePlate.isValid#["ABC.1234"] | true | false |
licensePlate.isValid#["ABC/1234"] | true | false |
licensePlate.isValid#["ABC - 1234"] | true | false |
licensePlate.isValid#["ABC-1234",{"format":"LLLNNNN"}] | true | false |
passport.format#lowercase | "ACD12736" | expected "ACD12736", got null |
passport.format#partial | "AB12" | expected "AB12", got null |
passport.format#empty | "" | expected "", got null |
passport.format#caps-length | "AB123456" | expected "AB123456", got null |
passport.format#["A"] | "A" | expected "A", got null |
passport.format#["AB"] | "AB" | expected "AB", got null |
passport.format#["AB1"] | "AB1" | expected "AB1", got null |
passport.format#["AB123"] | "AB123" | expected "AB123", got null |
passport.format#["AB1234"] | "AB1234" | expected "AB1234", got null |
passport.format#["AB12345"] | "AB12345" | expected "AB12345", got null |
passport.format#["a"] | "A" | expected "A", got null |
passport.format#["ac"] | "AC" | expected "AC", got null |
passport.format#["acd"] | "ACD" | expected "ACD", got null |
passport.format#["acd1"] | "ACD1" | expected "ACD1", got null |
passport.format#["acd12"] | "ACD12" | expected "ACD12", got null |
passport.format#["acd127"] | "ACD127" | expected "ACD127", got null |
passport.format#["acd1273"] | "ACD1273" | expected "ACD1273", got null |
passport.isValid#lowercase | true | false |
passport.isValid#masked | true | false |
passport.isValid#dotted | true | false |
passport.isValid#["AB-123.456"] | true | false |
phone.format#subscriber-number | "98888-7777" | expected "98888-7777", got null |
phone.format#partial | "98888-777" | expected "98888-777", got null |
phone.format#empty | "" | expected "", got null |
phone.format#ddd-under-default-mask | "11300-0000" | "(11)3000-0000" |
phone.format#["9"] | "9" | expected "9", got null |
phone.format#["98"] | "98" | expected "98", got null |
phone.format#["988"] | "988" | expected "988", got null |
phone.format#["9888"] | "9888" | expected "9888", got null |
phone.format#["98888"] | "98888" | expected "98888", got null |
phone.format#["988887"] | "98888-7" | expected "98888-7", got null |
phone.format#["9888877"] | "98888-77" | expected "98888-77", got null |
phone.format#[9007199254740992] | "" | expected "", got null |
phone.format#["+5511988887777"] | "11988-8877" | expected "11988-8877", got null |
phone.format#["+55 55 98888-7777"] | "55988-8877" | expected "55988-8877", got null |
phone.format#["11900000000"] | "11900-0000" | "(11)90000-0000" |
phone.generate#["service"] | null | "2430239328" |
phone.isValid#["(11) 98765-4321"] | true | false |
phone.isValid#["(11) 3000-0000"] | true | false |
phone.isValid#["+5511987654321"] | true | false |
phone.isValid#["+55 11 98765-4321"] | true | false |
phone.isValid#["+55 (11) 98765-4321"] | true | false |
phone.isValid#["0055 11 98765-4321"] | true | false |
phone.isValid#["5511987654321"] | true | false |
phone.isValid#["+55 (11) 3000-0000"] | true | false |
phone.isValid#["11.98765/4321"] | true | false |
pis.format#[""] | "" | expected "", got null |
pis.format#["0"] | "0" | expected "0", got null |
pis.format#["00"] | "00" | expected "00", got null |
pis.format#["000"] | "000" | expected "000", got null |
pis.format#["0000"] | "000.0" | expected "000.0", got null |
pis.format#["00000"] | "000.00" | expected "000.00", got null |
pis.format#["000000"] | "000.000" | expected "000.000", got null |
pis.format#["0000000"] | "000.0000" | expected "000.0000", got null |
pis.format#["00000000"] | "000.00000" | expected "000.00000", got null |
pis.format#["000000000"] | "000.00000.0" | expected "000.00000.0", got null |
pis.format#["0000000000"] | "000.00000.00" | expected "000.00000.00", got null |
pis.format#["000000000000"] | "000.00000.00-0" | expected "000.00000.00-0", got null |
pis.format#["000.0"] | "000.0" | expected "000.0", got null |
pis.format#["000.00"] | "000.00" | expected "000.00", got null |
pis.format#["000.000"] | "000.000" | expected "000.000", got null |
pis.format#["000.0000"] | "000.0000" | expected "000.0000", got null |
pis.format#["000.00000"] | "000.00000" | expected "000.00000", got null |
pis.format#["000.000000"] | "000.00000.0" | expected "000.00000.0", got null |
pis.format#["000.00000.0"] | "000.00000.0" | expected "000.00000.0", got null |
pis.format#["000.00000.00"] | "000.00000.00" | expected "000.00000.00", got null |
pis.format#["000.00000.000"] | "000.00000.00-0" | expected "000.00000.00-0", got null |
pis.format#["000.00000.00-0"] | "000.00000.00-0" | expected "000.00000.00-0", got null |
pis.format#["000.00000.00-00"] | "000.00000.00-0" | expected "000.00000.00-0", got null |
pis.format#["000#Error*&@#0000#Char!00000"] | "000.00000.00-0" | expected "000.00000.00-0", got null |
pis.format#["#-+Error#000000000000#Char!"] | "000.00000.00-0" | expected "000.00000.00-0", got null |
pis.format#["000000#+_Error#Char!$#000000"] | "000.00000.00-0" | expected "000.00000.00-0", got null |
pis.format#[1] | "1" | expected "1", got null |
pis.format#[10] | "10" | expected "10", got null |
pis.format#[100] | "100" | expected "100", got null |
pis.format#[1000] | "100.0" | expected "100.0", got null |
pis.format#[10000] | "100.00" | expected "100.00", got null |
pis.format#[100000] | "100.000" | expected "100.000", got null |
pis.format#[1000000] | "100.0000" | expected "100.0000", got null |
pis.format#[10000000] | "100.00000" | expected "100.00000", got null |
pis.format#[100000000] | "100.00000.0" | expected "100.00000.0", got null |
pis.format#[1000000000] | "100.00000.00" | expected "100.00000.00", got null |
pis.format#[10000000000] | "100.00000.00-0" | expected "100.00000.00-0", got null |
pis.format#[100000000000] | "100.00000.00-0" | expected "100.00000.00-0", got null |
pis.format#[1000000000000] | "100.00000.00-0" | expected "100.00000.00-0", got null |
pis.format#[100.1] | "" | expected "", got null |
pis.format#[100.11] | "" | expected "", got null |
pis.format#[100.101] | "" | expected "", got null |
pis.format#[100.1001] | "" | expected "", got null |
pis.format#[100.10001] | "" | expected "", got null |
pis.format#[100.100001] | "" | expected "", got null |
pis.format#[100.1000001] | "" | expected "", got null |
pis.format#[100.10000001] | "" | expected "", got null |
pis.format#[100.100000001] | "" | expected "", got null |
pis.format#["0000000000000"] | "000.00000.00-0" | expected "000.00000.00-0", got null |
pis.format#["00000000000000"] | "000.00000.00-0" | expected "000.00000.00-0", got null |
pis.format#["000000000000000"] | "000.00000.00-0" | expected "000.00000.00-0", got null |
pis.format#[-12345678901] | "" | expected "", got null |
pis.format#[9007199254740992] | "" | expected "", got null |
pis.format#["12345678901"] | "123.45678.90-1" | expected "123.45678.90-1", got null |
pis.isValid#repeated-digits | false | true |
pis.isValid#["120.5641.284-7"] | true | false |
pis.isValid#["120/56874/10-7"] | true | false |
pis.isValid#["120 56874 10 7"] | true | false |
pis.isValid#["120.1213.266-0"] | true | false |
pis.isValid#["120.7041.469-0"] | true | false |
renavam.isValid#["0063988/4962"] | true | false |
renavam.isValid#["639884962"] | true | false |
renavam.isValid#[639884962] | true | false |
renavam.isValid#["0063988.4962"] | true | false |
renavam.isValid#["00639884-962"] | true | false |
renavam.isValid#[" 00639884962 "] | true | false |
renavam.isValid#[12345678900] | true | false |
state.getCodeByName#["Mato Großo"] | null | "MT" |
voterId.format#[""] | "" | expected "", got null |
voterId.format#["1"] | "1" | expected "1", got null |
voterId.format#["12"] | "12" | expected "12", got null |
voterId.format#["123"] | "123" | expected "123", got null |
voterId.format#["1234"] | "1234" | expected "1234", got null |
voterId.format#["12345"] | "1234 5" | expected "1234 5", got null |
voterId.format#["123456"] | "1234 56" | expected "1234 56", got null |
voterId.format#["1234567"] | "1234 567" | expected "1234 567", got null |
voterId.format#["12345678"] | "1234 5678" | expected "1234 5678", got null |
voterId.format#["123456780"] | "1234 5678 0" | expected "1234 5678 0", got null |
voterId.format#["1234567801"] | "1234 5678 01" | expected "1234 5678 01", got null |
voterId.format#["12345678012"] | "1234 5678 01 2" | expected "1234 5678 01 2", got null |
voterId.format#["123456780124"] | "1234 5678 01 24" | expected "1234 5678 01 24", got null |
voterId.format#["12345678801912"] | "1234 5678 80 19" | expected "1234 5678 80 19", got null |
voterId.format#["123456788019123"] | "1234 5678 80 19" | expected "1234 5678 80 19", got null |
voterId.format#["12345678803991"] | "1234 5678 80 39" | expected "1234 5678 80 39", got null |
voterId.format#["1234567880399"] | "1234 5678 80 39" | expected "1234 5678 80 39", got null |
voterId.format#["123456788"] | "1234 5678 8" | expected "1234 5678 8", got null |
voterId.format#["123456788019"] | "1234 5678 80 19" | expected "1234 5678 80 19", got null |
voterId.format#["123450159"] | "1234 5015 9" | expected "1234 5015 9", got null |
voterId.format#[-123456780124] | "" | expected "", got null |
voterId.format#[1.5] | "" | expected "", got null |
voterId.format#[9007199254740992] | "" | expected "", got null |
voterId.format#["123456780175"] | "1234 5678 01 75" | expected "1234 5678 01 75", got null |
voterId.isValid#["1234567880191"] | false | true |
voterId.isValid#["1023-8501-06-71"] | true | false |
voterId.isValid#["1023 8501 06 71"] | true | false |
voterId.isValid#["1023.8501.06.71"] | true | false |
voterId.isValid#["000010191"] | true | false |
voterId.isValid#["123450159"] | true | false |
voterId.isValid#["00123450159"] | true | false |
voterId.isValid#["1 2345 01 59"] | true | false |
voterId.isValid#["12345 01 59"] | true | false |
voterId.isValid#["122844"] | true | false |
voterId.isValid#["12340639"] | true | false |
voterId.isValid#["1234 06 39"] | true | false |
voterId.isValid#["10191"] | true | false |
voterId.isValid#["0123456780191"] | false | true |
voterId.isValid#["0001.2345.01.59"] | true | false |
voterId.isValid#["123 4567 01 91"] | true | false |
voterId.isValid#["1023-8501/06-71"] | true | false |
voterId.isValid#[" 1023 8501 06 71 "] | true | false |
Funções sem exemplo de uso
Estas funções funcionam, mas os arquivos de uso da biblioteca não têm exemplo delas. A aba dessas funções neste site fica vazia.
- Moeda (real): Escrever por extenso
currency.convertToWords - Moeda (real): Formatar
currency.format - Datas e feriados: Escrever por extenso
date.convertToWords - Natureza jurídica: Listar
legalNature.list - Processo judicial: Gerar
legalProcess.generate - Telefone: Formatar
phone.format - Telefone: Gerar
phone.generate
Badge para o seu README
O badge mostra a parcela de funções principais e os casos que passam, e muda a cada execução. Cole este Markdown no README da biblioteca:
[](https://brazilian-utils.com.br/libs/python/)