You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be highly beneficial to add support for pydantic-settings within griffe-pydantic. Currently, griffe-pydantic effectively handles Pydantic BaseModel classes, but lacks the ability to process pydantic_settings.BaseSettings classes.
pydantic-settings is widely used for managing application configurations, particularly in modern Python projects. Integrating it with griffe-pydantic would:
Simplify Configuration Documentation: Enable automatic generation of documentation for settings models, including environment variable names, default values, and validation constraints.
Enhance Developer Experience: Provide a consistent and streamlined approach to documenting both data models and configuration settings within Pydantic-based projects.
Improve Code Maintainability: Ensure that configuration settings are documented alongside the rest of the codebase, reducing the risk of inconsistencies.
The text was updated successfully, but these errors were encountered:
It's probably that the static analysis agent only checks for pydantic.BaseModel in the base classes, non-recursively. It doesn't try to load additional packages like SQLModel so it wouldn't know that sqlmodel.SQLModel (or whatever the path is) actually inherits from pydantic.BaseModel too.
Aha, if it's just static, then might be as simple as accepting config to look for a different base class name? Wouldn't handle any specific customizations one might want for pydantic-settings, so not to hijack the issue, but I'll try my hand at it this evening.
It would be highly beneficial to add support for
pydantic-settings
within griffe-pydantic. Currently, griffe-pydantic effectively handles PydanticBaseModel
classes, but lacks the ability to processpydantic_settings.BaseSettings
classes.https://docs.pydantic.dev/latest/concepts/pydantic_settings/
Motivation:
pydantic-settings
is widely used for managing application configurations, particularly in modern Python projects. Integrating it with griffe-pydantic would:The text was updated successfully, but these errors were encountered: