Files
spotify_vibe/app/runtime.py
2026-02-26 19:33:05 +00:00

26 lines
610 B
Python

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