{"library":"patito","title":"Patito","description":"Patito is a dataframe modelling library built on top of Polars and Pydantic, providing a declarative way to define schemas, validate data, and serialize dataframes. Version 0.8.6 requires Python >= 3.9 and polars >= 1.32.0. The library is actively maintained with frequent releases.","language":"python","status":"active","last_verified":"Fri May 01","install":{"commands":["pip install patito"],"cli":null},"imports":["from patito import Model","from patito import DataFrame"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import polars as pl\nfrom patito import Model, validate\n\nclass Product(Model):\n    product_id: int\n    name: str\n    price: float = 0.0\n    is_active: bool = True\n\n# Create a valid dataframe\ndf = pl.DataFrame({\n    \"product_id\": [1, 2, 3],\n    \"name\": [\"A\", \"B\", \"C\"],\n    \"price\": [10.0, 20.0, 30.0],\n})\n\n# Validate and cast\nvalidated = Product.validate(df)\nprint(validated)\n\n# Use patito's DataFrame type hint for type checking\nproducts: DataFrame[Product] = df","lang":"python","description":"Define a Pydantic model, create a Polars DataFrame, and validate it with patito.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}