Collect values for a pydantic model via a wizard
Project description
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ae15c83a882ead812d5c260fb250b7e714d9b81b7d722a42a1b5cf1ba685e7bf
|
|
| MD5 |
28b6d6d5e61e512d8d57f86a3425dbc4
|
|
| BLAKE2b-256 |
b2ed2bfcf56cb7e5d62a2ede04085eb97f64118c34b70b49cbcce9584d9d0964
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52a0e24961e4adab66e9a89a4d3f470752890af0277d1ba873ed99efb63efb01
|
|
| MD5 |
c8a9709fecfbba3b33e10f1f85587437
|
|
| BLAKE2b-256 |
176eba928a2a383498dfdcfaaa4acfba3f6b29334b5a33b78f78baf42d064734
|