Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What is the plus value vs a 'classical' equivalent like FastAPI ?


So as far as I can tell, this is basically a more modern Flask. It pulls in design lessons from FastAPI, but it's still more batteries included such as templating (jinja2) and authentication.

Neat, but tbh I am very bearish on Python's future beyond APIs - templating html in Python is a terrible idea for anything larger than a hobby site, when you can have an API-first app with a React+Typescript frontend.

And if you need more than FastAPI, you might as well use django-ninja and get the full Django ecosystem at your disposal.


For Django, there's also django-bridge. This lets you build React apps that are backed by Django views/routing. You can also use Django's built-in authentication and forms which isn't easy with APIs.


Yes, auth between Django and a PWA is not a solved problem. It seems people just give up and go the hosted auth route or something.

But it's also really not that difficult. Auth just takes a lot of practice for people to grok so most people don't want to touch it.

I'll open source something once we're done solving the problem cleanly at my company.


There is no canned way to do it in one shot, but using regular Django session authentication together with a PWA frontend hosted separately is not that difficult.

The actual authentication remains on the Django app, using the standard way of POSTing to a login form and receiving a session cookie -- only instead of a server-generated page serving a HTML form, you have the PWA lipstick sending data directly. This approach is so much simpler than dealing with id/access/refresh tokens, encryption keys, black lists, and all of the OIDC dance.


I have just recently been looking into this. What would you normally reach for when doing templating?


HTML-based templating is toxic to a codebase, especially django templating. It is untyped, impossible to compile and trust, and it's horrible to maintain.

Use React and JSX (TSX, to be more specific). NextJS does good quality SSR, use that if you want an app that is also usable without JS.

Anybody not in that ecosystem /right now/ is going to be lagging behind by so much in velocity and capability, and will get eaten by competition.


I agree that HTML templating is toxic. But there are other ways, like htpy or htmy etc. Basically server side HTML rendering. This is what makes me interested in focused frameworks like this.


This simply isn't true.

I see the velocity, but high magnitude doesn't mean that you're going the right direction.


Like jumping off a building and bragging about how fast you're going.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: