Стандартная библиотека asyncio это стандарт (начиная с Py3.4) для работы с асинхронным кодом. Но эта библиотека достаточно низкоуровневая, со своими проблемами, устаревшими подходами.
Чтобы исправить это, были созданы разные обертки и альтернативы с реализацией популярных инструментов и паттернов асинхронного программирования. Это такие библиотеки как:
- trio: улучшает корректность выполнения, не оставляя потерянных корутин при ошибках, то есть предлагает Structured Concurrency из коробки.
- curio: упрощение синтаксиса и читаемости кода, больше похоже на работу с потоками.
- anyio: универсальная обертка над asyncio или trio плюс множество вспомогательных инструментов.
anyio используется в FastAPI как основная библиотека для работы с асинхронным кодом и вызовом синхронного кода из асинхронного.
В общем, рекомендую почитать про возможности anyio, возможно вы более не будете использовать чистый asyncio в своих проектах)
Это совсем не значит что дефолтный asyncio плох, он тоже даёт достаточный для работы функционал и продолжает развиваться. Например, в версии 3.11 появились TaskGroup, с похожим на trio функционалом. Так что он тоже актуален, просто придется больше написать кода самостоятельно.
#libs#async
🔥TokenPocket Now supports Linea DeFi Assets Management! Powered by Blockin.ai!
Open your TokenPocket 📲 Assets Page ➡️ DeFi Entrance ➡️manage all your #DeFibehaviors including #Staking, #Deposits, #Farming, #Lending, #LiquidityPools etc.
👉https://tokenpocket.pro
Whales Bring Stablecoins to Exchanges
🔹 After the Christmas crypto market dip, a positive trend emerges as whales deposit stablecoins into exchanges.
🔹 Last 24 hours: 7 deposits of $FDUSD on Binance, each at least $9M; one as high as $50M.
🔹 Deposits linked to new launchpool of Bioprotocol $BIO.
🔹 Large stablecoin deposits indicate whales are gearing up for purchases, potentially boosting market prices.
🔹 Bitcoin spot ETFs halted a 4-day outflow streak with $475M inflow yesterday, while Ethereum funds attracted $117M.
More details on whale activity | ETF inflow information
#Crypto#Stablecoins#Binance#Whales#Bioprotocol#ETF#Bitcoin#Ethereum#MarketTrends#Investment#Finance#CryptoMarket#Trading#FDUSD#Launchpool#Deposits#Inflows#PriceAction#HODL#VC
Justin Sun Transfers $245M in ETH
Justin Sun's team has transferred 70,182 ETH to HTX, valued at approximately $245 million. This includes 42,905 ETH unlocked from Lido Finance and 27,277 ETH from Etherfi. Since November 10, Sun has deposited 179,101 ETH worth about $645 million in total, averaging $3,601 per ETH. Analysts suggest Ethereum could outperform Bitcoin in January 2025, potentially increasing the ETH/BTC ratio above 0.04, which may spur altcoin growth. Historical Bitcoin prices show significant growth leading up to Christmas over the years with predictions continuing for 2025. Spot On Chain | Cointelegraph | Simply Bitcoin TV
#Ethereum#BTC#JustinSun#HTX#LidoFinance#Etherfi#Crypto#PriceAnalysis#MarketTrends#Altcoins#ETHBTC#Deposits#Blockchain#Trading#Fundamentals#Investing#CryptoHistory#FuturePredictions#ETFs#Growth
🚀Big news! With the support of Debank and Blockin.ai, we're thrilled to unveil the integration of 10 New Chains for DeFi Asset Management on #TokenPocket: #Gnosischain, #Arbitrum, #Klaytn, #Avalanche, #Aurora, #Conflux, #BTT, #Nova, #ZKsync, and #EOS EVM.
💪Combined with our existing support for #ETH, #BSC, #Matic, #OP, #Moonbeam, #Heco, #FTM, #OKTC, and #Harmony, we now support a total of 19 Chains!
📲On your wallet's assets page ➡️DeFi Entrance ➡️manage your #DeFi assets, explore #Staking, #Deposits, #Farming, #Lending, #LiquidityPools, and More — all of these on-chain #DeFibehaviors.
🔥Explore and manage your DeFi Assets seamlessly with the power of 👉TokenPocket. Check it out today! #DeFi#blockchain#tokenpocket