diff options
| author | Tolmachev Igor <me@igorek.dev> | 2026-03-22 19:56:47 +0300 |
|---|---|---|
| committer | Tolmachev Igor <me@igorek.dev> | 2026-03-22 20:19:27 +0300 |
| commit | 536d022e8a55f6e53f01dfb7e0fae2ef24385aad (patch) | |
| tree | 721d7195db7fc12c725b27301f77e345df64d1b4 /settings.py | |
| download | vpn_manager_bot-536d022e8a55f6e53f01dfb7e0fae2ef24385aad.tar.gz vpn_manager_bot-536d022e8a55f6e53f01dfb7e0fae2ef24385aad.zip | |
Init project
Diffstat (limited to 'settings.py')
| -rw-r--r-- | settings.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/settings.py b/settings.py new file mode 100644 index 0000000..2daff90 --- /dev/null +++ b/settings.py | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | from pathlib import Path | ||
| 2 | |||
| 3 | from pydantic_settings import BaseSettings | ||
| 4 | |||
| 5 | |||
| 6 | class Env(BaseSettings): | ||
| 7 | token: str | ||
| 8 | proxy: str | None = None | ||
| 9 | |||
| 10 | |||
| 11 | database_path = Path("./storage/database.db").absolute() | ||
| 12 | database_path.parent.mkdir(parents=True, exist_ok=True) | ||
| 13 | database_url = f"sqlite+aiosqlite:///{database_path}" | ||
| 14 | |||
| 15 | __all__ = [ | ||
| 16 | "database_path", | ||
| 17 | "database_url", | ||
| 18 | "Env", | ||
| 19 | ] | ||
