Skip to main content

Collect values for a pydantic model via a wizard

Project description

Latest Version Python Versions Build Status Documentation Status

wizdantic

wizdantic

Conjure populated Pydantic models from thin air with an interactive terminal wizard.

Super-quick start

Requires Python 3.12+.

pip install wizdantic

Usage

Define a Pydantic model. Call run_wizard. That's it.

from pydantic import BaseModel, Field
from wizdantic import run_wizard

class Spellbook(BaseModel):
    name: str = Field(description="Spellbook title")
    page_count: int = Field(description="Number of pages", default=300)
    ink_weight_kg: float = Field(description="Weight of enchanted ink in kilograms", default=0.4)
    cursed: bool = Field(description="Bound with a curse", default=False)

book = run_wizard(Spellbook, title="Register a Spellbook")

The wizard walks the user through each field, validates input inline, insists on required values, pre-fills defaults, and returns a fully constructed model instance.

Documentation

Full documentation at dusktreader.github.io/wizdantic.

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

wizdantic-0.1.2.tar.gz (22.0 kB view details)

Uploaded Source

Built Distribution

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

wizdantic-0.1.2-py3-none-any.whl (28.4 kB view details)

Uploaded Python 3

File details

Details for the file wizdantic-0.1.2.tar.gz.

File metadata

  • Download URL: wizdantic-0.1.2.tar.gz
  • Upload date:
  • Size: 22.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for wizdantic-0.1.2.tar.gz
Algorithm Hash digest
SHA256 cc0a216814e38605f73fc5cafa7d0e93edb1f2781a81744034ca42455bb2bdce
MD5 bf4116e74b977fd5009a8ad8b9c6df1a
BLAKE2b-256 7c51fcfc5a43de767289c4fe2036cb486677628bb94cd6900e23ee28b33175ce

See more details on using hashes here.

File details

Details for the file wizdantic-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: wizdantic-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 28.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for wizdantic-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0876a7a0b58d0dc1b8d6108e4c80bcfbf8b48c7dcf4c250ebe7c1e461abffefa
MD5 d8c12bbc918a229f66d0570086ca42b3
BLAKE2b-256 c6ffbde5e44e203f57992f9e8ca585b624def90ea81505283d25a2e2990a76e5

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