Fast Api Multi Folder #232
Unanswered
pierresigwalt
asked this question in
Q&A
Replies: 2 comments
-
@pierresigwalt Did you ever figure it out? |
Beta Was this translation helpful? Give feedback.
0 replies
-
I think you can initialize the advanced-alchemy/advanced_alchemy/extensions/starlette.py Lines 112 to 132 in 9549268 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So, I have followed the FastApi Example, everything works when everything is in one file. However I am having hard time when trying to put some order in the organisation (Circular dependency) and can't see how to avoid this (I kind of follow litestart organisation because I like the approach):
My Current Setup is the following:
app/
├── main.py
├── domain
│ ├── dependencies.py
├── server
│ ├── dependencies.py
However as main.py alchemy variable need the app (FastApi) I can't really move it out from the main.py from my knowledge off course, bringing the issue of the dependency.
So the question is:
How can I create alchemy->provide_db_session outside of the main.py and be able to include the app to StarletteAdvancedAlchemy
Many thank for the help, hopefully it's clear.
Beta Was this translation helpful? Give feedback.
All reactions