1 karma · joined July 1, 2023
- https://www.youtube.com/watch?v=UTKvLSnFL6I
Also, developing a Python library and not keeping the most basic standard (PEP8)? You should not be allowed near Python. I really have no better words for this, just fucking lazy. I hate lazy developers, because you are the reason most software is shit.
Of course you can do security for isolation on top of it any time, and sure, you won't get security updates after a while which would be nice, but there are tools to secure an outdated app in other ways either.
In the minute you implement something provider specific, you just lost the whole point of this library and you did not needed it in the first place.
Nowadays, teachers have to start with generators and yield even for beginners, because most of the things are generators in Python3, which is not a trivial concept to understand when you have no programming background.
For I/O bound programs, you can use threading (in stdlib). For CPU bound, you can use multiprocessing (also in stdlib). But these have huge overhead, (e.g starting a Python thread costs 32kb memory minimum.) and there are multiple solutions in the stdlib like ThreadPoolExecutor and ProcessPoolExecutor in concurrent.futures beside the threading and multiprocessing modules...
If you want to write async code, there is tornado with callbacks, tornado with the new async stuff, asyncio (tulip for Python2), the new async/await from 3.5 which is very immature. The async part of the ecosystem is like a totally separate whole new world, you can't really mix and match or pick parts from the other, however, there are brave folks like Andrew Godwin how tries to make Django async with not moderate success.
For web frameworks, there are a ton of servers which might fit you, but they are mostly very complex to set up or reason about like greenlets, pre-forked web servers and stuff.
I have 5 years experience with Python, using it every day and once I tried to write a custom SSH server and it took 1-2 weeks to grasp Tornado fully, then I tried the same with Go and WITH LEARNING THE LANGUAGE itself, it took me about 2 weekends and my server was up and running!
TL;DR: You can write concurrent code with Python but it's a mess and you will probably have a hard time.