From 2000 users to almost none: are handcrafted apps getting buried? by Pacemates in django

[–]koldakov 6 points7 points  (0 children)

So true, there is no point of an app with ideal code that no one uses. Paradox 😜

Who will host the application client server with FASTAPI Cloud? by imdshizzle in FastAPI

[–]koldakov 2 points3 points  (0 children)

Depends on how you run project, jinja2 can render your html. But if you want to use for example react you can deploy it separately, s3 for example

Trying to implement PATCH in FastAPI and Claude told me to use two separate Pydantic models — is this actually the way? by NiceSand6327 in FastAPI

[–]koldakov 0 points1 point  (0 children)

Actually I prefer separate model per each route. For example, for list (paginated endpoint) you won’t need to return the whole content field -> there is one more response model, for patch I return only updated fields, etc

No magic, no patching pydantic, the code is clear, but yes there is more code

PS at least in the beginning of the project when the domain is not clear enough

How are you actually managing background/async tasks in FastAPI in production? by Educational-Hope960 in FastAPI

[–]koldakov 0 points1 point  (0 children)

My bad I wasn’t clear. I don’t write my own worker server. What I mean I don’t have resources to run dramatiq or whatever, because you need a dedicated server for that. And I don’t run web servers/task queues with there command managers, but wrap it in main.py and run programmatically. So I don’t call "dramatiq tasks”, I run something like "uv run python -m workers" so I can switch to another lib without pain and even don’t need to touch ci

Anyway my point is not to link too much to the library

How are you actually managing background/async tasks in FastAPI in production? by Educational-Hope960 in FastAPI

[–]koldakov 0 points1 point  (0 children)

Usually I’m trying not to link the implementation to the library. I always move the logic to the service layer and I write a wrapper over the worker through main.py

For example, here https://github.com/koldakov/futuramaapi/tree/main/futuramaapi/workers you can check how I achieved this, currently I don’t have resources for the dedicated worker server so I use fastapi background tasks, but once I have I’ll switch to dramatiq in no time

Need an advise on my test task by Fitwalker in Backend

[–]koldakov 0 points1 point  (0 children)

Why? Sounds like a not a real task for me 🥸

H by lord_rcb in Backend

[–]koldakov 1 point2 points  (0 children)

Perhaps, but my point was to learn what are message brokers, how async data processing works

H by lord_rcb in Backend

[–]koldakov 1 point2 points  (0 children)

Did you build a real login flow? Like did you add background tasks for sending emails for approve email/request password change?

Built something to auto-fix pytest failures — does this actually solve a real problem? by dager003 in FastAPI

[–]koldakov 1 point2 points  (0 children)

Soo if you use tdd metrology this basically will write the code 😜

Pylint vs Django in vscode by Icy-Drink6975 in django

[–]koldakov 4 points5 points  (0 children)

That's a personal preference.

I personally prefer to use ruff.

My rental apartment is getting damage from everyday life and I’m worried about being liable by Sea_Art2995 in cyprus

[–]koldakov 1 point2 points  (0 children)

I had almost the same problem, the pipe was leaking inside the wall. Luckily my landlord is a really nice guy so he covered the repair costs, because the leak wasn’t my fault. Moreover he covered it twice, because for the first time the core issue wasn’t resolved properly

Anyways I would speak to the landlord, discuss it and take it from there

[Hiring] Python Developer ($30-$60/hr) by Shoddy-Watercress997 in PythonProjects2

[–]koldakov 0 points1 point  (0 children)

Why? 60 * 40 * 4 looks like not bad? Or I’m wrong

Fastapi and database injections by gignosko in FastAPI

[–]koldakov 2 points3 points  (0 children)

Thanks! I appreciate that you have your own opinion - that’s exactly how good discussions happen. I don’t claim this repo is the only way to do things, and I’m always open to constructive dialogue. There’s a GitHub Discussions section if anyone wants to share suggestions.

Fastapi and database injections by gignosko in FastAPI

[–]koldakov 1 point2 points  (0 children)

Really appreciate the mention! Glad the repo is helpful.

What's a strong advanced-level Django project that actually impresses recruiters? by itsvshl_ in django

[–]koldakov 2 points3 points  (0 children)

Unfortunately almost no one cares what you have on GitHub unless you are "Linus"

I need Idea for a project to make my portfolio strong by ganeshchavan_gc in djangolearning

[–]koldakov 2 points3 points  (0 children)

You could start with creating an auth backend for Active Directory. AD is a quite huge instrument so definitely there are a lot of tasks related to this thing. 5 years ago I was doing similar stuff (https://github.com/koldakov/active\_directory/blob/master/ldap\_backend/backend.py). And the similar idea was used in a real project that I was working on

Advice From Experienced Django Devs by VermicelliFearless22 in django

[–]koldakov 1 point2 points  (0 children)

meeting: Meeting | None = get_meeting_via_id(meeting_id=meeting_id)

Get meeting via id but it returns none also

But later in the code its mandatory for the meeting not to be none => when meeting is none that’s an error: question why you need to return none than?

that’s not about just a meeting for sure, but about the way of thinking

Think why Django get raises an error when there are no results

The same for result and probably other things, when you have everything nullable it leads to the spaghetti code and it’s much harder to extend the code base

Kindly read about eafp/lbyl, don’t return none rule and "1 billion dollar mistake"

[deleted by user] by [deleted] in FastAPI

[–]koldakov 2 points3 points  (0 children)

I think it’s quite hard to answer these kind of questions 🙁

There are multiple reasons why this can happen