Стандартная библиотека asyncio это стандарт (начиная с Py3.4) для работы с асинхронным кодом. Но эта библиотека достаточно низкоуровневая, со своими проблемами, устаревшими подходами.
Чтобы исправить это, были созданы разные обертки и альтернативы с реализацией популярных инструментов и паттернов асинхронного программирования. Это такие библиотеки как:
- trio: улучшает корректность выполнения, не оставляя потерянных корутин при ошибках, то есть предлагает Structured Concurrency из коробки.
- curio: упрощение синтаксиса и читаемости кода, больше похоже на работу с потоками.
- anyio: универсальная обертка над asyncio или trio плюс множество вспомогательных инструментов.
anyio используется в FastAPI как основная библиотека для работы с асинхронным кодом и вызовом синхронного кода из асинхронного.
В общем, рекомендую почитать про возможности anyio, возможно вы более не будете использовать чистый asyncio в своих проектах)
Это совсем не значит что дефолтный asyncio плох, он тоже даёт достаточный для работы функционал и продолжает развиваться. Например, в версии 3.11 появились TaskGroup, с похожим на trio функционалом. Так что он тоже актуален, просто придется больше написать кода самостоятельно.
#libs#async
Here you have your VA Weekly Recap! 🗞️
💰 WAGES
Workers, retirees and unions rallied across cities including Caracas, Valencia and Barinas demanding wage increases, pensions indexed to the food basket and the restoration of collective bargaining rights after four years without a minimum wage increase.
🗳️ COMMUNES
Venezuelans in more than 5,000 communal circuits voted in a national consultation to select local development projects, with each approved initiative receiving $10,000 in public funding. https://shorturl.at/ldjmZ
🤝 US–VENEZUELA RELATIONS
Washington recognized Delcy Rodríguez as Venezuela’s sole authority following renewed diplomatic and trade exchanges, while questions remain over frozen assets and the legal situation of Nicolás Maduro. https://shorturl.at/qvf4U
🛢️ OIL
Chevron and Shell moved to secure new oil projects after a reform of Venezuela’s hydrocarbon law, which would allow lower royalties, private operational control and international arbitration. https://shorturl.at/koFXC
⛏️ MINING
Venezuela’s parliament advanced a mining law reform that would allow foreign concessions of up to 20 years and permit disputes with companies to be settled through international arbitration. https://shorturl.at/NBRAT
🇻🇪 ESSEQUIBO
Caracas rejected Guyana’s 3D seismic exploration campaign in disputed maritime waters, warning that resource exploration in the unresolved Essequibo area would be considered a unilateral act.
🥁 CARIBBEAN CULTURE
A cultural institute launched the 7th “Knowledge, Sounds and Flavors” gathering with talks, workshops and concerts highlighting Caribbean music traditions from countries such as Venezuela, Puerto Rico, Colombia and Cuba.
#WeeklyRecap
📰#WeeklyRecap:
🔵Coinbase's Q2 2023 Details:
- Revenue: Coinbase reported a whopping $663M, a figure that pleasantly surprised Wall Street.
- Trading Volume: While there was a 37% quarterly decline, it still outdid the industry average drop of 48%.
- Revenue Shift: Notably, for the first time in its history, subscription and services revenue surpassed transaction revenue.
- Blockchain Rewards: These surged by 19%, positively impacted by higher ETH prices and MEV rewards.
🟠Base Chain Developments
- Mainnet Launch: On July 13, Coinbase rolled out its Base Layer-2 mainnet exclusively for developers.
- Meme Coin Chaos: $BALD, a meme coin referencing Coinbase CEO Brian Armstrong, launched on July 29. Within 48 hours, over 40,000+ ETH got bridged into the Base chain, boosting $BALD's market cap to $80 million. However, a liquidity withdrawal led to a 95% price crash.
- LeetSwap Exploit: Just two days after $BALD's rise and fall, LeetSwap experienced an exploit, resulting in significant losses. Trading paused as a result.
🔴Curve's Precarious Position
- Loans: Michael Egorov, Curve's founder, loaned out 460 million CRV tokens across AAVE, Fraxlend, and Abracadabra. With a sharp drop in $CRV from $.73 to $.50, his positions are threatened.
- Exploit: A blockchain security firm identified a potential vulnerability in a CRV pool, leading to around $50M being drained, though some was recovered by white-hat MEV bots.
- Egorov's Strategy: With massive interest rates looming, Egorov devised a strategy to reduce loan interest, which currently stands at a utilization rate of 41.73%.
📰#WeeklyRecap:
1️⃣ Uniswap launches UniswapX - a new trading protocol that integrates on-chain and off-chain liquidity through Dutch auction mechanisms. Eliminates gas fees for users & enhances execution quality, though raises centralization concerns.
2️⃣ Celo proposes transition from independent Layer-1 to Ethereum Layer-2 solution to boost security assurances & closely align with Ethereum. The decision will be up for voting after a governance call on July 22.
3️⃣ Arbitrum Foundation's Grant Program is now live. Aiming to boost the growth of the Arbitrum ecosystem, the program provides financial support, community access, & professional guidance.
4️⃣ Sommelier Finance impresses with Real Yield ETH strategy - providing yield optimization for Ethereum assets. It has consistently delivered high yields, though maintaining the performance at high TVLs is key.
5️⃣ Consumer App Monetization is evolving towards blockchain-based models as Web2 platforms adopt Web3 monetization methods. This shift may validate Web3 technologies & foster their mainstream acceptance.
6️⃣ Gnosis Pay is launched - a major step toward merging self-custody and traditional payment methods. The Gnosis Card, one of the first products built on Gnosis Pay, allows users to spend funds directly from their self-custodial accounts.
7️⃣ Chainlink expands into interoperability with Cross-Chain Interoperability Protocol (CCIP) launch, facilitating cross-chain message transfers.
📰#WeeklyRecap:
1. SEC vs. Ripple: The U.S. District Court has made a ruling in the case of the SEC against Ripple. The court has ruled that XRP is not an investment contract, and thus not a security. The programmatic sales of XRP by Ripple on crypto exchanges did not violate securities laws. However, Ripple’s institutional sales of XRP did violate securities laws. The ruling has implications for Ripple's past and future sales, and for other crypto exchanges facing similar legal battles.
2. XRP and Market Reaction: The judgment on Ripple's XRP case prompted a surge in its price by 70% to $0.80. Coinbase shares also rose by 24%. Other tokens allegedly implicated by the SEC in cases against Coinbase and Binance also saw a favorable price action following the ruling.
3. Coinbase Wallet and XMTP: Coinbase has integrated XMTP, a decentralized messaging platform, into its wallet. This combines social features like messaging with financial aspects of the wallet. The integration is viewed as a step towards developing 'super apps', and the growing consumer crypto infrastructure layer also opens new competitive dynamics.
4. Launch of Base and Linea Mainnet: Coinbase's Base and Consensys' zk-rollup Linea announced their mainnet launches. Developers can now deploy apps on Base, while Linea is onboarding select partners and users during their alpha release.
5. Render Network's New Focus: Render Network, initially focused on GPU-accelerated rendering jobs, has introduced RNP-004 to cater to the increased demand for machine learning tasks.
6. Polygon 2.0 Token: Polygon introduced a new token economic model for its ecosystem, introducing the POL token, a 1:1 upgrade of the existing MATIC token. POL allows holders to become validators for multiple Polygon chains and receive rewards for a variety of services.
📰#WeeklyRecap:
1. DeFi Updates: Yearn Finance announced two upgrades: yETH and Yearn Vaults V3. yETH, a liquid staking token aggregator, diversifies users' staked ETH across different liquid staking tokens, while Vaults V3 allows users to create their own vaults and strategies using Yearn's secure platform.
2. Surge Finance: The trend of oracle-free lending protocols continued with the launch of Surge Finance on Arbitrum. Surge creates a lending protocol that treats liquidations as a function of liquidity rather than price, offering protection against manipulated price oracles.
3. Blur Controversy: Blur, an NFT marketplace, faced criticism for allegedly contributing to the decline of blue-chip NFT collections. Critics claim Blur's feeless trading and token incentive scheme undermined creators' earnings and lowered asset prices.
4. Threads Social Platform: Meta launched Threads, a direct rival to Twitter. It allows Instagram users to import their social graphs and plans to integrate ActivityPub to enable communication with other applications, acknowledging the emergence of decentralized social networks.
5. Arweave Universal Data License (UDL): Arweave introduced UDL, a programmable and legally enforceable framework that enables creators to define their own terms and conditions for content uploaded to the permaweb.
6. Multichain Bridge Exploit: A vulnerability in the Multichain protocol, specifically within the Fantom and Moonriver Bridges, allowed substantial funds to be illicitly transferred, totaling ~$126 million. As a result, Multichain suspended its operations and urged users to revoke all contract approvals related to its service.
📰#WeeklyRecap:
1. Bitcoin Regains Dominance: Bitcoin's market dominance has increased to 50% for the first time since Q2 2021. This resurgence is attributed to technical advancements in Bitcoin such as Inscriptions and BRC-20 tokens, and the development of Layer-2 solutions like Stacks and Rollkit. Further, a favorable regulatory climate and the growing interest in Bitcoin ETFs from financial giants have also contributed to Bitcoin's growth.
2. Azuki NFT Collection Controversy: Azuki, an NFT project, faced backlash for its new Elementals derivative PFP collection, which some users felt undermined the value of the original artworks due to their striking similarity. This has led to a decrease in the trading price of both the original Azuki NFTs and the new Elementals.
3. ZkSync's ZK Stack Release: ZkSync has revealed details about its ZK Stack, a rollup development framework. This tool will allow anyone to deploy a rollup on zkSync Era, Ethereum, or another zkSync “Hyperchain”. This is seen as an important step in the growth of zkSync's developer ecosystem.
4. Introduction of ZkSync Hyperchains: ZkSync introduces Hyperchains, launching from a shared bridge on L1. The Hyperbridge bridging system will use validity proofs to verify the state of participating chains, aiming to support cost-effective bridging between Hyperchains.
📰#WeeklyRecap:
1. BlackRock's Bitcoin ETF Proposal: BlackRock, the world's largest asset manager, filed a proposal with the SEC to launch a Bitcoin ETF, the iShares Bitcoin Trust. Despite past rejections of spot Bitcoin ETFs by the SEC due to concerns over investor protection and market manipulation, the news has instilled hope in the crypto market.
2. More Bitcoin ETFs: Following BlackRock's lead, many traditional finance companies have filed for their own Bitcoin ETFs, including Valkyrie, Bitwise, WisdomTree, and Invesco. This increased interest in Bitcoin ETFs indicates a growing acceptance of cryptocurrency in traditional finance.
3. Traditional Finance Activity in Crypto: Deutsche Bank applied for a license to offer crypto custody services, highlighting the growing interest in crypto from traditional finance institutions. Moreover, a new crypto exchange called EDX Markets, backed by Citadel, Fidelity, and Charles Schwab, has launched, expanding options for crypto trading.
4. USDT Untethering: USDT faced downward pressure on its peg, leading to an imbalance in Curve’s 3Pool. This event, caused USDT to depeg to $0.998 against other stablecoins, USDC, and DAI.
5. Uniswap V4: Uniswap Labs announced its plans for Uniswap V4, extending V3’s concentrated liquidity architecture. Uniswap V4 introduces a new feature called "hooks," externally deployed contracts that execute developer-defined logic at a specific point in a pool’s execution, allowing for greater customization over pool functionality and gas optimizations.
From regional diplomacy to public health updates—here’s what shaped the week in East Africa.
👉 Addis Standard Weekly News Recap covers:
• Red Sea security talks involving Eritrea and Sudan
• Ethiopia’s latest Marburg update
• Major changes in Ethiopia’s media leadership
• U.S.–Somalia aid suspension
• Visa denials affecting Ethiopian athletes
• And more regional & global developments
▶️ Watch, share, and stay informed with Addis Standard.
https://www.youtube.com/watch?v=7n-nq-Dg1Ow
#WeeklyRecap#EthiopiaNews#HornOfAfrica#AddisStandard#AfricanNews