#AsyncIO

N-gated Hacker Newsngate
2025-07-20

🚀🎩 Behold! The riveting tale of a tech wizard who valiantly simplifies a key-value database, only to discover the revolutionary concept of async I/O on Linux—something the rest of us mortals have been using since the dawn of time. Next up, he’ll reinvent sliced bread, but not before fsync-ing every loaf 🥖🔄.
blog.canoozie.net/async-i-o-on

hakuhaku2
2025-07-19

🛠️ reverSync — Asynchronous Reverse Shell Framework in Python
Tested on Linux 🐧 & Windows 🪟
Built with asyncio & raw sockets — no bloat, no dependencies.
✔️ Secure bidirectional shell
✔️ File transfer support
✔️ Simple, fast, and cross-platform
✔️ Ideal for red teaming & automation
🔗 GitHub: github.com/outisdz/reversync

N-gated Hacker Newsngate
2025-07-13

🚀 Breaking news: has finally discovered the ancient art of Async I/O, a concept so fresh and novel it's only been around for decades! 😜 Prepare to be dazzled by the intricate dance of interfaces and allocators, because apparently, that's the of innovation! 🎉
kristoff.it/blog/zig-new-async

2025-07-05

I'm excited to share my latest article on Medium, "The Pygame Framework I Didn’t Plan: Building Tic-Tac-Toe with Asyncio and Events"! This piece dives into my recent journey building a Pygame mini-framework, a totally unexpected outcome that emerged from simply trying to make Tic-Tac-Toe more manageable. I explore how embracing concepts like AsyncIO and immutable state fundamentally transformed my approach, allowing for cleaner, more predictable, and reusable game logic.

The article breaks down the framework's core architecture, from its unified state management queue to the refactored asynchronous main loop. I then walk through its application, demonstrating how these architectural patterns bring a classic game like Tic-Tac-Toe to life. It's a look under the hood at how a simple game can inspire a more robust and reactive development approach.

While this framework is primarily a personal passion project, the exploration has truly deepened my appreciation for the incredible work behind full-fledged game engines like Godot and Unity. It's a humbling reminder of the complexities they abstract away for developers. I’m always keen to hear different perspectives – what are your thoughts on building custom tools versus leveraging existing engines for specific project needs?

If you're a Python developer, a game development enthusiast, or just curious about applying modern architectural patterns in unexpected places, I invite you to give it a read. Your feedback is incredibly valuable as I continue to explore and share my learnings. Check it out here: kitfucoda.medium.com/the-pygam

#Python #Pygame #GameDevelopment #Framework #AsyncIO

2025-07-01

One of the joys of my current role has been getting to code Python at enterprise level, rather than ‘enthusiastic hobbyist’, and learning current industry best practices from my colleagues.

Case in point, I just migrated a project from Flask to FastAPI and swapped out aiohttp for httpx.

✅ FastAPI: Async-first, type hints, Pydantic integration = dev happiness
✅ httpx: Cleaner API, connection pooling, great with async/await

It feels like I’m finally stepping into 2025 with both feet! (Albeit halfway through the year)

#Python #FastAPI #httpx #AsyncIO #DevLife

2025-06-30

Python asyncio, блокировка цикла событий

Блокировка event loop довольно серьезная проблема в асинхронных приложениях, потому что приводит к замедлению не конкретного запроса пользователя, а сразу всех запросов пользователей. Так давайте разберемся, что же это значит и, насколько это страшно и для разработчика и для клиентов сервиса.

habr.com/ru/articles/923270/

#python #asyncio #event_loop

2025-06-24

kitfucoda.medium.com/my-pygame

My journey into graphical application building started unexpectedly after a friend's game jam project piqued my interest. Exploring Python ports of Processing eventually led me to Pygame, a lower-level library that surprisingly sparked my curiosity. What began as a plan to "build a reasonably functional Tic-Tac-Toe version over a weekend" soon revealed the depth of Pygame's foundational nature and the need for custom architectural solutions.

