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.

Try the demo

The fastest way to see wizdantic in action is to run the interactive demo. No install required:

uvx --from=wizdantic[demo] wizdantic-demo

The demo walks through every supported field type, one spell at a time. Each spell shows the model definition and a plain-English description, then drops you into a live wizard.

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.2.0.tar.gz (23.3 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.2.0-py3-none-any.whl (30.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wizdantic-0.2.0.tar.gz
  • Upload date:
  • Size: 23.3 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.2.0.tar.gz
Algorithm Hash digest
SHA256 5def69a7da720af040fd67a10c56cc56474229adbcbf4c9873c7b9c420eb586b
MD5 cce18744cbd92e502445013652bb9b26
BLAKE2b-256 460cb4262404d1ebf2d652c78eae8a0746b5969294fcfe5f3bc30bc6289ac89a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wizdantic-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 30.1 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a3799a4db213d58bdfe65bfc89765d52bf686467946896b7fa0997cf65135061
MD5 8a5d242f1674913155cfd5f66eb39d1f
BLAKE2b-256 9686ddb21814a16dfd5c9c6a2fd9647093af9a90e590bcc0a5b2becef381d069

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