Compare commits

...

3 Commits

Author SHA1 Message Date
whymequestion ac33088778
Merge 317cf04b16 into 582c0f571c 2026-03-12 10:23:38 +05:00
whymequestion 317cf04b16 убрал импорт после c642434 2026-03-12 05:22:52 +05:00
whymequestion c64243485b refactor: вернул dotenv 2026-03-12 05:20:37 +05:00
2 changed files with 4 additions and 18 deletions

View File

@ -4,4 +4,5 @@ msgpack
lz4
websockets
pydantic
aiosqlite
aiosqlite
python-dotenv

View File

@ -1,22 +1,7 @@
import os
from pathlib import Path
from dotenv import load_dotenv
def _load_dotenv():
env_path = Path(".env")
if not env_path.is_file():
return
with open(env_path, encoding="utf-8") as f:
for line in f:
line = line.strip()
if not line or line.startswith("#") or "=" not in line:
continue
key, _, value = line.partition("=")
key = key.strip()
value = value.strip().strip("\"'")
if key and key not in os.environ:
os.environ[key] = value
_load_dotenv()
load_dotenv()
class ServerConfig:
def __init__(self):