Skip to main content

django-cpf-cnpf2

A Django library for working with cpf and cnpj fields.

Installation

Install from pypi:

pip install django-cpf-cnpj2

Install from git:

pip install git+https://github.com/elyasha/django-cpf-cnpj2.git

Basic usage

Add the django_cpf_cnpj app between your apps and django apps:

INSTALLED_APPS = [
    ...
    'django_cpf_cnpj',
    ...
]

Then, you can use it like any regular model field:

from django_cpf_cnpj.fields import CPFField, CNPJField
from django.db import models

class MyModel(models.Model):
    cpf = CPFField(masked=True)  # To enable auto-mask xxx.xxx.xxx-xx
    cnpj = CNPJField(masked=False)  # To disable auto-mask xx.xxx.xxx/xxxx-xx

Running tests

Check tests with tox:

tox

Check a specific combination:

tox -e py38-django22

Metadata

Release files for django-cpf-cnpj2 1.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-cpf-cnpj2 1.8.0
File Size Uploaded Provenance Actions
django_cpf_cnpj2-1.8.0.tar.gz 13.1 kB Without provenance Details for django_cpf_cnpj2-1.8.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-cpf-cnpj2 1.8.0
File Interpreter ABI Platform Actions
django_cpf_cnpj2-1.8.0-py3-none-any.whl Python 3 none any Details for django_cpf_cnpj2-1.8.0-py3-none-any.whl

Total release size: 27.2 kB

Release files / django_cpf_cnpj2-1.8.0.tar.gz

Download URL django_cpf_cnpj2-1.8.0.tar.gz
Size 13.1 kB
Tags Source
SHA-256 checksum
How to use checksums
3e0152978ea8a77fa5fc4eb8168bb7a93dddc3a5480cc3c6f6278ce0c85e897e
BLAKE2b-256 checksum
How to use checksums
7e7c0f0d8f28ac5969c827b086ca841de958d2bd83affad610afbd96ac2bb19d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.0

Release files / django_cpf_cnpj2-1.8.0-py3-none-any.whl

Download URL django_cpf_cnpj2-1.8.0-py3-none-any.whl
Size 14.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
293c4ef847daba3ae277b2f550dcb1f47a2e920d62c37aa34429517748cd3928
BLAKE2b-256 checksum
How to use checksums
c20bcc27215ecae909453ae060ac076cc81c2e0773dc39edcdb25e564718bd70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.0

Security for django-cpf-cnpj2 1.8.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page