settings-doc
settings-doc copied to clipboard
A command line tool for generating Markdown documentation and .env files from pydantic BaseSettings.
This is a follow-up from #15 . Admittedly, what I'm trying to do is somewhat unorthodox. I'm not in love with Pydantic's "nested delimiter" feature. Personally, I'd rather not leak...
I have finally gotten around to work on this. I added 2 hooks `initialize_environment` and `pre_render`. The `pre_render` allow the user to modify the `render_kwargs` as necessary. Would love to...
Hello @radeklat , thanks for the last update to expose classes. So far, I am enjoying my experience in auto generating configurations for my apps :D. Currently I am contemplating...
```python class Env(str, Enum): Dev = "dev" Prod = "prod" class Settings(BaseSettings): model_config = SettingsConfigDict(env_prefix="APP__", env_nested_delimiter="__") env: Env = Env.Dev ``` ```markdown # `APP__ENV` *Optional*, default value: `Env.Dev` ``` Would...
Hi 👋🏼 First, thanks for `settings-doc` Would you be interested in a PR exposing a `MkDocs` plugin so people using MkDocs could write: ```markdown ::: settings-doc :class: settings.AppSettings ``` Or...
- Support for `AliasChoices` objects in `validation_alias`, yielding the first choice as the preferred alias. - The first, and presumably preferred alias, is [guaranteed by pydantic](https://github.com/pydantic/pydantic/blob/f7a9b73517afecf25bf898e3b5f591dffe669778/pydantic/aliases.py#L71) to be the first...
When following the docs, ``` settings-doc generate --class src.settings.AppSettings --output-format markdown Usage: settings-doc generate [OPTIONS] Try 'settings-doc generate --help' for help. Error: Invalid value for '--class' / '-c': Cannot read...