Data validation library using Python type hints and annotations
Data validation using Python type hints
pydantic$ python -c "from pydantic import BaseModel; class User(BaseModel): name: str; age: int; user = User(name='John', age=30); print(user)"$ python -c "from pydantic import BaseModel; class Config(BaseModel): host: str; port: int; config = Config.model_validate_json('{\"host\":\"localhost\",\"port\":8000}'); print(config)"$ python -c "from pydantic import BaseModel; class Product(BaseModel): id: int; name: str; price: float; print(Product.model_json_schema())"