from dependency_injector.wiring import Provide, inject from fastapi import APIRouter, Depends from api.di import Container from api.service.user import UserService router = APIRouter() @router.get("/users") @inject async def get_user_list( user_service: UserService = Depends(Provide[Container.user_service]), ): return await user_service.get_all_users() @router.get("/status") def get_status(): return {"status": "OK"}