Innopolis University DevOps Playground
Skip to content
Snippets Groups Projects
Verified Commit 85b62247 authored by Anton Kudryavtsev's avatar Anton Kudryavtsev
Browse files

feat: default fallback for pydantic config file

parent 768386b8
No related branches found
No related tags found
1 merge request!51Deploy/build docs
......@@ -30,4 +30,6 @@ class Config(BaseSettings):
@lru_cache
def get_config() -> Config:
return Config.parse_file(".config.json") # read settings from .config.json file
if Path(".config.json").exists():
return Config.parse_file(".config.json") # read settings from .config.json file
return Config.parse_file("example.config.json")
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment