Стандартная библиотека asyncio это стандарт (начиная с Py3.4) для работы с асинхронным кодом. Но эта библиотека достаточно низкоуровневая, со своими проблемами, устаревшими подходами.
Чтобы исправить это, были созданы разные обертки и альтернативы с реализацией популярных инструментов и паттернов асинхронного программирования. Это такие библиотеки как:
- trio: улучшает корректность выполнения, не оставляя потерянных корутин при ошибках, то есть предлагает Structured Concurrency из коробки.
- curio: упрощение синтаксиса и читаемости кода, больше похоже на работу с потоками.
- anyio: универсальная обертка над asyncio или trio плюс множество вспомогательных инструментов.
anyio используется в FastAPI как основная библиотека для работы с асинхронным кодом и вызовом синхронного кода из асинхронного.
В общем, рекомендую почитать про возможности anyio, возможно вы более не будете использовать чистый asyncio в своих проектах)
Это совсем не значит что дефолтный asyncio плох, он тоже даёт достаточный для работы функционал и продолжает развиваться. Например, в версии 3.11 появились TaskGroup, с похожим на trio функционалом. Так что он тоже актуален, просто придется больше написать кода самостоятельно.
#libs#async
#java#gale#java#keyi#minecraft#minecraft_performance#minecraft_server_software#mirai#paper
Leaf is a high-performance, customizable Minecraft server software based on Paper, designed to improve game speed and flexibility. It supports asynchronous pathfinding, mob spawning, and entity tracking, making gameplay smoother. Leaf is compatible with Spigot and Paper plugins, supports all username characters, fixes some Minecraft bugs, and uses a disk-saving file format. It integrates error tracking for easier server maintenance and keeps dependencies up-to-date. This means you get a faster, more stable Minecraft server with better plugin support and easier management, enhancing your overall gaming experience. Java 21 or higher is required to run it.
https://github.com/Winds-Studio/Leaf
🇯🇵 Elezioni #Giappone – Clamoroso exit poll di TBS: Il Partito Liberal Democratico della premier #Takaichi potrebbe da solo ottenere per la prima volta nella storia la super maggioranza dei 2/3 per cambiare la Costituzione.
Governo: 356
#LDP (conservatori): 321
#Ishin (destra libertaria): 35
Opposizione: 109
#CRA (centro): 50
#DPFP (centrodestra): 29
#Sanseito (estrema destra): 11
#Mirai (democrazia digitale): 8
#JCP (comunisti): 3
Altri: 8
@UltimoraPolitics24
#go#coolq#cqhttp#cqhttp_mirai#go#go_cqhttp#golang#group_manager#mirai#mirai_bot#nonebot#onebot#onebot_plugin#onebot_sdk#plugin#qq#qq_bot#qqbot#qqrobot#websocket#zerobot
ZeroBot-Plugin is a comprehensive utility plugin collection for the ZeroBot chatbot framework, offering over 100 features across entertainment, management, and productivity categories. The system provides high-priority functions like chat management, sleep tracking, and group administration, alongside mid-tier features such as image generation, music streaming, and game simulations. Users benefit from flexible plugin control—enabling or disabling specific features per group—and dynamic loading capabilities that reduce program size. The platform supports multiple deployment methods, from pre-compiled releases to local compilation, making it accessible whether you prefer ready-to-use binaries or customized builds. With extensive command options, scheduled task triggers, and AI integration, ZeroBot-Plugin transforms group chat management into an automated, entertaining experience while maintaining user control over which features activate in specific communities.
https://github.com/FloatTech/ZeroBot-Plugin