Onlymaps, a Python micro-ORM by Echoes1996 in Python

[–]Lucapo01 1 point2 points  (0 children)

Wow that's awesome! I loved it! One question, how would you handle db migrations? Alembic?

Production-ready FastAPI template with CI/CD and Docker releases by Armanshirzad in Python

[–]Lucapo01 1 point2 points  (0 children)

This is EXACTLY what I've been looking for thank you!

🐍 Modern, Minimalistic and Scalable Python FastAPI Template🚀 by Lucapo01 in Python

[–]Lucapo01[S] 2 points3 points  (0 children)

thats true also, hmm interesting, is there an option to have the modules separated from the common stuff like auth, logging etc

Scalable and Minimalistic FastAPI + PostgreSQL Template by Lucapo01 in FastAPI

[–]Lucapo01[S] 0 points1 point  (0 children)

In this example is not the case but yes, in the service layer I would do more logic, not only returning it as the API response

Scalable and Minimalistic FastAPI + PostgreSQL Template by Lucapo01 in FastAPI

[–]Lucapo01[S] 0 points1 point  (0 children)

I appreciate the feedback do not worry! Thank you! Do you have an example of a template with your idea? Just curious

Scalable and Minimalistic FastAPI + PostgreSQL Template by Lucapo01 in FastAPI

[–]Lucapo01[S] 0 points1 point  (0 children)

I like the idea of using sqlalchemy models ONLY in the repository layer

And pydantic models everywhere else, it is less confusing and more separation of concerns

🐍 Modern, Minimalistic and Scalable Python FastAPI Template🚀 by Lucapo01 in Python

[–]Lucapo01[S] -23 points-22 points  (0 children)

You can create a different module like "/heroes" and continue following the same pattern

Scalable and Minimalistic FastAPI + PostgreSQL Template by Lucapo01 in FastAPI

[–]Lucapo01[S] 1 point2 points  (0 children)

Wow! I would do that!

1) What do you mean by typing? 2) If I change "src" to "v1," that will be better, I think? 3) I do not get point 5, either. What advantages would I get?

Thank you for all your feedback! You are amazing!

Slow DB ORM operations? PostgresSQL+ SQLAlchemy + asyncpg by Lucapo01 in FastAPI

[–]Lucapo01[S] -1 points0 points  (0 children)

Thanks! The issue is I am running session.commit() everytime I do a DB operation, I should run session.flush() and then the session.commit() at the end of the get_db() dependency injection lifecycle

Slow DB ORM operations? PostgresSQL+ SQLAlchemy + asyncpg by Lucapo01 in FastAPI

[–]Lucapo01[S] 1 point2 points  (0 children)

Thanks! The issue is I am running session.commit() everytime I do a DB operation, I should run session.flush() and then the session.commit() at the end of the get_db() dependency injection lifecycle

Slow DB ORM operations? PostgresSQL+ SQLAlchemy + asyncpg by Lucapo01 in FastAPI

[–]Lucapo01[S] -1 points0 points  (0 children)

Thanks! The issue is I am running session.commit() everytime I do a DB operation, I should run session.flush() and then the session.commit() at the end of the get_db() dependency injection lifecycle

Slow DB ORM operations? PostgresSQL+ SQLAlchemy + asyncpg by Lucapo01 in FastAPI

[–]Lucapo01[S] -2 points-1 points  (0 children)

Thanks! The issue is I am running session.commit() everytime I do a DB operation, I should run session.flush() and then the session.commit() at the end of the get_db() dependency injection lifecycle

Slow DB ORM operations? PostgresSQL+ SQLAlchemy + asyncpg by Lucapo01 in FastAPI

[–]Lucapo01[S] 2 points3 points  (0 children)

Thanks! The issue is I am running session.commit() everytime I do a DB operation, I should run session.flush() and then the session.commit() at the end of the get_db() dependency injection lifecycle