Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

plonegovbr.brfields 🚀

Plone package implementing Dexterity fields for common data types used in Brazil.

Features ✨

This package provides the following Dexterity fields:

  • CEP (plonegovbr.brfields.fields.CEP): 🏠 A text field for validating and storing Brazilian postal codes (CEP) with basic format validation.
  • CNPJ (plonegovbr.brfields.fields.CNPJ): 🏢 A text field for validating and storing Brazilian company registration numbers (CNPJ) with value validation.
  • CPF (plonegovbr.brfields.fields.CPF): 🆔 A text field for validating and storing Brazilian individual taxpayer numbers (CPF) with value validation.
  • Estados (plonegovbr.brfields.fields.Estados): 📍 A choice field with a predefined vocabulary of Brazilian states, using plonegovbr.vocabulary.estados for validation.
  • Telefone (plonegovbr.brfields.fields.Telefone): 📞 A text field for validating and storing Brazilian phone numbers.

Additionally, the package provides the following named vocabulary:

  • plonegovbr.vocabulary.estados: 📌 A predefined list of Brazilian states.

Installation 🛠️

To install plonegovbr.brfields, add it to your project dependencies and install the package using your preferred method.

Using setup.py 🐍

For projects managed via setup.py, edit your setup.py file and add plonegovbr.brfields to the install_requires list:

install_requires = [
    ...
    "plonegovbr.brfields",
]

Then, install the dependencies:

pip install -e .

Using pyproject.toml 📜

For projects using pyproject.toml, add plonegovbr.brfields to the dependencies list under the [project] section:

dependencies = [
    ...
    "plonegovbr.brfields",
]

Then, install the dependencies:

pip install .

Usage 📖

To use one of these fields in your content type, import the required field and include it in your schema definition.

Example:

from plonegovbr.brfields.fields import CPF
from zope.interface import Interface
from plone.supermodel import model


class IDemoContent(model.Schema):
    """Demo content showcasing all available fields."""

    cpf = CPF(
        title=_("CPF"),
        description=_("Enter the CPF number"),
        required=True,
    )

Volto Support ⚡

For Volto support, you need to add the package @plonegovbr/volto-brwidgets to your Volto project. This package provides widgets to properly render the Brazilian-specific fields in the Volto UI.

Contributing 🤝

Contributions are welcome! If you find any issues or want to suggest improvements, please check out:

License 📜

This project is licensed under the GPLv2.

Credits & Acknowledgements 🙏

This package was developed and maintained by the PloneGov-BR community ❤️.

Release files for plonegovbr.brfields 1.0.0a3

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

Source distribution (sdist)

Source distribution for plonegovbr.brfields 1.0.0a3
File Size Uploaded
plonegovbr.brfields-1.0.0a3.tar.gz 18.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for plonegovbr.brfields 1.0.0a3
File Interpreter ABI Platform
plonegovbr.brfields-1.0.0a3-py3-none-any.whl Python 3 none any Details

Total release size: 53.1 kB

Release files / plonegovbr.brfields-1.0.0a3.tar.gz

Download URL plonegovbr.brfields-1.0.0a3.tar.gz
Size 18.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a096b32b2182b978076f2502caf8f386bc8a7ab643dadf23ad7d645f25854006
BLAKE2b-256 checksum
How to use checksums
9f7d1f4124bc479c287a7a47000e005ad73d4579dbd467ce122a50e29aefa537
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.28.1

Release files / plonegovbr.brfields-1.0.0a3-py3-none-any.whl

Download URL plonegovbr.brfields-1.0.0a3-py3-none-any.whl
Size 34.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4522725fa9a13c127e0fbbb84ba7d2742e216d2633ea1c209072ad4379f9252b
BLAKE2b-256 checksum
How to use checksums
d63c97c280c1e13718d99645ac7746cec6db526920a61c646266ae1f37096218
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.28.1
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