HOPE FlexFields
This library provides the ability to define a set of fields and related validation rules dynamically. It has been designed as part of the HOPE project to manage user-customizable fields (FlexField). The idea is to have a central business logic repository for data import validation.
It provides four classes:
- FieldDefinition: This represents a collection of reusable pre-configured fields
- FlexField: Instance like representation of
FieldDefinitioninside aFieldset - Fieldset: Group of FlexField
- DataChecker: Compound of fieldset
From the design point of view a high level comparison with Django components could be:
FieldDefinition=class forms.FieldFieldset=forms.FormFlexField=forms.Field()DataChecker=[forms.Form(),...]
... and some utilities
- Automatic creation of FieldSets inspecting exiting models
- Automatic creation of XLS file matching an existing Datachecker
- Validate XLS against an existing Datachecker
classDiagram
class AbstractField
class FieldDefinition
class FlexField
class Fieldset
class DataChecker
AbstractField <|-- FlexField
AbstractField <|-- FieldDefinition
Fieldset *-- FlexField
FlexField --> FieldDefinition
DataChecker o-- Fieldset
Install
CSP_SCRIPT_SRC = [
...
"cdnjs.cloudflare.com",
]
INSTALLED_APPS = [
...
'admin_extra_buttons',
'jsoneditor',
'hope_flex_fields',
]
Demo Application
pip install -e .
python manage.py migrate
python manage.py demo
python manage.py runserver
Demo Application with UV
uv venv
uv sync
uv run pip install -e .
uv run python manage.py migrate
uv run python manage.py demo
uv run python manage.py runserver
Navigate to http://localhost:8000/admin/ and login using any username/password
Metadata
Release files for hope-flex-fields 0.9.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hope_flex_fields-0.9.1.tar.gz | 237.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hope_flex_fields-0.9.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 517.1 kB
Release files / hope_flex_fields-0.9.1.tar.gz
| Download URL | hope_flex_fields-0.9.1.tar.gz |
|---|---|
| Size | 237.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fc46d27bdda819cb678b872410e7706b4fa9d3cd291e1697c9f10d1e7905f1de
|
|
BLAKE2b-256 checksum How to use checksums |
4b13b4450480e3d6d56cabb5e8992ac212bcdcbeff862a31e3e30e3b2bc28546
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 17, 2026.
Transparency logRelease files / hope_flex_fields-0.9.1-py3-none-any.whl
| Download URL | hope_flex_fields-0.9.1-py3-none-any.whl |
|---|---|
| Size | 279.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
acf928434280a6b54f2938c20ef676dc9c1b8bfea18a700ff0c34dcadd04dc81
|
|
BLAKE2b-256 checksum How to use checksums |
61f2c2daae57ef671615d6be132febe9c2f4041586c2a53d5f8d1bde74218179
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 17, 2026.
Transparency log