Стандартная библиотека asyncio это стандарт (начиная с Py3.4) для работы с асинхронным кодом. Но эта библиотека достаточно низкоуровневая, со своими проблемами, устаревшими подходами.
Чтобы исправить это, были созданы разные обертки и альтернативы с реализацией популярных инструментов и паттернов асинхронного программирования. Это такие библиотеки как:
- trio: улучшает корректность выполнения, не оставляя потерянных корутин при ошибках, то есть предлагает Structured Concurrency из коробки.
- curio: упрощение синтаксиса и читаемости кода, больше похоже на работу с потоками.
- anyio: универсальная обертка над asyncio или trio плюс множество вспомогательных инструментов.
anyio используется в FastAPI как основная библиотека для работы с асинхронным кодом и вызовом синхронного кода из асинхронного.
В общем, рекомендую почитать про возможности anyio, возможно вы более не будете использовать чистый asyncio в своих проектах)
Это совсем не значит что дефолтный asyncio плох, он тоже даёт достаточный для работы функционал и продолжает развиваться. Например, в версии 3.11 появились TaskGroup, с похожим на trio функционалом. Так что он тоже актуален, просто придется больше написать кода самостоятельно.
#libs#async
#Ethiopia, #Danish technology firm sign agreement to modernize groundwater exploration
Addis Abeba - Ethiopian Institute of Water Technology (EIWT) has signed a Memorandum of Understanding (MoU) with Danish technology firm Transient Electromagnetic (TEM) to modernize groundwater exploration and management across Ethiopia.
The agreement, signed on April 20, aims to deploy advanced geophysical technologies to more accurately identify and map groundwater resources, according to the Institute.
Under the partnership, TEM will introduce its Airborne Electromagnetic (AEM) survey technology to Ethiopian professionals, a method widely used globally for high-resolution groundwater mapping.
Dr. Tamene Hailu, Director General of the Institute, underscored the importance of the collaboration, saying international partnerships are essential for unlocking Ethiopia’s groundwater potential.
https://www.facebook.com/AddisstandardEng/posts/pfbid07EhC8GDGA3gdReadWnDwEJn7UZt3RqGRC9CHnadCfVZFyq9sRHbmizUrER5xQsKrl
News: AFD, #Danish Refugee Council launch €8 million project to support women’s resilience in #Ethiopia, #Sudan
Agence Française de Développement (#AFD) and the Danish Refugee Council (#DRC) have launched an €8 million initiative aimed at strengthening women’s economic resilience and promoting social cohesion among communities affected by the Sudan crisis in Sudan and Ethiopia.
The 24-month project, funded by the French government and implemented by DRC in partnership with local feminist organizations, will target conflict-affected populations in Gedaref State in Sudan and the #Benishangul-Gumuz region in Ethiopia.
According to a press release, the program will focus on improving access to essential services, supporting women’s economic empowerment, and strengthening relations between displaced populations and host communities.
The initiative comes as the war in Sudan, ongoing........
https://web.facebook.com/AddisstandardEng/posts/pfbid0uumWytCgCpdTzbjyjwXm7czqBeyhwB5XBW6yuED1GLAMBDxLkZGU7x8DqyPa7dyzl
Mark Carney: The Present World Order Is Over
Canadian prime minister Carney has said that the US-led global system of governance is enduring “a rupture,” defined by great power competition and a “fading” rules-based order.
His speech to political and financial elites at the World Economic Forum comes a day before US President Donald Trump was set to address the gathering in Davos, Switzerland.
Since entering Canadian politics in 2025, Carney has repeatedly warned that the world was not going to return to a pre-Trump normal. He re-affirmed that message on Tuesday, in a speech that did not name Trump but offered an analysis of the president’s impact on global affairs.
He noted that Canada had benefited from the old “rules-based international order,” including from “American hegemony” that “helped provide public goods: open sea lanes, a stable financial system, collective security, and support for frameworks for resolving disputes.”
A new reality has set in, Carney said.
“Call it what it is: a system of intensifying great power rivalry where the most powerful pursue their interests using economic integration as coercion.”
In an apparent warning against efforts to appease major powers, Carney said countries like Canada can no longer hope that “compliance will buy safety.”
“It won’t,” he said.
Trump brutally mocked the Europeans before heading to the World Economic Forum, where he will be the star of a dark, self-made drama over the fate of the autonomous Danish territory.
Asked on Tuesday how far he was prepared to go to acquire Greenland from Denmark, a fellow Nato member, Trump replied: “You’ll find out.”
But leaders in the Swiss ski resort have closed ranks against Trump’s aggressive America First stance, with French President Emmanuel Macron vowing to stand up against “bullies” and the EU promising an “unflinching” response.
Macron said that now was “not a time for new imperialism or new colonialism”, criticising the “useless aggressivity” of Trump’s pledge to levy tariffs on countries that opposed a US takeover of Greenland.
Greenland’s prime minister said on Tuesday his tiny population of 57,000 must be prepared for military force.
Carney delivered his Davos speech after Canada’s Globe and Mail newspaper reported that the country’s military has developed a model response to a US invasion of Canada.
Citing two unnamed senior government officials, the paper said the Canadian response model centres on insurgency-style tactics, like those used in Afghanistan by fighters who resisted Soviet and later US forces.
After Trump’s 2024 election and in the early months of his new term, he repeatedly referred to the US’s northern neighbour as the 51st state and said a merger would benefit Canada.
Trump’s annexation talk has eased in recent months, but overnight he posted an image on his social media platform of a map showing Canada and Venezuela covered in the US flag, implying a full American takeover of both countries.
The Davos meeting has been overshadowed by Trump’s threats to enforce US control over Greenland, with the president vowing that his plan for the autonomous Danish territory was irreversible.
#carney#world#order#greenland#danish#trump
📱American Оbserver - Stay up to date on all important events
🇺🇸
🆕We just released TP Wallet's New Version on iOS! 🔺2.1.6🔺
🔵 Support #KeyPalCard. KeyPalWallet
🔵 Support #BTC#Nostr Protocol.
🔵 KeyPal Hardware Wallet supports #BTC#Taproot address. KeyPalWallet
🔵 Support zksync Era MultiSig wallet.
🔵 Support unisat_wallet's new signature protocol.
🔵 Support the entry points for more tools on the Assets page.
🔵 Support #Malaysian, #Danish, and #Hungarian.
👉https://tokenpocket.pro
【Details】https://twitter.com/TokenPocket_TP/status/1719309177485766701
【Powered By】Crypto Box
Related 😂💥
#viveknation⚡#danish_zehen#fambruh#fambruharmy#baroda#vadodara#travelgram#travelblogger#model#scarlettjohansson#danish#streetphotography#sections#style#exploremore#keepgoing#explore#ganeshnation🌙️#ourvadodara#foryou#reactionboi#keepmovingforward#keepitsimple#keepsupporting#keepfollowing👣#photography#instagood#motivation