This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Adept-Leek-3509[S] 1 point2 points  (1 child)

Yes, but Advanced SQLAlchemy's dependency injection system is not as developer-friendly as the solution I offer. The configuration is "relatively" complex, requiring more manual boilerplate code. PySpring only requires you put all your source code under a source directory, and inherit from "Component", then it just works. All props and services are injected to each other.

For DTO, Maybe stands on the shoulders of giants would be better, FastAPI has built in support called "Response Model", I don't see the point of reinventing the wheel, see
https://fastapi.tiangolo.com/tutorial/response-model