Skip to content

A new version of DURC, written in python and designed to work in various python notebook environments

License

Notifications You must be signed in to change notification settings

CareSet/durctoo

Repository files navigation

Durctoo

Durctoo is a Python package that provides clean abstractions for modeling HTML5 form data. It allows you to create, manipulate, and serialize form definitions independently of any specific web framework or rendering engine.

DURC stands for "reversed CRUD", and this project takes ideas from the original PHP version of DURC.

Features

  • Framework-agnostic HTML5 form modeling
  • Support for all common HTML5 form elements
  • Clean JSON serialization
  • Type hints for better development experience
  • No external dependencies

Installation

pip install durctoo

Quick Start

from durctoo.forms import HTML5FormData, FormMethod, InputType

# Create a new form
form_model = HTML5FormData("registration_form", method=FormMethod.POST)

# Add form elements
form_model.add_input("username", InputType.TEXT, required=True, label="Username")
form_model.add_input("password", InputType.PASSWORD, required=True, label="Password")
form_model.add_email_input("email", required=True, label="Email Address")

# Get JSON representation
print(form_model.to_json())

Documentation

Soon...

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

About

A new version of DURC, written in python and designed to work in various python notebook environments

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages