diff --git a/ingest/settings.py b/ingest/settings.py index d0b94c8..f7fa380 100644 --- a/ingest/settings.py +++ b/ingest/settings.py @@ -19,8 +19,6 @@ class Settings(BaseSettings): DATABASE_DB: str DATABASE_HOST: str DATABASE_PORT: int - DATABASE_READ_URL: Union[str, None] - DATABASE_WRITE_URL: Union[str, None] DRYRUN: bool = False FETCH_BUCKET: str ETL_BUCKET: str @@ -35,14 +33,14 @@ class Settings(BaseSettings): @computed_field def DATABASE_READ_URL(self) -> str: - return f"postgresql://{values['DATABASE_READ_USER']}:{values['DATABASE_READ_PASSWORD']}@{values['DATABASE_HOST']}:{values['DATABASE_PORT']}/{values['DATABASE_DB']}" + return f"postgresql://{self.DATABASE_READ_USER}:{self.DATABASE_READ_PASSWORD}@{self.DATABASE_HOST}:{self.DATABASE_PORT}/{self.DATABASE_DB}" @computed_field def DATABASE_WRITE_URL(self) -> str: - return f"postgresql://{values['DATABASE_WRITE_USER']}:{values['DATABASE_WRITE_PASSWORD']}@{values['DATABASE_HOST']}:{values['DATABASE_PORT']}/{values['DATABASE_DB']}" + return f"postgresql://{self.DATABASE_WRITE_USER}:{self.DATABASE_WRITE_PASSWORD}@{self.DATABASE_HOST}:{self.DATABASE_PORT}/{self.DATABASE_DB}" model_config = SettingsConfigDict( - extra="ignore", env_file=f"../{environ.get('DOTENV', '.env')}", env_file_encoding="utf-8" + extra="ignore", env_file=f"{environ.get('DOTENV', '.env')}", env_file_encoding="utf-8" ) diff --git a/pyproject.toml b/pyproject.toml index 98ecf3f..e198914 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,6 +19,7 @@ pydantic-settings = "^2.3.2" [tool.poetry.group.cdk.dependencies] aws-cdk-lib = "^2.145.0" +boto3 = "^1.34.124" [build-system] requires = ["poetry-core"]