Pygame's synchronous and non-thread-safe nature posed immediate challenges for building interactive applications. Initial attempts to use asyncio.to_thread led to unexpected SIGSEGV errors, highlighting the need for a different approach. The solution emerged through iterative debugging and a suggestion from my coding companion, the chatbot, to incorporate asyncio.sleep(0). This critical addition allowed asynchronous tasks to finally run effectively, enabling a refactored main loop that separates event processing and display updates.

Managing shared data and dispatching events concurrently presented its own set of hurdles. Drawing heavily from my experience in JavaScript web development, I designed an immutable application registry, leveraging asyncio.Queue to defer changes to elements and the game state. This approach ensures all updates are processed predictably, avoiding race conditions and making it possible to register and dispatch events across the application in a robust, web-inspired manner.

As the code matured through refactoring, a clear architectural structure began to emerge. Extracting game-specific logic into a separate module became trivial, and a review with Gemini confirmed that the design could evolve into a reusable mini-framework. The Application dataclass even showed resemblances to an Entity-Component-System, adding a new concept to explore. While time may be limited, the curiosity to further develop this separation and implement web-like system events persists, motivated by a desire to build robust solutions.

#Pygame #Asyncio #Python #GameDevelopment #SoftwareArchitecture

2025-06-23

Оптимизация асинхронного сервиса на Python

Всем привет! Сегодня хочу поделиться с вами нашим опытом ускорения асинхронного микросервиса на Python примерно на 25%. Я расскажу, какие действия мы предпринимали с командой, что помогло, а что оказалось не особенно полезно с точки зрения ускорения сервиса. Небольшое предисловие: мы в Иви постоянно работаем над тем, чтобы наши сервисы отвечали быстро и их максимальная предельная нагрузка повышалась. В процессе очередного анализа сервисов, мы выяснили, что один из них, о котором пойдет речь в статье, отвечает довольно медленно, учитывая его особенности. И мы решили его ускорять.

habr.com/ru/companies/ivi/arti

#python #asyncio #aiohttp #асинхронное_программирование #телеметрия #оптимизация #время_ответа #профилирование #orjson

2025-06-11

Школы программирования против репетиторов и самообучения

Решил написать этот пост, т.к. несмотря на некоторое падение интереса к онлайн-обучению, каждый, кто решает освоить для себя новую профессию, сталкивается с выбором, куда направить усилия, а заодно и средства, чтобы это было с максимальной отдачей и не привело к выгоранию.

habr.com/ru/articles/917476/

#степик #онлайнкурсы #репетитор #django #fastapi #flask #aiogram #asyncio #основы_python #ооп_программирование

Rui Carmorcarmo
2025-05-30

Oh $DIVINITY, I wrote (ok, ported) a "plain" stdio to barebones , because, well, I was bored: github.com/rcarmo/umcp. (does sync and )

2025-05-26

Разработка Telegram-бота для мониторинга цен на Авито: пошаговое руководство

Привет, Хабр! Сегодня я расскажу о том, как я разработал Telegram-бота для мониторинга цен на Авито. Бот умеет отслеживать изменения цен в объявлениях и уведомлять пользователей об изменениях. В статье я поделюсь всеми этапами разработки, от проектирования до финальной реализации.

habr.com/ru/articles/912836/

#python #telegram #bot #авито #парсинг #мониторинг #asyncio

2025-05-16

One of the early asyncio implementations. #pyconus #asyncio

MC68B50S IC and a handwritten label reading asyncio
2025-05-01

HTTP/2 / HTTP/3 и gRPC на Rust: пишем учебный Mini-Transport

