from typing import TYPE_CHECKING, Any

from fastapi import Request

if TYPE_CHECKING:
    from app.core.services import AppServices
else:
    AppServices = Any


async def get_services(request: Request) -> AppServices:
    return request.app.state.services
