You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How to implement SQLAlchemy session? A separate class that will be initialized on the FastAPI startup event handler and passed to the controller via FastAPI Depends() (or import). Or implemented into base model class.
How long keep an open session? Perpetual per worker? Or per request with context manager for db connection?
Implement dynamically generation of pydantic model classes for FastAPI endpoints (These Pydantic models define more or less a "schema" for endpoints to have common attributes while reading data.)? Or hard coded in separate files?
This still needs some more research and clarification.
The text was updated successfully, but these errors were encountered:
rszamszur
changed the title
[Databases support] Implement SQLAlchemy Base model class
[Databases support] Implement declarative base Model class
Jun 21, 2022
Feature Request
In order to add support for databases with SQLAlchemy, a Base model class needs to be implemented from which concrete models will be inheriting.
Resources:
To think through:
Depends()
(or import). Or implemented into base model class.This still needs some more research and clarification.
The text was updated successfully, but these errors were encountered: