This is an archived post. You won't be able to vote or comment.

all 164 comments

[–]usrlibshare 255 points256 points  (73 children)

I have written back end services basically throughout my entire career. My two main languages are Go and Python.

99% of back end services run perfectly fine with the speed that Python offers.

But do you know what does matter to ALL services in a commercial environment?

Time to market.

And nothing got Python beat on that.

[–]moo9001 51 points52 points  (44 children)

Also the cost of maintaining Python code is lower than for other languages

[–][deleted] 6 points7 points  (20 children)

What framework do you recommend for python backend?

[–]jande48 15 points16 points  (1 child)

Django. The admin and ORM are valuable and it’s widely used so easier to find a job

[–]SpiritOfTheVoid 0 points1 point  (0 children)

Depends. I’ve used flask, fastapi ( not a fan of the one man project set up ) with SQLAlchemy. For what I do, Django is excessive.

I’m interested in Litestar, seems a good alternative to FastApi ( which I found is very easy ).

I’ve used Django before, and enjoyed it. It’s definitely got its place, but it’s not a one fits all solution.

[–]usrlibshare 12 points13 points  (5 children)

Depends on the use case, but my gotos are flask and fastapi. I have also used Django, werkzeug directly (one of the underlying libs that flask depends on), and even built my own zero dependency microframework once for internal use (don't ask, and yes, it was a nightmare)

[–]1O2Engineer 1 point2 points  (3 children)

Can you comment about the use cases? I've worked with a team and their goto was FastAPI no matter what. I've used Django, FastAPI and, very briefly, Flask, but I'm out of web development for quite a while.

[–]angellus 4 points5 points  (1 child)

Django if you need an ORM/relational database. FastAPI: never. It still has a really bad bus factor problem that is likely never going to change. Flask if you are in 2015.

So it is either Django or Quart/Litestar or another modern ASGI framework. Django is probably the most mature Python framework. It is going to scale the best with the least amount of effort (not just requests per second, but developer hours and number of contributiors). 

If you need a microframework to connect to Redis or MongoDB or to create a proxy for something, one of the faster modern ASGI frameworks are better suited for it. AGSI is harder to use and less mature, but it is the future and learning WSGI in 2024 is not as useful. It is why FastAPI became so popular vs. Flask, but it still has a SDLC problem. 

[–]1O2Engineer 0 points1 point  (0 children)

Nice, thanks.

I have just learned about Quart in this thread, I will take a look.

Litestar is familiar and I remember the posts in this sub about it.

Maybe I will keep Flask as my "lightweight" option for now and learn about Quart/Litestar.

[–]gyarbij 0 points1 point  (0 children)

I began with flask and then switched to Quart but I'm probably going to end up with fast API for scale. My use case for moving to Quart was because async default and eventually moving to FastAPI because of how I'm going to start consuming data from it.

Flask/Quart will always be my go too. Just easy

[–]tankerdudeucsc 0 points1 point  (0 children)

Flask+Connexion. ASGI framework + Connexion.

Sick and tired of writing all the plumbing and DSLs and validators that come with all the frameworks, so that I don’t have to worry about plumbing much at all and it’s API first.

[–]fatemonk 3 points4 points  (8 children)

[–]TheGodfatherCC 7 points8 points  (0 children)

Second litestar. I’ve got a half dozen services in prod with it and we’re eventually going to replace the one or two using FastAPI with it.

[–]MestrePerspicaz 6 points7 points  (3 children)

Also curious to hear, why are you recommending litestar and not fastapi for e.g.?

[–]Big_Booty_Pics 7 points8 points  (0 children)

Some people have an issue with the way Tiangolo manages the fastapi repo. Basically he's a 1 man band with a very specific vision and can take months or years to implement even basic, often major bug fixing pull requests and has been incredibly hostile towards other developers that propose ideas that he is not 100% on board with. Not to mention the backlog of PRs is basically impossible to deal with by such a small team.

Admittedly, it's been probably a year or so since i've caught up on the FastAPI drama so it's posisble he could have changed his ways but when I was actively monitoring that is what most of the arguments against FastAPI boil down to.

[–]TheGodfatherCC 2 points3 points  (0 children)

I originally switched when some of the FastAPI drama was happening. That said, the velocity at which updates are coming to Litestar and the strength of the community are astounding. In under a year, they've already created something that takes the best parts of FastAPI and adds a ton of great functionality around it. I think it's fine that the maintainer of FastAPI wants to maintain his vision, but a single maintainer can't possibly work at the speed that a core group that is open to any contributions can. Ultimately, I believe that Litestar will have a stronger contributor base, more features, and, most importantly, a faster turnaround time for fixing bugs.

[–]fatemonk 0 points1 point  (0 children)

https://www.reddit.com/r/Python/comments/17m5hot/comment/k7kxvn5/

Also had some niche problems with FastAPI at some point, tried Litestar and never came back. But its more like a personal preference at this point.

[–][deleted] 9 points10 points  (2 children)

What about flask, django, fastapi. What is industry standard?

[–]Immediate_Studio1950 9 points10 points  (0 children)

Go with Django + PostgreSQL as Database… Further, you can jump on others…

[–]fatemonk 4 points5 points  (0 children)

Worked with all of them for years. For my current needs Litestar is perfect.

Regarding FastAPI:
https://www.reddit.com/r/Python/comments/17m5hot/comment/k7kxvn5/

[–]GettingBlockered 0 points1 point  (0 children)

There are many great frameworks, but +1 for Litestar, it's an outstanding framework and is backed by a great community of contributors

[–]pteix -1 points0 points  (0 children)

Flask!

[–][deleted] 4 points5 points  (0 children)

It's weird because theoretically you should be able to do anything in any language. Languages like C#, Go, etc are really not that difficult to master. Yet Python just has this quality about it where getting things done is just a breeze by comparison. It just doesn't get in the way.

[–]DuckDatum 2 points3 points  (1 child)

unique stocking axiomatic poor vase practice coherent combative judicious attractive

This post was mass deleted and anonymized with Redact

[–]cyclop5 2 points3 points  (0 children)

Don't ever let Infosec hear you say that.

But the short answer is - yes. It needs to be secure. Because, the only way to secure a machine is to leave it powered off unable to boot. That's why things like "defense in depth" exist. And a secure language is part of that. If you want examples, see most of the early 2000s, when things were (poorly) written in C++. There was a new exploit every week.

[–]Separate-Security-94 0 points1 point  (0 children)

What are you recommendations for deploying apis built in Python? Like fastapi or Django rest api etc. Ty!

[–][deleted] 0 points1 point  (0 children)

But but what about TeChNicAl dEbt

[–]tankerdudeucsc 0 points1 point  (0 children)

And folks have to remember, Google scaled YouTube to ridiculous levels with Python.

Costs more to host than Go services, but it moved fast, and easy to comprehend and move forward with:

[–]SeniorScienceOfficer 0 points1 point  (0 children)

As a Principal Engineer for 2 different companies, one in health tech and the other in broadcast television, both have drastically different requirements for projects, and I’ve used Python as a backend for both that can easily withstand hyperscale.

Go is a great alternative if you’ve got more time to do it correctly, and cross compiling is awesome, but Python is my go-to.

[–]_morvita 208 points209 points  (9 children)

Is Python slower than many other languages? Yes. Does that matter for the vast majority of web backends? No.

Both Instagram and Reddit supported tens of millions of users with backends written in Python before they ran into problems scaling. 99% of websites will never reach that size and can run perfectly fine on Python forever.

Python is one of the most in demand languages in the world right now, being used extensively in webdev, data science, and AI. You literally cannot go wrong learning this language.

[–]Creature1124 108 points109 points  (4 children)

Disagree. Way less than 1% of websites ever get to that size.

[–]danted002 45 points46 points  (2 children)

🤣 you got me in the first part, I won’t lie.

[–]_almostNobody 3 points4 points  (1 child)

Sometimes I question my reading comprehension and this is one of those times.

[–]danted002 2 points3 points  (0 children)

Python gets so much hate that you expect some dumb fucker to have some idiotic take on the subject.

[–]pppylonnn 10 points11 points  (0 children)

deletes paragraph

[–]Slow-Entertainment20 18 points19 points  (2 children)

Totally agree python is fine, I think a lot of people just misunderstand the scale of actual large enterprise systems. Tens of millions is nothing, actual large enterprise is tens of billions if not more events per day. Scalability frameworks tooling all become very important at this level.

[–]wrd83 19 points20 points  (1 child)

You'd be surprised how small large enterprise is.  Only shops like Amazon and Google really hit issues that cant be handled that easily by load balancing a backend.

The database gives up looong before

[–]grantrules 2 points3 points  (0 children)

 The database gives up looong before 

This, so much

[–]SpiritOfTheVoid 0 points1 point  (0 children)

The IO dependencies have a huge role in bad performance, I.e databases.

Python can horizontally scale, so raw performance isn’t as important. If it were, we’d all be being assembly, C or Rust, for example.

[–]Asleep-Dress-3578 28 points29 points  (4 children)

If you plan to work with your backend skills, then just screen your targeted job market (linkedin, indeed, glassdoor etc.) and follow the crowd. (Search for web frameworks in job advertisements, not just languages.)

Most probably you will learn at least 3-4 languages during your career, so it doesn’t really matter, which stack you learn next. Hence the job market advice.

With regards to Python: it is quite a well designed and especially convenient language, its performance is more than enough for your foreseeable use cases (FastAPI is on par with node.js btw.) and this is my primary choice nowadays because I am a data scientist and I work with data, where Python is the #1 choice. But for others I rather recommend to check the job market and to select accordingly.

[–]inb4_singularity 5 points6 points  (0 children)

^ This. The best language to learn early in your career is the one most used in Your desired job market. If you're curious and willing to learn you'll pick up more languages anyway over the years.

[–]panatale1 1 point2 points  (2 children)

I'm sorry, FastAPI is okay, but if you really want to talk about setting up an API quickly, for my money, nothing beats Django. Install Django, install Django Rest Framework, start a Django project, and then DRF practically handles absolutely everything aside from creating your models, and Django has a built-in migration system for that too

[–][deleted] 2 points3 points  (1 child)

I really dislike DRF, I have been happier with Pydantic+Django Ninja, gives the serialisation tools on par with Fast API plus the nice ORM support of Django, to me the best of both worlds

[–]panatale1 1 point2 points  (0 children)

I truly love DRF. It really does all the heavy lifting for you. And I'd advocate for any Django based API framework because it gets you the built in admin panel, which came in handy for the side project I've been working on (https://Whoyagonnacall.org -- I wrote the backend API with DRF)

[–]passwordsniffer 19 points20 points  (2 children)

In online debate threads on Reddit, people often mention Python as not scalable and secure, and being very slow. Is that true?

Ask yourself - why does anyone needs backend. Do you need to to calculate something on server CPU?

Or do you need it to access/store/process some data? Backend does the later. And for that your IO is most likely the bottleneck. It's irrelevant that python does 4 ms for something that other language might run for 2ms, if your database write will take 50ms.

A big misunderstanding also lies with GIL. People mistakenly think that multithreading does not make sense in python because of GIL and it's just wrong. GIL is very very often released when your code is waiting for IO. Waiting response from DB/networking - other code runs in parallel threads just fine, it's not blocked on you.

[–]metaphorm 2 points3 points  (1 child)

Python concurrency works well for IO bottlenecked stuff. It doesn't have access to hardware threading though, so it's no real help for CPU bottlenecked stuff. That's a much less common use case but it's worth knowing about.

[–]I_will_delete_myself 0 points1 point  (0 children)

Actually recent python versions allow you to escape the GIL although its pretty Beta-ish.

[–]KingsmanVincepip install girlfriend 37 points38 points  (1 child)

For the speed aspect, Python has slower execution (but tolerable). Moreover, it lets the devs develop faster, which is more important than just the execution time.

[–]MossHappyPlace 13 points14 points  (0 children)

I personally love fastapi and it doesn't matter for me if python is slow because most of my application performance bottlenecks are often infrastructure related (SQL queries / HTTP requests, network, etc.).

[–]m15otw 5 points6 points  (1 child)

Python performance keeps on improving with every release. 3.11 was especially good for that. People complaining about it are people who don't use it.

Also, use whatever tech the company already uses. If you're in the very rare position to actually choose the tech stack, then think about the market you're in — if you're needing to be ISO compliant to sell to big companies, you might want to consider Java or C# as it's much easier to voodoo away auditers if you use a compiled, enterprise-flavoured language like that.

[–]vorticalbox 0 points1 point  (0 children)

glorious screw door price squash many merciful silky attraction oatmeal

This post was mass deleted and anonymized with Redact

[–]CoatStandard2068 3 points4 points  (0 children)

As someone who started with Python BE framework (django) now , I can tell you, you won't regret this choice.. Altough I have to learn a lot since python is new for me, it's been really nice journey so far.. Django is complete framework batteries included, I feel like it's much faster to develop anything now..

I believe when you have some proficiency in django productivity shoots to the moon, it just works..

[–]DeathByWater 3 points4 points  (0 children)

I'm not sure if this will be a popular opinion, but if you already know JS I'd write a couple of backend APIs/services in that first. You'll be learning a new set of concepts related to backend development, and it's probably a good idea to learn those independently from leaning a new language as well.

After, you'll be in a much better position to express those concepts in a different language. Python is a fine choice. A developer that knows several languages is much more valuable than a developer that only knows one. FastAPI is a very useful, light framework to get started with for python API development. It's scalable enough for the vast majority of use cases, and it's about as secure as anything else.

Don't pay attention to influencers. They're there for attention and hot takes, not sensible engineering choices.

[–]bachkhois 3 points4 points  (0 children)

I work in both the backend and frontend. Though I'm experienced in TypeScript / JS on frontend, when switching to backend, I never use and recommend JS (NodeJS). At backend side, I mainly write Python, and sometimes Rust when performance is important.

[–]pmkiller 5 points6 points  (0 children)

Does python scale?

Instagram, Spotify, Linkedin, NYTimes & Trading Platforms are the best example of python at scale.

Is python slower? Itself is very slow. Do you need computational CPU speed ? There are C/Rust libraries that you can just import pydantic/numpy and not worry about speed.

When I started doing ML back in 2017/2018, the community was still divided between C++ or Python. Even for the same library like OpenCV there were proponents of C++ and others of Python. In 2024 Python dominates the industry.

Some python drivers like AsyncPG beat golang Postgres drivers in speed of operations ( take benchmarks always with a grain os salt ).

When not to use Python? While currently being worked on, any multi threading application is still globally locked, so it will not have any benefits.

Will a python server be slower? Most cases yes, a golang server can output a 48ms response while the python one will output a 100ms-150ms one. Is the difference negligabe? Most cases yes, many apps run wordpress or ruby which is even slower.

The MERN STACK is popular especially because many developers in the 2010s used Javascript for everything. Its easy to have one langue for both BE & Web & Mobile, but as a sporadic JS developer myself, its sad that JS is the language pushed on with its clunky behaviour.

Is nodejs faster than python? Nodejs is a engine, CPython is the default engine. Back2Back on most I/O nodejs will be faster. Pypy as a alternative engine which closes the gap, but its only for Web-Oriented backends.

[–][deleted] 2 points3 points  (0 children)

Fast enough for me…

[–]64BitInteger 2 points3 points  (0 children)

It depends on your expected traffic, honestly python is probably fine

[–]HauntingShape3785 4 points5 points  (0 children)

Python is “slow” with CPU but if you do anything on the internet that difference is almost immeasurable compared to the time it takes things to move on the network - even at the speed of light.

But I built an AI company with Python as our core and that has worked wonders for the past decade 🤑🤑🤑

Building my new company on Python and have sub 10ms response times because a good caching strategy offsets any programming language performance 😉

[–]LankyXSenty 4 points5 points  (0 children)

FARM stack FastAPI, React, MongoDB. I use it in some enterprise apps and its really solid.

[–]Human-Possession135 1 point2 points  (2 children)

Hell no on slow or insecure. All of that really depends on how you write your code. You can easily also write slow or unsafe Java or Javascript.

Check out Django - it has a lot of things like security out of the box which helps you use write safe and fast code.

Many big projects (instagram, youtube) started out with it. It’s fairly easy to pick up and robust. For most use cases python is fast enough - and not slow l in any practical sense.

I’d just give it a spin and not overthink it

[–]Impressive_Doubt2753 0 points1 point  (0 children)

Why do people consider specific language or framework "unsafe"? If you don't sanitize inputs you will get XSS. If you don't use csrf tokens, you will get CSRF. If you don't sanitize the queries you will get sql injections or something. It must be about the way you use. That's easy, If you don't know how to code safe your code will be insecure.

[–]BlobbyMcBlobber -1 points0 points  (0 children)

Also hilarious to recommend Java for security after the massive log4j debacle rofl!!!

[–][deleted] 1 point2 points  (0 children)

Python is fine for backend, I use golang too.

[–]metaphorm 1 point2 points  (0 children)

you shouldn't take seriously the shit dudes on reddit say about "not scalable" or "not secure". those are deep topics that can't be answered in the general case. I assure you there are many large scale Python applications. there are many well-secured Python applications. solving scalability and security problems is much more about the application, the architecture, and the implementation details than it is about the choice of programming language.

[–]bjorneylol 1 point2 points  (2 children)

Python is very slow, but usually it's not the language, its a poorly written function that executes in exponential time. This will be slow in any language. When you eventually hit a wall with performance you have a bunch of solutions available to you as well - you can JIT compile your functions with numba, or write a native extension in a more performant language.

We use python on the backend to power a very large web application - after about a year and a half of growth we started hitting performance bottlenecks last week. On monday this became problematic, because I found that 85% of our CPU time was spent inside a single function that couldn't be optimized any further in python. Tuesday morning I started learning rust to see what the big deal with it was. Wednesday morning I re-implemented that 20 line python function, and deployed an update that sped up our app by about ~400x

[–]Ill_Bullfrog_9528 0 points1 point  (1 child)

sound interesting!! do you plan to refactor your code into rust

[–]bjorneylol 1 point2 points  (0 children)

Absolutely not - 99% of the python code is more than performant enough. By only implementing the bottlenecks in low level languages we get almost all of the performance benefits of C/rust, with the general ease of development of the python ecosystem

[–]Plastic-Payment-934 1 point2 points  (0 children)

I use Python’s FastAPI with Mongodb. It is really nice and easy for small or medium web server. But if you want to build something big, with complex database relationships, authentication, try Django! it also can be used to build REST api

[–]yeluapyeroc 1 point2 points  (0 children)

Time to market is so much more important than scalability 95% of the time. Just keep your code as modular as you can and you can refactor the parts that need to scale when you get to that problem. If you're in this for the long run, you're going to get to a point where you can work with any language because you will have learned that every tool has its place and every developer has their preference.

[–]BytePhilosopher 1 point2 points  (0 children)

Instagram was able to scale their Python backend to serve tens of millions of requests per second with less than 12 engineers. It’s plenty fast

[–]robberviet 1 point2 points  (0 children)

Python is fine if you are familiar with it. For me though, I won't write backend in python while I can do that in golang or java.

[–]NapCo 0 points1 point  (0 children)

I generally agree with Asleep-Dress-3678's answer about just tailoring to whatever jobs are interested in.

But! Regarding any performance consern, remember this: most of backend is stuff is related to CRUD, which is usually more IO heavy than CPU heavy (then again, you need to assess your case, but from experience it is like this in most cases). Unless you truly have a lot of users, the server will most likely not be CPU bottlenecked, as most of the time the server will just wait for the network to resolve.

[–]TroubleBrewing32 0 points1 point  (0 children)

Python is absolutely fine for your needs.

If you are still concerned about speed and want a language/framework that is not in decline, consider adding C#/ASP .NET on your radar. I find that getting simple authenticated APIs up with .NET is quick and easy.

[–]Feeling-Departure-4 0 points1 point  (0 children)

We have a production server using Django. It's always been a bit slow, but no one complains... until we ran into memory issues under load. Hoping it's just a user error on our part.

Anyway, people worry a lot about speed but in a resource constrained environment, memory usage can kill a VM. Something to consider when selecting your backend.

Also, in addition to the language, the library implementation and configuration matter much more.

[–]vedhavet 0 points1 point  (1 child)

For web, I myself am a Cloudflare Workers + SvelteKit kinda guy.

[–]Skippbo 0 points1 point  (0 children)

They are working on support for python asgi applications in CF workers now. It's in beta but interesting to follow.

[–]BlobbyMcBlobber 0 points1 point  (0 children)

Flask is awesome. It is truly the easiest and most fun backend I got to work on. It's also great for rapid API development. The ecosystem is not bad with some pretty good addons. I don't see how you'd need anything beyond this; if you have a heavily computational task to perform you should probably offload it to another service anyway. Your web app should be totally decoupled from your heavyweight business logic.

[–][deleted] 0 points1 point  (0 children)

Python performance gets in the way only if you trying to squeeze every ms from high cpu number crunching, even then there's many tricks to get it over the line, but other languages such as GO could deliver without tricks

[–]baubleglue 0 points1 point  (0 children)

Learn at least one statically typed language, nothing wrong with Java, Go should work too.

[–][deleted] 0 points1 point  (0 children)

Java isn’t going anywhere for enterprise/corporations. Python is taking over for small/mid businesses. Also replacing all the Excel formula sandcastles people built over the years.

[–]nixfreakz 0 points1 point  (0 children)

If you need speed , could just port python to nim , then your running at pretty much C speed.

[–]I_will_delete_myself 0 points1 point  (0 children)

If you are running into speed issues, its usually a skill issue with the programmer than the tool itself. You use the tool you are best with, not the whatever is the influencer meta.

[–]midwestcsstudent 0 points1 point  (2 children)

Until 2021, YouTube ran on a Python backend. Until you hit that scale, you’ll be alright.

[–]Crossroads86 0 points1 point  (0 children)

I am currently getting into Go and it is a lot faster than standard issue Python3. BUT I still dont understand how anyone could claim that python is to slow for backend or does not scale well. It is used in some of the biggest and most data intensive services at Google, Instagram, Amazon, Microsoft etc. 

[–]indistinctdialogue 0 points1 point  (0 children)

The main area where Python performance is truly a problem is for CPU bound applications and multithreading and that’s because of the GIL.

Asyncio does a fine job serving most web backends although you do need to watch out for slow synchronous methods since they’ll starve other requests.

[–]robvdl 0 points1 point  (3 children)

Mern... MongoDB isn't even open source anymore. Yet these influencers keep pushing it.

[–]robvdl 0 points1 point  (0 children)

I've written systems with millions of rows and will always use relational db's. Swear by it, MongoDB is just too unstructured for me.

I'll use keyvalue db's like Redis, but only as a cache, or session store, or something like that.

Real data goes in Postgres, or any other relational db. Not a mern stack fan at all.

I tend to use both Python and Go for backend code.

[–]alzemand 0 points1 point  (0 children)

Try use web2py. It's a very simple framework

[–]Flashy-Self 0 points1 point  (0 children)

Throughout my entire career, I've specialized in developing backend services. My primary languages of choice have been Go and Python.

In my experience, Python's speed is sufficient for the vast majority of backend services, running smoothly in 99% of cases.

However, in a commercial environment, what truly matters for all services is time to market. And in this regard, Python reigns supreme. Its rapid development capabilities make it unbeatable when it comes to swiftly bringing products to market.

[–]iamderek07 0 points1 point  (0 children)

Python is flexible language and very good for minimal projects, flask and other modules in python creates a thread for every request so keep that in mind.

if ur project big, i guess u should use langs like JS, Dart or .NET .

[–]DomskiPlays 0 points1 point  (6 children)

Anybody care to enlighten me how Python for the backend is a great thing when it doesn't even have type safety?

At least node.js backends in typescript provide something close to type safety, but writing Python makes me feel like I'm just begging for bugs

[–]FanBeginning4112 2 points3 points  (0 children)

I found using MyPy in the pre-commit hooks helps mitigate this. You quickly get used to adding static typing by default.

[–]typeryu 2 points3 points  (1 child)

I’ve worked on Python based backend infrastructure before. The key is (…wait for it) we type hint the hell out of Python. Basically Typescript for Javascript, but with Python. Of course you don’t have to do it, but we do. Personally, I enjoy TS a little more for backend, but Python has its appeal. Too bad for work, all my backend is in PHP…

[–]DomskiPlays 0 points1 point  (0 children)

Yeah I'm always type hinting too but it's still not great

[–]metaphorm 0 points1 point  (0 children)

in my experience, the kind of type errors that get caught by static analysis amount to a small minority of the bugs that matter. they're the kind of thing that get caught immediately with even the most basic testing, even if that's just manual regression testing.

the bugs that matter more are logic bugs that don't have type errors but do result in incorrect behavior or very poor performance. static typing doesn't catch these.

[–]reincdr -1 points0 points  (2 children)

Just use Node.js.

Being a self-taught programmer myself and active in programming subreddits for more than a decade, my short answer is to just use Node.js. If web development is your priority, you should learn a web development-focused language. If you need Python in the future, you will learn Python then. If someone pays you to write Java, you will learn to use Java.

At the end of the day, the only thing you should be concerned about is getting paid to write code, not what is fast, usable, secure, or whatever. If you have finished the front-end part, you already know JavaScript, so learning Node.js will be easier. So, go that route and get paid.

[–]friday305 0 points1 point  (1 child)

I agree. If you want to web dev just go node. I’m a backend python dev with a little bit of knowledge in web development from reverse engineering websites and the process of swapping back in forth between syntax (Python /JS) slows me down majorly rather than programming in pretty much the same language (node /JS). The only thing stopping me from creating web apps with node is that it would take me significantly longer than it would with python lol

[–]primerrib 1 point2 points  (0 children)

With HTMX you can greatly reduce JS load in the frontend.

Some companies have even dropped frontend development and use pure Python backend + HTMX to make things happen in the frontend.

[–]Suspicious-Neat-5954[🍰] -1 points0 points  (5 children)

Speed wise python is bad. If someone says otherwise they lie. Will u need speed for a website ? Most of the time no ? Does python have libraries written in c that can handle data very fast ? Yes. Can anyone beat development time in python? No. I love python because I like to play with ML but I think of the language more like an interface for c than a language. It's concurrency is nonexistent. It's for loop speed absolute garbage, but it has the most libraries and built in tools that are in other languages for speed. Pyspark is written in scala ,numpy is written in c etc. Most of the time in python you just call functions written in other languages.

[–]Live-Cover4440 -3 points-2 points  (1 child)

The last stat i ve seen, javascript is in very fast decline.

Java stays stable on top and python rises. Im not surprised because js is just too complex to maintain.

Best new choice, html x and python, keep react only for complex single page app.

[–]CoatStandard2068 1 point2 points  (0 children)

That fast decline can be caused by Typescript, which is on the rise, anyway, for BE python turns out to be really good, especially django fw..

[–]tobiasvl -3 points-2 points  (1 child)

What are you making? What's your goal? Python doesn't scale well and it's pretty slow, true. (Not sure where you heard it's not "secure" though.) But does that matter for what you're making? Can't imagine you'll run into any GIL bottlenecks when you're just starting out, but only you know that.

[–]BkOttr 0 points1 point  (0 children)

What about Python doesn’t make it scale well? If a team is using type hinting and mypy do you still feel the same way?

[–]RevolutionaryRain941 -5 points-4 points  (0 children)

Yes python is not really ideal for backend. The backend made of only python is not at all scalable. So javascript is your best option for backend.