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 Starship(BaseModel):
    name: str = Field(description="Ship designation")
    crew_size: int = Field(description="Number of crew", default=4)
    hyperdrive_rating: float = Field(description="Hyperdrive class", default=1.0)
    armed: bool = Field(description="Carries weapons", default=True)

ship = run_wizard(Starship, title="Register a Starship")

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.0.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.0-py3-none-any.whl (28.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wizdantic-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 2f8f1766708f0ef0594073871721386ec0f83cfbcd2db38313424a7ed843c9d2
MD5 4c1e3ea4b2121d273e6c8dcdb4de73ae
BLAKE2b-256 9405bef789034ef9f1d9d707298cf73323b612e1c1e92d2a1ba72eb7ebe77a3d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wizdantic-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 28.3 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 acc552d7754dbd75cd468308589ff9aae703cd4aad1f07f21adf3ebc50165034
MD5 b0a56f4e30427de69169aef68ba9d3c7
BLAKE2b-256 36f874c5a3087d38d31c2b906cce096c4572050c29d41f3e3ec2df2cf577312f

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