Skip to main content

Turn Pydantic models into interactive Rich terminal forms — with built-in Click & Typer integrations.

Project description

richforms

richforms turns Pydantic models into rich interactive terminal forms.

Installation

You can add richforms to your project with uv.

uv add richforms

Usage

You can start from Python in-process or from the bundled CLI.

Python API

from richforms.example.model import Metadata
from richforms import fill


metadata = fill(Metadata)
print(metadata.model_dump_json(indent=2))

CLI

richforms fill richforms.example.model:Metadata --output project-metadata.json

Integrations

You can integrate richforms directly into Click and Typer option callbacks.

import typer

from richforms.integrations.typer import form_callback
from richforms.example.model import Metadata

app = typer.Typer()


@app.command()
def release(
    metadata: Metadata = typer.Option(
        None,
        callback=form_callback(Metadata),
    ),
) -> None:
    print(metadata.model_dump())

Documentation

For more information, see the documentation.

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

richforms-0.4.0.tar.gz (77.1 kB view details)

Uploaded Source

Built Distribution

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

richforms-0.4.0-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file richforms-0.4.0.tar.gz.

File metadata

  • Download URL: richforms-0.4.0.tar.gz
  • Upload date:
  • Size: 77.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for richforms-0.4.0.tar.gz
Algorithm Hash digest
SHA256 6901522b4505887ccbc542d8d0ae48e50b8c517691a3a17e9663e6b101797c0e
MD5 a98a5877537e0d70331d35562d3c0fe2
BLAKE2b-256 b2aaf23f1e44175e51bc977375c506e27a4b6c8ecadb9b5f9f73c64f595b9cce

See more details on using hashes here.

Provenance

The following attestation bundles were made for richforms-0.4.0.tar.gz:

Publisher: publish.yml on shinybrar/richforms

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file richforms-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: richforms-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for richforms-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 655e55613d7382f4dae4d915dde2cc7710f81c357b1d9d517bafdb5b17a6ad83
MD5 2647342279760295f87201e16dd951b6
BLAKE2b-256 a4011c7c4c0e639a5b10b60f52edd8da2015a4797b0b59f688084bce352146a4

See more details on using hashes here.

Provenance

The following attestation bundles were made for richforms-0.4.0-py3-none-any.whl:

Publisher: publish.yml on shinybrar/richforms

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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