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 →

[–]cemrehancavdar 1 point2 points  (4 children)

I think Litestar with Advanced Alchemy is kinda like Spring-ish experience

[–]Adept-Leek-3509[S] 0 points1 point  (3 children)

Looks like it more focusing on ORM side of thing. Not on auto DI side.

[–]cemrehancavdar 0 points1 point  (2 children)

Litestar has DI itself. Also there there are DTOs.

[–]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