FastAPI - Dependency Injection
Consider this FastAPI snippet:
What response will the endpoint return when accessed?
from fastapi import FastAPI, Depends
app = FastAPI()
def provide_value():
return 100
@app.get("/value")
async def get_value(val: int = Depends(provide_value)):
return {"value": val}What response will the endpoint return when accessed?
