uvloop
trio
Our great sponsors
uvloop | trio | |
---|---|---|
14 | 19 | |
9,940 | 5,833 | |
1.5% | 1.6% | |
5.5 | 9.5 | |
15 days ago | about 6 hours ago | |
Cython | Python | |
Apache License 2.0 | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
uvloop
-
APIs in Go with Huma 2.0
I wound up on a different team with pre-existing Python code so temporarily shelved my use of Go for a bit, and we used Sanic (an async Python framework built on top of the excellent uvloop & libuv that also powers Node.js) to build some APIs for live channel management & operations. We hand-wrote our OpenAPI and used it to generate documentation and a CLI, which was an improvement over what was there (or not) before. Other teams used the OpenAPI document to generate SDKs to interact with our service.
- Python Is Easy. Go Is Simple. Simple = Easy
-
will requests-html library work as selenium
If you're looking for maximum requests per second you can change the asyncio event loop with one like UVLoop.
-
A Look on Python Web Performance at the end of 2022
The source code from the project resides in the github, with more than 8.6k stars and 596 forks is a very popular github, but no new releases are made since 2018, looks pure much not maintained anymore, no PR's are accepted no Issues are closed, still without windows or macOS Silicon, or PyPy3 support. Japronto it self uses uvloop with more than 9k stars and 521 forks and different from japronto is seems to be well maintained.
-
Modern Python Performance Considerations
If you are building server-side applications using Python 3 and async API and if you didn't use https://github.com/MagicStack/uvloop, you are missing out on performance big time.
Also, if you happen to build microservices, don't forget to try PyPy, that's another easy performance booster (if it's compatible to your app).
-
SearX On Windows: A Short(ish) Tech Journey
And so I did some searching, and found that SearX isn't officially supported on Windows. Not to be deterred, I did another quick search and found that with pip and/or docker, you should be able to install SearX straightforwardly on Windows. After trying this for a bit, I realized that uvloop, a (questionably optional dependency of SearX) is not supported on Windows. I tried a couple things to get it to work, but they didn't end up working for me either through user error, ignorance, or plain old not working.
-
EdgeDB 1.0
they also wrote uvloop [0] which is fantastic and advances the cutting edge of what can be done with modern asyncio-based Python. I saw a ~3x improvement in the throughput of a microservice I wrote when I first tried it out years ago. currently at $dayjob we just use it by default in every Python service, whether or not we expect that service to be performance-critical.
-
How does asynchronous code work in programming languages?
If you manage to grok how uvloop works as well as Python's default asyncio loop scheduler, you'll understand this style. It is not by itself a parallelism enabler, but network I/O the coroutines triggered would run in parallel nevertheless, though CPU bound computations would not by default.
-
Dev corrupts NPM libs 'colors' and 'faker' breaking thousands of apps
Take a look at these guys: https://github.com/MagicStack They are a consultancy that obviously can make good stuff, their libraries are widely used by the Python community. This is how I would monetize your library honestly. It is a source of trust that can unlock other opportunities that would be much harder to obtain without it.
-
C++20 coroutine benchmark result, using my coroutine library
Nice ! What about python with the free asyncio upgrade https://github.com/MagicStack/uvloop ?
trio
-
trio VS awaits - a user suggested alternative
2 projects | 9 Dec 2023
-
In what ways are channels are better than the traditional await?
Incidentally, the alternative event loop implementation trio in python does not have "gather", you also need channels, and it's a deliberate design choice - there is some discussion about that in this ticket https://github.com/python-trio/trio/issues/2188
- Polyphony: Fine-Grained Concurrency for Ruby
-
This Week In Python
trio – a friendly Python library for async concurrency and I/O
-
Python projects with best practices on Github?
trio. the best code, the best documentation, awesome community.
-
The Heisenbug lurking in your async code (Python)
I'll +1 the Trio shoutout [1], but it's worth emphasizing that the core concept of Trio (nurseries) now exists in the stdlib in the form of task groups [2]. The article mentions this very briefly, but it's easy to miss, and I wouldn't describe it as a solution to this bug, anyways. Rather, it's more of a different way of writing multitasking code, which happens to make this class of bug impossible.
[1] https://github.com/python-trio/trio
[2] https://docs.python.org/3/library/asyncio-task.html#task-gro...
-
The gotcha of unhandled promise rejections
It's similar to manual memory management.
Structured concurrency is one approach to solving this problem. In a structured concurrency a promise would not go out of scope unhandled. Not sure how you would add APIs for it though.
See Python's trio nurseries idea which uses a python context manager.
https://github.com/python-trio/trio
I'm working on a syntax for state machines and it could be used as a DSL for promises. It looks similar to a bash pipeline but it matches predicates similar to prolog.
In theory you could wire up a tree of structured concurrency with this DSL.
https://github.com/samsquire/ideas4#558-assign-location-mult...
-
Python Asyncio: The Complete Guide
Not complete - doesn't include Task Groups [1]
In fairness they were only included in asyncio as of Python 3.11, which was released a couple of weeks ago.
These were an idea originally from Trio [2] where they're called "nurseries" instead of "task groups". My view is that you're better off using Trio, or at least anyio [3] which gives a Trio-like interface to asyncio. One particularly nice thing about Trio (and anyio) is that there's no way to spawn background tasks except to use task groups i.e. there's no analogue of asyncio's create_task() function. That is good because it guarantees that no task is ever left accidentally running in the background and no exception left silently uncaught.
[1] https://docs.python.org/3/library/asyncio-task.html#task-gro...
-
How to Choose the Right Python Concurrency API
One consideration I'd like to see in an article like this is backpressure support (https://lucumr.pocoo.org/2020/1/1/async-pressure/). A key component of choosing any approach is to consider the ecosystem of libraries. So if going for async, a library like https://github.com/python-trio/trio looks promising, is being actively developed, and seems to have an active community around it.
- Notes on structured concurrency, or: Go statement considered harmful
What are some alternatives?
asyncio
curio - Good Curio!
Twisted - Event-driven networking engine written in Python.
uvicorn - An ASGI web server, for Python. 🦄
asyncio - asyncio is a c++20 library to write concurrent code using the async/await syntax.
pyzmq - PyZMQ: Python bindings for zeromq
IVRE - Network recon framework. Build your own, self-hosted and fully-controlled alternatives to Shodan / ZoomEye / Censys and GreyNoise, run your Passive DNS service, collect and analyse network intelligence from your sensors, and much more! Uses Nmap, Masscan, Zeek, p0f, etc.
LDAP3 - a strictly RFC 4510 conforming LDAP V3 pure Python client. The same codebase works with Python 2. Python 3, PyPy and PyPy3
DearPyGui - Dear PyGui: A fast and powerful Graphical User Interface Toolkit for Python with minimal dependencies