Is https://pypi.org/project/uvloop still faster than the built-in #python #asyncio #event #loop ?
There were lots of speed improvements in latest python: did they affect the event loop?
Great overview of #Python #async frameworks. I still like the #gevent framework as works with minimal code changes and no need for additional #asyncio libs (just run 'apt search python3-aio' to see what I mean). The monkey patching still feels like magic fairy dust to me.
https://www.bitecode.dev/p/asyncio-twisted-tornado-gevent-walk
#python #async #Gevent #asyncio
@pamelafox I wrote "coroutine" 469 times in Fluent Python Second Edition.
The main chapter about asynchronous programming is framework-agnostic.
The examples use #asyncio, #FastAPI, and #curio, to show that `async/await` are not tied to a specific runtime event loop or library.
https://www.oreilly.com/library/view/fluent-python-2nd/9781492056348/
๐ Supercharge your #Python projects with Aiomultiprocess! Easily integrate #multiprocessing & #asyncio with this powerful library. Learn how through a real-world web scraping example. ๐ฅ
๐ Read more:
https://qtalen.medium.com/aiomultiprocess-super-easy-integrate-multiprocessing-asyncio-in-python-2e883b65ba46
#aiomultiprocess #webdevelopment #webdev #programming #coding
#python #multiprocessing #asyncio #aiomultiprocess #webdevelopment #webdev #programming #coding
Some preliminary results of making 1k TCP requests (connect, send 1 kB, receive 1 kB back) on Linux and Python 3.10.6 using thread pool, process pool, asyncio, and uvloop. No CPU-bound work, the server delay is 20 ms.
The conclusion so far is that threads and processes are faster in this specific scenario. More graphs and numbers to come, stay tuned.
> My opinion is that asyncio does not meet any of these criteria.
The ever awesome Charles Leifer, offering some doubts on Python's choice of cooperative multitasking with asyncio.
Food for thought ๐ฅช
๐ Just published an article on #Python asyncio.Queue & asyncio.PriorityQueue best practices! Explore producer-consumer patterns with real-world examples. Check it out on ๐ https://towardsdatascience.com/unleashing-the-power-of-python-asyncios-queue-f76e3188f1c4
#python #asyncio #datascience #programming #coding
Fixed the slowness by borrowing from Curio's implementation.
Python Asyncgnostic is a real library now!
Source: https://github.com/hiway/asyncgnostic
PyPI: https://pypi.org/project/asyncgnostic/
ลukasz Langa, the CPython Developer in Residence, is speaking about "Working Around the GIL with asyncio" at PyCon US 2023 in Salt Lake City ๐บ๐ฒ๐
He's going through two examples of data processing with Python 3.11 and how asyncio with shared memory helps speed things up โก
#Python #GIL #SharedMemory #AsyncIO #CPython #PyCon #PyConUS #PyCon2023 #PyConUS2023 #PythonSpeakingTourโ
#python #gil #sharedmemory #asyncio #cpython #pycon #pyconus #pycon2023 #pyconus2023 #pythonspeakingtour
I was documenting some asynchronous code I wrote, and after typing the sentence "Then cancel the future", I had to stop.
Free band name!
#asyncio #CALLBACK #Python #cancelthefuture
On the one hand, I do projects like #muvco to learn new things. On the other hand, that means I spend a l o t of time on sidequests.
Finally learning #python #asyncio so my #multisynth[1] concept has a fighting chance to work right in #micropython (still not willing to go to C for this...)
[1]There's surely already a name for this pretty obvious #synth concept, but I haven't come across it yet. "chordal synth" might be more descriptive but also less accurate, at least how I'm doing it.
#muvco #python #asyncio #multisynth #micropython #synth
Procesisng overhead of launching #python #asyncio #tasks https://textual.textualize.io/blog/2023/03/08/overhead-of-python-asyncio-tasks/
TLDR; close to none
New version (0.2) of fastapi-motor-oil (https://github.com/volfpeter/fastapi-motor-oil) is available on #pypi. New features include: delete rules, validators, multi-document transaction support, a couple of new service methods, extra hooks for customization, typing improvements, etc. #python #mongodb #asyncio
Still a lot to do, e.g. testing, and more documentation, but it's in good shape.
#pypi #python #mongodb #asyncio
Just noticed this PR from a month ago by @hjalves that makes #asyncio work in the #SerenityOS #Python port - exciting to see!
Kernel+LibC: Support monotonic clock in clock_getres()
https://github.com/SerenityOS/serenity/pull/17154
Playing around a bit with a bunch of asyncio-based python libraries to try and index and browse our family photo collection (currently 60k images from many devices)
Most camera jpegs have embedded jpeg thumbnails which can be easily extracted - just need start/end index.
- aiohttp for the UI on phone/ipad/laptop
- aiosqlite for the index
- aiofile for non blocking file reads
- exif
- turbojpeg to check thumbnails
Good-bye, #SleekXMPP, the #Python #XMPP library, well-known from the book "XMPP: The Definitive Guide" by Peter Saint-Andre, Kevin Smith, and Remko Tronรงon.
This month it has been removed from #Debian unstable and testing. There was no active development anymore, so it was time for it to go.
Say hello to #slixmpp, its successor, which embraces #asyncio and is well-maintained. Porting software from SleekXMPP to slixmpp is trivial most of the time, sometimes only the import name must be changed.
#asyncio #slixmpp #debian #xmpp #python #sleekxmpp
It took me an age to track down the `python -m asyncio` example, that gives you a concurrent context in the REPL. It was (only) in the What's new in Python 3.8 section, from when it was added.
I thought I'd propose having it on the asyncio intro page too:
https://github.com/python/cpython/pull/101243 #python #asyncio
Last month I picked up a copy of Mike Driscoll's #Python 201: Intermediate Python. I read up on #asyncio and decided to rework some code of mine that used taskflow with the process executor. I achieved a 2-3x time improvement. Not scientifically measured, but I was delighted with the results, and now I feel a bit more modern ๐
RT @MarcSkovMadsen
@Panel_org is a very powerful #dataapp framework for the #datasciencist. For the #datascience pros it has a lot of extras like #bigdata viz, streaming and support for #asyncio.
Please support the framework by giving it a starโญ๏ธon github https://github.com/holoviz/panel.
Thanks ๐คฉ
#dataapp #datasciencist #datascience #bigdata #asyncio
@jorgen not a clue, #asyncio is not my cup of tea. I'd definitely just use my goto trick, an event loop for all my (blocking) sockets. It scales super well actually, at least on #Linux with epoll(), which I wrapped in libuev #opensource