Стандартная библиотека asyncio это стандарт (начиная с Py3.4) для работы с асинхронным кодом. Но эта библиотека достаточно низкоуровневая, со своими проблемами, устаревшими подходами.
Чтобы исправить это, были созданы разные обертки и альтернативы с реализацией популярных инструментов и паттернов асинхронного программирования. Это такие библиотеки как:
- trio: улучшает корректность выполнения, не оставляя потерянных корутин при ошибках, то есть предлагает Structured Concurrency из коробки.
- curio: упрощение синтаксиса и читаемости кода, больше похоже на работу с потоками.
- anyio: универсальная обертка над asyncio или trio плюс множество вспомогательных инструментов.
anyio используется в FastAPI как основная библиотека для работы с асинхронным кодом и вызовом синхронного кода из асинхронного.
В общем, рекомендую почитать про возможности anyio, возможно вы более не будете использовать чистый asyncio в своих проектах)
Это совсем не значит что дефолтный asyncio плох, он тоже даёт достаточный для работы функционал и продолжает развиваться. Например, в версии 3.11 появились TaskGroup, с похожим на trio функционалом. Так что он тоже актуален, просто придется больше написать кода самостоятельно.
#libs#async
🗓 On September 27, Russia's Foreign Minister Sergey Lavrov had a meeting with High Representatives of the Pacific Small Island Developing States on the sidelines of the 79th Session of the UN General Assembly in New York.
The discussion centred on current international issues, including the situation in the Asia-Pacific region and globally.
🤝 The Officials confirmed their intention to step up cooperation on a broad range of issues of mutual interest.
#UNGA79
🗓 On September 25, Foreign Minister Sergey Lavrov had a brief meeting with OSCE Chairperson-in-Office, Deputy Prime Minister and Minister for Foreign Affairs of Malta, Ian Borg, on the sidelines of the 79th session of the UN General Assembly, at the latter’s initiative.
The counterparts discussed topical issues on the organisation’s agenda. The Russian side stressed the importance of the OSCE’s work in the interests of all member states, rather than individual groups of countries. Ways to overcome the crisis in the OSCE and normalise its activities were outlined, including in light of the upcoming OSCE Ministerial Council Meeting to take place in Valletta on December 5 and 6.
During the meeting, Sergey Lavrov and Ian Borg also touched upon some aspects of Russia-Malta relations.
#UNGA79
🌐 On September 26, Foreign Minister Sergey Lavrov took part in a traditional #BRICS Ministerial meeting held on the sidelines of the 79th session of the UN General Assembly in New York.
The Ministers had an in-depth exchange of views on a broad range of international issues, including items on the agenda of the 79th UN General Assembly session. Discussions focused on peace and security, global economic stability, and sustainable development. The participants reiterated their commitment to enhancing coordination within BRICS on international platforms.
As part of preparations for the upcoming BRICS Summit in Kazan on October 22-24, the ministers reviewed pressing BRICS cooperation-related issues, including the establishment of a partner country category. The Brazilian delegation provided an outline of its BRICS chairmanship in 2025.
#UNGA79
En el marco del 79° periodo de sesiones de #UNGA79 comenzó la reunión entre el Canciller 🇷🇺 Serguei Lavrov y su homólogo 🇻🇪 Yvan Gil
Embajador Sergey Mélik-Bagdasárov:
Las negociaciones entre Rusia y Venezuela en el marco de la #UNGA79 transcurren en la tradicional atmósfera de amistad y respeto mutuo. ¡Las cálidas sonrisas de los Cancilleres Serguéi Lavrov e Yván Gil son prueba de ello! 😊 Una vez más, reforzamos los fuertes lazos que unen a nuestros pueblos.
#AlianzaEstrategicaEnAccion
🌐 On September 26, Foreign Minister Sergey Lavrovtook part in a traditional #BRICS Ministerial meeting held on the sidelines of the 79th session of the UN General Assembly in New York.
The Ministers had an in-depth exchange of views on a broad range of international issues, including items on the agenda of the 79th UN General Assembly session. Discussions focused on peace and security, global economic stability, and sustainable development. The participants reiterated their commitment to enhancing coordination within BRICS on international platforms.
As part of preparations for the upcoming BRICS Summit in Kazan on October 22-24, the ministers reviewed pressing BRICS cooperation-related issues, including the establishment of a partner country category. The Brazilian delegation provided an outline of its BRICS chairmanship in 2025.
#UNGA79
🔴#LIVE: Press Conference by Deputy Minister of Foreign Affairs of Russia Sergey Vershinin on the outcomes of the participation of the Russian delegation in the High-Level Week of the 79th Session of the UN General Assembly
🔴Ruptly
🔴Russia's MFA Website
#UNGA79
🔴#LIVE: Russia's Foreign Minister Sergey Lavrov's remarks at the General Debate of 79th Session of the UN General Assembly
🔴Ruptly
🔴UN Web TV
🔴Russia’s MFA website
#UNGA79
🔴#LIVE: Russia's Foreign Minister Sergey Lavrov's news conference following the High-Level Week of the 79th Session of the UN General Assembly
🔴X (ex-Twitter)
🔴Facebook
🔴Ruptly
🔴Russia’s MFA website
#UNGA79
🔴#LIVE: Remarks by Russian Foreign Minister Sergey Lavrov at G20 Foreign Ministers meeting on the sidelines of the 79th Session of the UN General Assembly
🔴Ruptly
🔴UN Web TV
🔴X
🔴Facebook
🔴Russia’s MFA website
#UNGA79
🗓 On September 26, Russia's Foreign Minister Sergey Lavrovtook part in a working meeting of the #CSTO Foreign Ministers organised by Kazakhstan’s CSTO chairmanship on the sidelines of the high-level week of the 79th Session of the UN General Assembly.
🤝 The Ministers discussed a wide range of international and regional security issues. They stressed the need to step up coordination of actions on topical issues on the UN’s agenda between the CSTO member states on the UN platform and further promote cooperation between the CSTO and the UN.
The Ministers discussed preparations for the next session of the CSTO Collective Security Council on November 28 in Astana.
#UNGA79