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
{{ message }}
Repository navigation
How could someone use rodi in web frameworks other than BlackSheep #51
@aeb-dev
I'm creating a library using Rodi and FastAPI. Although it might be overkill for what you're asking, you can see how I implemented and combined them here if you have the time to go through the code haha:
We integrated Rodi into FastAPI via a custom middleware, and to Strawberry via a SchemaExtension. To not interfere with either framework we use wrappers to remove the autowired parameters from what the frameworks see. Strawberry specifically isn't friendly to this process.
Activity
lucas-labs commentedon Feb 8, 2024
@aeb-dev
I'm creating a library using Rodi and FastAPI. Although it might be overkill for what you're asking, you can see how I implemented and combined them here if you have the time to go through the code haha:
https://github.com/lucas-labs/pest/blob/master/pest/core/module.py
aeb-dev commentedon Feb 12, 2024
Thank you @lucas-labs. We actually inspired from your project to achieve what we want. Thanks for the idea!
StummeJ commentedon Feb 28, 2024
We integrated Rodi into FastAPI via a custom middleware, and to Strawberry via a SchemaExtension. To not interfere with either framework we use wrappers to remove the autowired parameters from what the frameworks see. Strawberry specifically isn't friendly to this process.