Стандартная библиотека asyncio это стандарт (начиная с Py3.4) для работы с асинхронным кодом. Но эта библиотека достаточно низкоуровневая, со своими проблемами, устаревшими подходами.
Чтобы исправить это, были созданы разные обертки и альтернативы с реализацией популярных инструментов и паттернов асинхронного программирования. Это такие библиотеки как:
- trio: улучшает корректность выполнения, не оставляя потерянных корутин при ошибках, то есть предлагает Structured Concurrency из коробки.
- curio: упрощение синтаксиса и читаемости кода, больше похоже на работу с потоками.
- anyio: универсальная обертка над asyncio или trio плюс множество вспомогательных инструментов.
anyio используется в FastAPI как основная библиотека для работы с асинхронным кодом и вызовом синхронного кода из асинхронного.
В общем, рекомендую почитать про возможности anyio, возможно вы более не будете использовать чистый asyncio в своих проектах)
Это совсем не значит что дефолтный asyncio плох, он тоже даёт достаточный для работы функционал и продолжает развиваться. Например, в версии 3.11 появились TaskGroup, с похожим на trio функционалом. Так что он тоже актуален, просто придется больше написать кода самостоятельно.
#libs#async
📰 A sharp and unexpected #failure of the Cloudflare hosting provider affected not only many popular sites and services, but also Fragment, the Tonnel gift marketplace and others. 🌩 Developers are studying this problem.
UPD: hosting has been restored.
#failure📰Domain Link Previews t.me stopped being generated. However, previews of old links can be provided, and the links themselves are fully functional.
UPD: problem solved.
#failure📰 Domains t.me, telegram.org,fragment.com and stel.com were not working and were partially down and were restored to service a few minutes ago. VPN did not solve the problem partially either.
⚡️Airbus A320 Уральских Авиалиний, следовавший из Дубая в Екатеринбург, произвел экстренную посадку в Ашхабаде (Туркменистан).
❗️Самолет, после 2-х часов полета перед пересечением границы Ирана с Туркменистаном на высоте 10.000м, подал сигнал бедствия и запросил экстренную посадку в ближайшем аэропорту.
💬 Как сообщают Уральские Авиалинии, у двигателей была разница в показаниях топлива. В связи с этим командир принял решение выключить 1 двигатель.
Лёгкое небо
#emergency#uralairlines#failure#engine#landing
Avoid Copycat Mistakes
Copying strategies without understanding their context can harm startups. From the experience of a former CTO, mindless imitation of established B2B products leads to failure. Large companies aim to protect their gains, while startups focus on growth. Analyze original strategies instead of copying them blindly. Discover more about proper implementation in the provided link.
#Startup#B2B#SaaS#Strategy#Growth#Analysis#Innovation#Business#Entrepreneurship#CTO#Imitation#Failure#Success#Marketing#Learning#Education#BusinessStrategy
Crypto Scandal: LIBRA's Dramatic Fall
Dave Portnoy attempts to buy tokens after repurposing LIBRA, mistakenly investing $200K in a fraudulent version, which plummeted 93%. Meanwhile, President Javier Milei faces allegations of fraud linked to the LIBRA token. A lawsuit by Argentine lawyers cites the former Central Bank head. CEO Hayden Davis of Kelsier Ventures blames insider selling for the crash. Investigations are ongoing amidst claims of insider knowledge in the token launch. For more insights, check the full news: Forklog News.
#Crypto#Argentina#Libra#Miley#Scandal#Failure#InsiderTrading#Lawsuit#Kelsier#Token#Blockchain#Finance#Investigation#HaydenDavis#Fraud#News#Market#Trends#Regulations#DeFi