Skip to main content

No project description provided

Project description

HOPE FlexFields

Test Lint codecov Documentation PyPI

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 FieldDefinition inside a Fieldset
  • 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.Field
  • Fieldset = forms.Form
  • FlexField = forms.Field()
  • DataChecker = [forms.Form(),...]

... and some utilities

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hope_flex_fields-0.7.7.tar.gz (556.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hope_flex_fields-0.7.7-py3-none-any.whl (275.6 kB view details)

Uploaded Python 3

File details

Details for the file hope_flex_fields-0.7.7.tar.gz.

File metadata

  • Download URL: hope_flex_fields-0.7.7.tar.gz
  • Upload date:
  • Size: 556.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for hope_flex_fields-0.7.7.tar.gz
Algorithm Hash digest
SHA256 d5f415be9da482e11cb58e3646f8cd0a4c831e763beaae78a30753ae299b3b33
MD5 adfc54f1c9049bbe46f964f64888893c
BLAKE2b-256 0ff28937df86867a3c4198735a0829bbcd545a21ab1e26382746331da5c0c705

See more details on using hashes here.

File details

Details for the file hope_flex_fields-0.7.7-py3-none-any.whl.

File metadata

File hashes

Hashes for hope_flex_fields-0.7.7-py3-none-any.whl
Algorithm Hash digest
SHA256 19245719a705ad30fda495dedde8e5bbc42fe55b94d03d86daa7526cba3c4ce2
MD5 39e3fd08cdc2d03e610590a6d4544a3c
BLAKE2b-256 3e559d6d693be66bffff0d66c8f03c2cc713692cf63e0da303b4ad32328ee6e5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page