{"id":23502,"library":"dash-pydantic-utils","title":"Dash Pydantic Utils","description":"Utility library for dash-pydantic-form, providing model handling, validation, and serialization helpers for building dynamic forms with Dash and Pydantic v2. Current version 0.18.3, requires Python >=3.10,<3.14. Active development with frequent releases.","status":"active","version":"0.18.3","language":"python","source_language":"en","source_url":"https://github.com/RenaudLN/dash-pydantic-form","tags":["dash","pydantic","form","utils"],"install":[{"cmd":"pip install dash-pydantic-utils","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core dependency for Dash components and callbacks","package":"dash","optional":false},{"reason":"Pydantic model definitions and validation (v2)","package":"pydantic","optional":false}],"imports":[{"note":"ModelForm moved to dash-pydantic-utils in v0.17+","wrong":"from dash_pydantic_form import ModelForm","symbol":"ModelForm","correct":"from dash_pydantic_utils import ModelForm"},{"note":"","wrong":"","symbol":"create_model_form","correct":"from dash_pydantic_utils import create_model_form"}],"quickstart":{"code":"from dash_pydantic_utils import ModelForm\nimport dash\nfrom dash import html\n\napp = dash.Dash(__name__)\n\nclass MyModel(BaseModel):\n    name: str = 'World'\n\nform = ModelForm(MyModel, id='my-form')\n\napp.layout = html.Div([form])\n\nif __name__ == '__main__':\n    app.run_server(debug=True)","lang":"python","description":"Basic usage creating a form from a Pydantic model."},"warnings":[{"fix":"Change 'from dash_pydantic_form import ModelForm' to 'from dash_pydantic_utils import ModelForm'","message":"dash-pydantic-utils was split from dash-pydantic-form (around v0.17). Imports from dash_pydantic_form may break. Re-import from dash_pydantic_utils.","severity":"breaking","affected_versions":">=0.17"},{"fix":"Replace 'Form' imports with 'ModelForm' from dash_pydantic_utils.","message":"The old 'Form' component (from dash_pydantic_form) is deprecated. Use 'ModelForm' from dash_pydantic_utils instead.","severity":"deprecated","affected_versions":">=0.17"},{"fix":"Ensure your model inherits from pydantic.BaseModel (v2), not v1 BaseModel.","message":"ModelForm requires a Pydantic v2 model. Using v1 models will cause validation errors.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"pip install dash-pydantic-utils","cause":"Package not installed or wrong import path after split.","error":"ModuleNotFoundError: No module named 'dash_pydantic_utils'"},{"fix":"Use 'from dash_pydantic_utils import ModelForm' instead.","cause":"ModelForm was moved to dash-pydantic-utils in v0.17.","error":"ImportError: cannot import name 'ModelForm' from 'dash_pydantic_form'"},{"fix":"Migrate validators to v2 syntax (e.g., @field_validator instead of @validator).","cause":"Using Pydantic v1 field validators without proper migration.","error":"pydantic.errors.PydanticUserError: A custom validation cannot be defined for a field that is not a model field"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}