A kind of initial commit

This commit is contained in:
heboba
2026-02-26 19:33:05 +00:00
commit 9ab125b1a6
37 changed files with 3053 additions and 0 deletions

25
app/runtime.py Normal file
View File

@@ -0,0 +1,25 @@
from __future__ import annotations
import asyncio
from dataclasses import dataclass
from typing import Any
import httpx
from sqlalchemy.ext.asyncio import AsyncEngine, AsyncSession, async_sessionmaker
from app.clients.lastfm import LastFmClient
from app.clients.spotify import SpotifyClient
from app.config import Settings
@dataclass
class AppRuntime:
settings: Settings
engine: AsyncEngine
session_factory: async_sessionmaker[AsyncSession]
http_client: httpx.AsyncClient
spotify: SpotifyClient
lastfm: LastFmClient
generate_lock: asyncio.Lock
telegram_runner: Any = None