Стандартная библиотека asyncio это стандарт (начиная с Py3.4) для работы с асинхронным кодом. Но эта библиотека достаточно низкоуровневая, со своими проблемами, устаревшими подходами.
Чтобы исправить это, были созданы разные обертки и альтернативы с реализацией популярных инструментов и паттернов асинхронного программирования. Это такие библиотеки как:
- trio: улучшает корректность выполнения, не оставляя потерянных корутин при ошибках, то есть предлагает Structured Concurrency из коробки.
- curio: упрощение синтаксиса и читаемости кода, больше похоже на работу с потоками.
- anyio: универсальная обертка над asyncio или trio плюс множество вспомогательных инструментов.
anyio используется в FastAPI как основная библиотека для работы с асинхронным кодом и вызовом синхронного кода из асинхронного.
В общем, рекомендую почитать про возможности anyio, возможно вы более не будете использовать чистый asyncio в своих проектах)
Это совсем не значит что дефолтный asyncio плох, он тоже даёт достаточный для работы функционал и продолжает развиваться. Например, в версии 3.11 появились TaskGroup, с похожим на trio функционалом. Так что он тоже актуален, просто придется больше написать кода самостоятельно.
#libs#async
🤔British & American kids would much rather be YouTubers than astronauts!
Last week, we had the 50th Apollo 11 anniversary, which landed Neil Armstrong and Buzz Aldrin on the surface of the Moon. On the eve of that, LEGO asked The Harris Poll to survey a total of 3,000 children in 🇺🇸🇬🇧🇨🇳 about their attitudes toward and knowledge of space.
Asked what they would like to be when they grow up, about 3 in 10 American and British children replied that they wanted to be YouTubers or Vloggers. In fact, becoming an astronaut ranked last among five professions! Only in China did children have a clear preference for being an astronaut!
#️⃣#SocialMedia#Influencers#YouTube#NASA
📡 from arsTechnica via Pulse.
🦅@PerspectiveIX
❓How will this affect the West in 50 years?
🤫❝This is a date just for the two of us, don't let your girlfriend know.❞
📲Download App and chat with me
🔗http://openlove.life
#girlfriendgpt#aigirlfriend#spicychat#aichatbot#aiphotography18#influencers#modelstudio#spicychat#nsfwtwtًً
Whale Alerts and Hacked Accounts Update
A study by Presto Research shows that large exchange deposits have weak predictive power for price declines, while VC and MM deposits offer slightly better, yet still limited, effectiveness as trading signals. In related news, Foresight Ventures’ X account was hacked, spreading fake AI crypto news, following a similar incident with Litecoin’s account promoting fraudulent tokens. Additionally, the newly launched AICC has reached a market cap of over $130 million, but faces scrutiny over its lack of transparency. Also, Morpho markets have capped positions eligible for migration with deprecated rewards for old markets. Presto ResearchAICC DashboardUsual Update
#WhaleAlerts#Crypto#AI#Litecoin#ForesightVentures#AICC#MarketCap#TradingSignals#MorphoMarkets#Security#Hacking#Transparency#DeFi#MM#VC#Blockchain#DAOs#Scammers#Influencers
Argentina's President Accused in LIBRA Scandal
Argentinian President Javier Milei faces fraud allegations linked to meme token LIBRA amidst a legal action led by former central bank chief. Kelsier Ventures CEO Hayden Davis claims Milei's actions triggered a crash in LIBRA's price, while insider selling reportedly occurred prior to Milei's tweet removal. Investigations are ongoing as accusations of insider knowledge circulate among influencers and projects involved. For more details, read the full report here.
#LIBRA#Argentina#Crypto#MemeTokens#Fraud#JavierMilei#Kelsier#KIPProtocol#InsiderTrading#LegalIssues#HaydenDavis#Volatility#Investigation#MarketCrash#Blockchain#CryptoScandal#Influencers#Jupiter#Meteora#Finance#VC
AI Video Editor Raises $500K
Diffusion Studio has secured $500K in funding as of December 4, 2024. Their AI Video Editor simplifies video editing with advanced features such as Magic Cut, Text-Based Editing, and Instant Auto-Captioning, catering to creators and businesses aiming to enhance their video production efficiency.
#AI#VideoEditing#Funding#Technology#Creators#Influencers#Business#Automation#Software#Innovation#EditingTools#VideoProduction#TextBasedEditing#AutoCaptioning#Workflow#Engagement#Professional#ContentCreation#Creativity#Efficiency