Skip to content

Commit

Permalink
Use pydantic-settings
Browse files Browse the repository at this point in the history
  • Loading branch information
prrao87 committed Jul 17, 2023
1 parent bc431b9 commit 4211ad8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions dbs/elasticsearch/api/config.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
from pydantic import BaseSettings
from pydantic_settings import BaseSettings, SettingsConfigDict


class Settings(BaseSettings):
model_config = SettingsConfigDict(
env_file=".env",
extra="allow",
)

elastic_service: str
elastic_user: str
elastic_password: str
Expand All @@ -10,5 +15,3 @@ class Settings(BaseSettings):
elastic_index_alias: str
tag: str

class Config:
env_file = ".env"

0 comments on commit 4211ad8

Please sign in to comment.