FastAPI - Dependency Injection
Analyze this FastAPI dependency code:
What is the main issue with this code?
from fastapi import Depends
def get_resource():
resource = open_resource()
return resource
def fetch_data(res = get_resource()):
return res.read()What is the main issue with this code?
