How do people normally handle database session wit...
# ask-community
b
How do people normally handle database session with prefect? I am currently using FastAPI, and using its dependency injection mechanism for injecting database sessions, and other objects that also accept DB session as a param. If I move this over to prefect, any ideas on best practices for managing dependencies, nested dependencies, database sessions, etc? Any good repos to look at?
j
I am using psycopg (3)'s database pool mechanism to get the connections because when different tasks connect to the database it is thread safe, but my database pipeline is not using FastAPI at all.