Skip to content

Form control discussion #49

@mikaelho

Description

@mikaelho

I have been thinking about UIs for Python for a while, and one of the related topics was making data entry and validation easy by generating a form from the data definition contained in a Python class annotations. I see this idea shared in how the Grid control uses the item class's attributes.

My earlier thinking was mainly driven from the realisation that there is a lot of overlap between the validation needed and the capabilities of one of the most popular Python packages, pydantic.

Thus I created a Form control that does this, see the online demo/manual for details. It does not create a mandatory dependency with pydantic or anything else, but does know how to utilise pydantic capabilities when available.

Before I move forward from this alpha stage in terms of tests, Python versions etc., it would be nice to understand if there could or should be a deeper integration with the pglet-python package, for example in terms of aligning with the Grid control etc., or even becoming part of the package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions