first one

This commit is contained in:
2023-06-05 16:31:04 +03:00
commit e25080d054
11 changed files with 165 additions and 0 deletions

15
bot/app/db/settings.py Normal file
View File

@ -0,0 +1,15 @@
from dataclasses import dataclass
@dataclass
class Settings:
dialect: str = "postgresql"
driver: str = "psycopg2"
user: str = "user"
password: str = "password"
db_name: str = "db"
host: str = "postgres"
port: int = 5432
@property
def uri(self):
return f"{self.dialect}+{self.driver}://{self.user}:{self.password}@{self.host}:{self.port}/{self.db_name}"