Skip to content

Use pydantic settings #52

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

paketb0te
Copy link
Contributor

Pydantic's BaseSettings give us automatic parsing of env vars for all defined settings for free.

Git-sim will use the default values specified in the Settings class if neither the corresponding flag nor env var is set.

If an env var is set, it will be used instead of the default.

If a flag is set, that will always be used, overriding an env var (if present).

@initialcommit-io initialcommit-io merged commit 855b7ae into initialcommit-com:main Feb 10, 2023
@paketb0te paketb0te deleted the use_pydantic_settings branch February 10, 2023 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants