TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #424 · 13 апр.

Стандартная библиотека asyncio это стандарт (начиная с Py3.4) для работы с асинхронным кодом. Но эта библиотека достаточно низкоуровневая, со своими проблемами, устаревшими подходами. Чтобы исправить это, были созданы разные обертки и альтернативы с реализацией популярных инструментов и паттернов асинхронного программирования. Это такие библиотеки как: - trio: улучшает корректность выполнения, не оставляя потерянных корутин при ошибках, то есть предлагает Structured Concurrency из коробки. - curio: упрощение синтаксиса и читаемости кода, больше похоже на работу с потоками. - anyio: универсальная обертка над asyncio или trio плюс множество вспомогательных инструментов. anyio используется в FastAPI как основная библиотека для работы с асинхронным кодом и вызовом синхронного кода из асинхронного. В общем, рекомендую почитать про возможности anyio, возможно вы более не будете использовать чистый asyncio в своих проектах) Это совсем не значит что дефолтный asyncio плох, он тоже даёт достаточный для работы функционал и продолжает развиваться. Например, в версии 3.11 появились TaskGroup, с похожим на trio функционалом. Так что он тоже актуален, просто придется больше написать кода самостоятельно. #libs#async

Hashtags

Резултати

Пронајдени 1 слични објави

Пребарај: #bricsoutreach

当前筛选 #bricsoutreach清除筛选

🇷🇺🇲🇳 President of Russia Vladimir Putin and President of Mongolia Ukhnaagiin Khurelsukh held a meeting in Ulaanbaatar. 💬President Putin: First of all, I want to thank you for the invitation. It has, in fact, become a good tradition for us to meet in Mongolia every five years to mark the remarkable highly significant events in our shared history. You have listed the dates we will be commemorating this year. Each of these dates holds special significance for both Russia and Mongolia. I would like to add that Erdenet, which you have mentioned, was planned by architects from Leningrad. I am also pleased to note that the Russian-Mongolian relations have been developing on a new foundation. Our countries have experienced growth in trade, despite the various challenges we have faced, including those you have mentioned, such as COVID. In fact, relations between our countries are progressing well across all areas. Apart from the economy and politics, where we continue to cooperate quite actively, I would like to highlight the successful collaboration in culture and education. The Intergovernmental Commission has been working proactively and there are good results. During our discussions today, we will undoubtedly touch upon the key trends in our economic collaboration. To conclude my opening remarks, I would like to extend an invitation for you to visit Kazan, Russia, where the #BRICS Summit will be held later this year. This will be the first top-level event following the recent expansion of the association. I hope you will take part in the #BRICSOutreach – #BRICSplus format. We look forward to seeing you in Russia. International consultations began with a conversation between the two Leaders in a restricted format, followed by a meeting with the participation of the two countries’ delegations. ✍️ A set of documents was signed following talks. The Government of the Russian Federation and the Government of Mongolia signed agreements on the development of basic project documentation for the reconstruction of the TPP-3 thermal power plant in Ulaanbaatar, as well as on cooperation in the supply of oil products and on providing Mongolia with aviation fuel. The Russian Federal Service for the Oversight of Consumer Protection and Welfare and the Ministry of Health of Mongolia signed an Agreement on cooperation to ensure epidemiological welfare with regard to plague. In addition, the Russian Federation Ministry of Natural Resources and Environment and the Ministry of Environment and Climate Change of Mongolia signed a Memorandum of Understanding on cooperation in the conservation of Lake Baikal and the Selenga River. Presidents Vladimir Putin and Ukhnaagiin Khurelsukh also made statements to the media. #RussiaMongolia