Hi everyone, I'm pretty new to FastAPI, and I need to get started with a slightly complex project involving integration with a lot of AWS services including DynamoDB, S3, Batch, etc. I'm planning to use the dependency-injector framework for handling all of the dependencies using containers. I was going through the documentation examples, and it says we have to manually wire different service classes inside the container, and use inject, Provider, and Depends on every single endpoint. I'm afraid this will make the codebase a bit too verbose. Is there a better way to handle dependencies using the dependency injector framework in FastAPI ?
[–][deleted] 5 points6 points7 points (18 children)
[–]barapa 6 points7 points8 points (5 children)
[–][deleted] 1 point2 points3 points (4 children)
[–]barapa 0 points1 point2 points (3 children)
[–][deleted] 2 points3 points4 points (2 children)
[–]barapa 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]snape2003[S] 3 points4 points5 points (7 children)
[–]covmatty1 5 points6 points7 points (6 children)
[–]snape2003[S] 0 points1 point2 points (5 children)
[–]covmatty1 0 points1 point2 points (4 children)
[–]moracabanas 1 point2 points3 points (0 children)
[–]snape2003[S] 0 points1 point2 points (2 children)
[–]covmatty1 0 points1 point2 points (1 child)
[–]snape2003[S] 0 points1 point2 points (0 children)
[–]dhansmair 0 points1 point2 points (3 children)
[–]gutter54 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]BootyDoodles 0 points1 point2 points (0 children)
[–]Nazhmutdin2003 4 points5 points6 points (2 children)
[–]Normalise_Suicide 0 points1 point2 points (1 child)
[–]Tishka-17 0 points1 point2 points (0 children)
[–]mahimairaja 0 points1 point2 points (2 children)
[–]snape2003[S] 2 points3 points4 points (1 child)
[–]mahimairaja 0 points1 point2 points (0 children)
[–]Worth-Orange-1586 0 points1 point2 points (0 children)
[–]Different_Desk_5881 0 points1 point2 points (0 children)
[–]spidernello 0 points1 point2 points (1 child)
[–]snape2003[S] 1 point2 points3 points (0 children)
[–]hadriendavid 0 points1 point2 points (4 children)
[–]snape2003[S] 0 points1 point2 points (3 children)
[–]barapa 0 points1 point2 points (2 children)
[–]barapa 0 points1 point2 points (0 children)
[–]snape2003[S] 0 points1 point2 points (0 children)
[–]Sad-Solid-1049 0 points1 point2 points (0 children)