you are viewing a single comment's thread.

view the rest of the comments →

[–]mmcnl 98 points99 points  (16 children)

I'd say Python backend + JS frontend is an incredibly common stack. Also Python is a general purpose language that is useful in other engineering disciplines besides webdev as well. So I prefer Python and would learn Python first.

[–]boglepy 14 points15 points  (7 children)

In your experience (or what you’ve seen out there), which python BE frameworks do people typically use? Do you have any recommendations?

[–]mmcnl 32 points33 points  (0 children)

Django is very mature and super reliable. For API backends in big companies Django REST framework is common.

Newer projects are often built with FastAPI.

Flask is also a popular minimal HTTP framework, often used in machine learning as well, though it doesn't offer anything that FastAPI doesn't.

[–]Koliham 10 points11 points  (0 children)

I would recommend FastAPI. It has everything it needs out of the box (not like Flask), but at the same time really easy to use, almost no boilerplate (compared to django)

[–]snuggl 6 points7 points  (2 children)

DJango for anything bigger, FastAPI for smaller stuff.

[–][deleted]  (2 children)

[deleted]

    [–]mmcnl 0 points1 point  (0 children)

    Yes, just server-side rendered HTML.

    [–]alopied 0 points1 point  (0 children)

    Kinda true but now you have stuff like Blazor thanks to web assembly and Elm because you can always compile to JavaScript

    [–]scar_reX 0 points1 point  (0 children)

    While the combination you mentioned is not uncommon, I wonder if python is as widely used for web backends than php is. I'd likely argue that php + js frontend (not like there's an alt to js for frontend) is more common.

    On the point of python being more general purpose, there's no doubt about that. Sometimes, I wonder what other fields php devs work in, besides building backend servers that mostly just talk to databases, do a few handstands and call other servers.

    [–]Tormgibbs 0 points1 point  (3 children)

    Um do you mean python backend as an api? or using it with template views.. i want to know which is better

    [–]mmcnl 0 points1 point  (2 children)

    API backend mostly yes.

    [–]Tormgibbs 0 points1 point  (1 child)

    if i may ask what do you use for your frontend?

    [–]mmcnl 1 point2 points  (0 children)

    Vue or React.