Innopolis University DevOps Playground
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Follow My Reading
Manage
Activity
Members
Labels
Plan
Issues
6
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Anton Kudryavtsev
Follow My Reading
Commits
85b62247
Verified
Commit
85b62247
authored
1 year ago
by
Anton Kudryavtsev
Browse files
Options
Downloads
Patches
Plain Diff
feat: default fallback for pydantic config file
parent
768386b8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!51
Deploy/build docs
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
config.py
+3
-1
3 additions, 1 deletion
config.py
with
3 additions
and
1 deletion
config.py
+
3
−
1
View file @
85b62247
...
...
@@ -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
"
)
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment