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