FastAPI - Dependency Injection
Given the code below, what will be the output when accessing the
/users/ endpoint?from fastapi import FastAPI, Depends
app = FastAPI()
def get_user():
return "Alice"
@app.get('/users/')
def read_user(user: str = Depends(get_user)):
return {"user": user}