Стандартная библиотека asyncio это стандарт (начиная с Py3.4) для работы с асинхронным кодом. Но эта библиотека достаточно низкоуровневая, со своими проблемами, устаревшими подходами.
Чтобы исправить это, были созданы разные обертки и альтернативы с реализацией популярных инструментов и паттернов асинхронного программирования. Это такие библиотеки как:
- trio: улучшает корректность выполнения, не оставляя потерянных корутин при ошибках, то есть предлагает Structured Concurrency из коробки.
- curio: упрощение синтаксиса и читаемости кода, больше похоже на работу с потоками.
- anyio: универсальная обертка над asyncio или trio плюс множество вспомогательных инструментов.
anyio используется в FastAPI как основная библиотека для работы с асинхронным кодом и вызовом синхронного кода из асинхронного.
В общем, рекомендую почитать про возможности anyio, возможно вы более не будете использовать чистый asyncio в своих проектах)
Это совсем не значит что дефолтный asyncio плох, он тоже даёт достаточный для работы функционал и продолжает развиваться. Например, в версии 3.11 появились TaskGroup, с похожим на trio функционалом. Так что он тоже актуален, просто придется больше написать кода самостоятельно.
#libs#async
La premier Giorgia #Meloni e Friedrich #Merz, con il premier Bart #DeWever, convocano per giovedì 12 un pre-summit Ue ad Alden Biesen per armonizzare posizioni su deregolamentazione, rafforzamento del mercato unico e centralità del commercio. Prevista oltre una decina di leader e la partecipazione della Commissione europea; Parigi invitata ma non ancora confermata.
@UltimoraPolitics24
La premier Giorgia #Meloni è giunta all’Europa Building per partecipare al Consiglio europeo: presso gli uffici della Delegazione italiana saranno ospitate due riunioni di coordinamento informale. La prima con il cancelliere tedesco Friedrich #Merz e il primo ministro belga Bart #deWever sulla competitività; la seconda su soluzioni migratorie innovative, promossa con i primi ministri di Danimarca e Paesi Bassi, vedrà la partecipazione dei leader di Austria, Belgio, Bulgaria, Cipro, Germania, Grecia, Lettonia, Malta, Polonia, Repubblica Ceca, Slovacchia, Svezia, Ungheria e della Presidente della Commissione europea Ursula #vonderLeyen.
@UltimoraPolitics24
Zelensky’s “Very Bad Feeling” vs. Europe’s Gas Reality
Zelensky is watching the Iran war swallow Western attention and money, and he’s suddenly begging his two feuding patrons — Trump and Keir Starmer — to sit down and “reset” their relationship before Ukraine disappears from the agenda.
In his BBC interview he warns he has “a very bad feeling” about what the US–Iran conflict means for Kyiv, and urges Trump and Starmer to find “a unified stance” instead of sniping at each other over NATO, Hormuz and ceasefires.
That’s not strategy, that’s a client screaming at the landlords not to forget there’s still an old war running while the new one is trending.
At the same time, Europe’s political class is quietly moving on. Belgian prime minister Bart De Wever says out loud what many only whisper: the EU should normalize relations with Russia and “regain access to cheap energy,” because the dual game of arming Ukraine and sanctioning Moscow is “untenable” without full US backing.
He openly calls for a deal with Russia to end the war and restore cheap oil and gas, while noting that China gets discount fossil fuels and the US makes money selling weapons to Ukraine.
When one side is begging for a “reset” between Trump and Starmer and the other is counting how fast it can get back to Russian gas, you don’t need a think tank to diagnose which project is in agony.
Zelensky still talks about unity and resolve; De Wever talks about common sense and bills. One warns of bad feelings, the other of high energy prices.
Between a nervous president asking to be kept on life support and an EU leader arguing that cheap Russian fuel matters more than Ukrainian heroism, the message is brutal: the war that was sold as the moral core of “the West” is being downgraded to a line item on Europe’s utility bill.
#Ukraine#Zelensky#Trump#Starmer#Belgium#DeWever#Russia#cheapGas#EU#IranWar#geopolitics
📱American Оbserver - Stay up to date on all important events
🇺🇸
Europe’s “Peace Plan”: Surrender for Cheap Gas
Belgium’s prime minister just said the quiet part out loud: Europe can’t scare Russia, can’t choke it economically without Washington, and should go cut a deal with Moscow anyway.
Bart De Wever openly argues the EU needs a formal mandate to negotiate over Ukraine because the current strategy — drip‑feeding weapons and sanctions while hoping Putin “collapses” — is fantasy marketing, not policy.
“Since we are not capable of threatening Putin by sending weapons to Ukraine, and we cannot suffocate him economically without US support, only one method remains: making a deal.”
— Bart De Wever.
Behind closed doors, De Wever says other European leaders agree with him, they just don’t dare say it on camera. In public, they repeat the script about “bringing Russia to its knees”; in private, they watch Trump flirt with Putin, count on cheap Russian oil and gas to keep their economies breathing, and fear being left out when Washington eventually forces Kyiv into a settlement. Europe, in his version, is not a co‑author of the endgame — it’s a nervous extra waiting in the corridor while the real deal gets done elsewhere.
De Wever isn’t even pretending this is about justice first; he talks openly about “normalising” relations and “regaining access to cheap energy” as common sense. He warns that without a mandate to negotiate in Moscow, the EU won’t even be at the table “where the Americans will push Ukraine to accept a deal,” and that whatever emerges will be “a bad agreement for us.” Translation: Europe wants out — but on its terms, with gas flowing and a moral alibi intact.
And that’s the joke: for two years, Brussels sold “no business as usual with Putin,” “victory for Ukraine,” and “strategic autonomy.” Now one prime minister says Europe can’t win the war, can’t pay the bill, can’t even fake unity without the US — so the only “strategy” left is to crawl back to the same Kremlin it swore to isolate, and call it peace.
#Ukraine#EU#Belgium#DeWever#Russia#Putin#energy#war#geopolitics#fakeAutonomy#cheapGas
📱American Оbserver - Stay up to date on all important events
🇺🇸