News for hackers. Stuff that matters.
Re:Django Async: What's new and what's next? by FridgeSeal on Saturday August 15, 2020 @12:29AM (#24165949)
I recently wrote a python api for work and used FastAPI, I want to like it, but it was doing so much magic behind the scenes that it ended up being frustrating to use and just got in my way, ended up dropping it in favour of using Starlette directly
Re:Django Async: What's new and what's next? by Bedon292 on Saturday August 15, 2020 @07:27AM (#24168093)
What didn't you like about it? Curious where our pain points will be. Only been using it about 6 weeks.
Re:Django Async: What's new and what's next? by FridgeSeal on Saturday August 15, 2020 @09:24PM (#24174004)
The way it tries to construct the return values kept getting in the way.

I’d define the class, add it as the return value, I was manually instantiating the class and returning that, but for it didn’t like that and would constantly throw errors about it. I think it was PyDantic which was the root cause there.

The Depends functionality refused to inject my classes as well, but I was probably doing something wrong there...

Dropping back to Starlette was good because it gave me everything I needed and got out of my way. I’ve still got everything fully typed and passing MyPy.