No project description provided
Project description
Pydantic CLI Models
Pydantic + Click == Perfection.
Reduce boilerplate by 2x (at least), turning this:
import click
from pydantic import BaseModel
class Person(BaseModel):
name: str
age: int
@click.command()
@click.option("--name", type=str)
@click.option("--age", type=int)
def main(name, age):
person = Person(name=name, age=age)
# ... do something with person ...
Into this:
from pydantic_cli_model import CLIModel
class Person(CLIModel):
name: str
age: int
@Person.cli
def main(person:Person):
...
# ... do something with person ...
And get data validation for free!
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 pydantic_cli_model-0.1.0.tar.gz.
File metadata
- Download URL: pydantic_cli_model-0.1.0.tar.gz
- Upload date:
- Size: 1.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.1 Darwin/23.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
814aa3a42206ea80f41ba3d395d9e1de277216eff2bc32a6276cf98285c28790
|
|
| MD5 |
621b136f0573684ed29cca8600478c94
|
|
| BLAKE2b-256 |
9b7cfac7b4da3e7d370b2217941bb0cfdfc1eb452d2f74eaddeaccde6af2a6ac
|
File details
Details for the file pydantic_cli_model-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pydantic_cli_model-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.1 Darwin/23.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
936ac6c082e4f93b1a17109db43704cbbf1eef2e794f2a03cbb434dc8612a9ec
|
|
| MD5 |
6d0d688d251d18c67ac640aba8953fd9
|
|
| BLAKE2b-256 |
b1652628e3895d8759818357c1f82d8c7b8d644bfcd0b60c2248c77dcd026cf3
|