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

Uploaded Python 3

File details

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

File metadata

  • Download URL: wizdantic-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 ae15c83a882ead812d5c260fb250b7e714d9b81b7d722a42a1b5cf1ba685e7bf
MD5 28b6d6d5e61e512d8d57f86a3425dbc4
BLAKE2b-256 b2ed2bfcf56cb7e5d62a2ede04085eb97f64118c34b70b49cbcce9584d9d0964

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wizdantic-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 52a0e24961e4adab66e9a89a4d3f470752890af0277d1ba873ed99efb63efb01
MD5 c8a9709fecfbba3b33e10f1f85587437
BLAKE2b-256 176eba928a2a383498dfdcfaaa4acfba3f6b29334b5a33b78f78baf42d064734

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