Статья-практикум показывает, как устроены HTTP/2, HTTP/3 (QUIC) и gRPC на самом низком уровне. Вместо толстых библиотек мы пишем минимальный учебный фреймворк «Mini-Transport» на Rust (~600 строк): реализуем кодек HTTP/2-фреймов, упрощённый gRPC-протокол и базовую обёртку над QUIC. В результате получаем рабочий echo-клиент и сервер, которые пересылают «hello ↔ world» через собственноручно собранные фреймы. Разбор сопровождается поясняющими схемами, ссылками на RFC, вариантами дальнейшего развития (HPACK, flow-control, TLS/ALPN) и готовым репозиторием для самостоятельных экспериментов. Материал рассчитан на разработчиков, желающих понять «как всё крутится под капотом» и прокачать навыки низкоуровневой сетевой работы в Rust.

habr.com/ru/articles/906324/

#http2 #rust #http3 #quic #grpc #asyncio #tokio

OmarEbnElKhattab Hosneyhosney@me.dm
2025-04-23

🚀 Boost Python Efficiency with asyncio

Synchronous: Toast 🥪 → wait → Coffee ☕ → wait → Eat.

Asynchronous: Start Toast 🍞 & Coffee ☕ → Fry Eggs 🍳 → Eat sooner!

Python's asyncio lets you run tasks concurrently, reducing wait times.

Key Terms:

Event Loop: Task scheduler.

await: Pause & switch tasks.

Coroutines: Async functions.

#Python #Asyncio #AsynchronousProgramming

medium.com/@omkamal/a-beginner

2025-04-17

Thanks to months of consistent contributions by
@lysnikolaou, all of the mandatory @aio_libs dependencies of #aiohttp now ship free-threaded variants of #wheels!

This unblocks doing the same in aiohttp eventually!

Find a minute to thank him, will you?

#aio_libs #Python #Packaging #asyncio

2025-04-08

kitfucoda.medium.com/concurren

Concurrency and parallelism are often confused in async programming discussions. Go's goroutines highlighted the difference: concurrency is doing many things at once, while parallelism is doing many things at the same time.

AsyncIO handles concurrency well for I/O, but CPU-bound tasks need parallelism. Python uses AsyncIO for concurrency, and ProcessPoolExecutor for parallelism, distributing work across CPU cores.

Process communication is harder than thread communication. AsyncIO's task cancellation differs from ProcessPoolExecutor's, requiring workarounds like event objects for reliable cancellation and shutdown.

Essentially, ProcessPoolExecutor enables parallelism for CPU-bound tasks, scaling them across multiple cores, while AsyncIO handles I/O concurrently.

#python #asyncio #concurrency #parallelism #multiprocessing #opentowork #getfedihired #fedihire #opentowork

2025-04-01

kitfucoda.medium.com/asyncio-t

Just finished a deep dive into AsyncIO, building an asynchronous task scheduler! It's been a fascinating exploration of tasks, futures, and how to manage both I/O and CPU-bound operations. Real-world examples like API data fetching and complex calculations were used to demonstrate its capabilities.

Covered task management essentials: cancellation, graceful shutdowns, and building a CLI for interactive control. Tackled tricky AsyncIO parts like error and signal handling, ensuring the scheduler's robustness.

A key focus was on asyncio.create_task() vs. await, and strategies for managing background tasks and uncaught exceptions. It was a great learning experience.

If you're into Python and asynchronous programming, this might be of interest! #Python #AsyncIO #AsynchronousProgramming #TaskScheduling #getfedihired #fedihire #opentowork

2025-03-31

Параллельные вычисления, конкурентность и асинхронное программирование в Python: обзор для начинающих

Однопоточные приложения на Python ограничены в производительности: они выполняют задачи последовательно и не используют преимущества многоядерных процессоров. Кроме того, такие программы не справляются с обработкой множества операций одновременно, особенно если речь идет о задачах, связанных с вводом-выводом, например сетевыми запросами или чтением файлов. Производительность можно значительно улучшить, внедрив в код параллельные вычисления, конкурентность или асинхронное программирование. Для этого Python предлагает такие инструменты, как multiprocessing, threading и asyncio.

habr.com/ru/companies/skillfac

#python #multiprocessing #asyncio #threading

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst