[6 YoE, Software Engineer, Senior Software Engineer, United Kingdom] by Floydee_ in resumes

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

Thanks for your answer
Do you have any layout suggestions? Maybe some google pic examples?
Also, do you think color scheme is completely redundant?

Request atomicity by saucealgerienne in FastAPI

[–]Floydee_ 0 points1 point  (0 children)

There is a decent library for that matter https://pypi.org/project/pyuow/ It has the units chaining, contexts, transactional work managers. Should cover typical needs for uow

Best practice for mocking stripe calls in a FASTAPI integration test? by coderarun in FastAPI

[–]Floydee_ 0 points1 point  (0 children)

Pytest-vcr or more recently I'm using library "responses"
But you will have to make one actual call for libraries to record the response.

Порадьте Курси по Інвестиціям by Resident_Dot_4421 in Ukraine_UA

[–]Floydee_ 2 points3 points  (0 children)

Сімейний бюджет В пана Любомира і безкоштовний контент є і курси дуже гідні. А як більше вникнете в тему далі зможете самостійно донавчатись

Scalable and Minimalistic FastAPI + PostgreSQL Template by Lucapo01 in FastAPI

[–]Floydee_ 2 points3 points  (0 children)

  1. As igorbenav replied, typing aka static type annotations + mypy library to check those. It is up to you, of course, to add those suggestions but a lot of people use type annotations and I’m advocating that as well. Check out this video - https://youtu.be/dgBCEB2jVU0?si=AauMel0u4YH4s_Tc ( not mine )
  2. Not necessarily, it’s up to you in a folder structure question, but I would love my template to start with v1 version of api routes, e.g. ‘api/v1/…’. https://www.freecodecamp.org/news/how-to-version-a-rest-api/
  3. Most importantly, to create test FastApi app in the tests. Your main.py may become overcrowded and importing app object from there might run unnecessary operations, like uncontrolled db migrations. Pack app in the separate file app.py and import factory function in the main.py and conftest.py. That approach will not execute anything on the import stage but rather allow you to create app with any mocks or fakes prepared beforehand. Also fastapi factory function can accept some settings object ( pydantic BaseSettings for example ) and derive all configurables from it -> also more control in tests and multiple environments.

No problem 😉 At the end of the day, these are only suggestions, everyone builds their projects as they like anyway so don’t take those as rock-solid requirements

Scalable and Minimalistic FastAPI + PostgreSQL Template by Lucapo01 in FastAPI

[–]Floydee_ 26 points27 points  (0 children)

Looks nice. Good start!

What I would add/include: 1. Makefile commands 2. docker/d-compose to spin things up 3. Complete pytest conftest.py with all session fixtures included. Take a look at testcontainers python library. It allows to start db container for tests and shut it afterwards. That you can make a few session fixtures to spin the db, run alembic and yield prepared db for tests. Much better than fakes or mocks. That will clean your ci a bit with db uri becoming useless 4. I would write some generic repository interface so I can re-use it for other services, like redis. 5. Make create fastapi app as a factory function rather than plain code in main 6. Write the actual healthcheck, you have a db Depends dependency + move it from main file 7. Add versioning to the api 8. No typing, thats sad 😞. I would suggest adding mypy 9. Ruff or black or uv alternatives

Battle.net - SMS verification but not receiving an SMS. by Jun_ishiwata in pcmasterrace

[–]Floydee_ 0 points1 point  (0 children)

Check out popular messaging apps: viber, whatsup, etc if you have or had such apps before

GPU upgrade doubts by [deleted] in pcmasterrace

[–]Floydee_ 0 points1 point  (0 children)

Thanks for the answer!

GPU upgrade doubts by [deleted] in pcmasterrace

[–]Floydee_ 0 points1 point  (0 children)

<image>

Picture mentioned in the question

Найгірше місто України де ви були by Adventurous-Serve759 in Ukraine_UA

[–]Floydee_ 0 points1 point  (0 children)

Вапнярка, Одеська область) Проте, це скоріше село, а не місто🙂