Стандартная библиотека asyncio это стандарт (начиная с Py3.4) для работы с асинхронным кодом. Но эта библиотека достаточно низкоуровневая, со своими проблемами, устаревшими подходами.
Чтобы исправить это, были созданы разные обертки и альтернативы с реализацией популярных инструментов и паттернов асинхронного программирования. Это такие библиотеки как:
- trio: улучшает корректность выполнения, не оставляя потерянных корутин при ошибках, то есть предлагает Structured Concurrency из коробки.
- curio: упрощение синтаксиса и читаемости кода, больше похоже на работу с потоками.
- anyio: универсальная обертка над asyncio или trio плюс множество вспомогательных инструментов.
anyio используется в FastAPI как основная библиотека для работы с асинхронным кодом и вызовом синхронного кода из асинхронного.
В общем, рекомендую почитать про возможности anyio, возможно вы более не будете использовать чистый asyncio в своих проектах)
Это совсем не значит что дефолтный asyncio плох, он тоже даёт достаточный для работы функционал и продолжает развиваться. Например, в версии 3.11 появились TaskGroup, с похожим на trio функционалом. Так что он тоже актуален, просто придется больше написать кода самостоятельно.
#libs#async
📺Video Works!
Video marketing has been growing in popularity in recent times, and new statistics from a Brightcove study provide some reasons why that’s the case. Fully three-quarters (76%) of the almost 4,500 adults surveyed in the US, UK and Australia report having made a purchase after viewing a marketing video.
The Brightcove report indicates that video holds even greater appeal among #Millennials, as 85% of 18-34-year-olds said they’d made a purchase after watching a marketing video.
🚀@PerspectiveIX via MarketingCharts.
🤝Trust in Brands & Influencers
UK #Millennials are still more likely to follow recommendations from #SocialMedia influencers than the over 35s category, with 21% swayed by celebrity endorsements – compared to just 4% of over 35s.
🚀@PerspectiveIX - by SurveyMonkey via TheDrum.
❓Would celebrity endorsement influence your decision?
📱Facebook vs. Snapchat
Which one is the most popular among Millennials?
❗️ Social Media Savvy #Millennials: the top 20% of all Millennial #SocialMedia and communications users (in the U.S., ages 18-35), based on the amount of time they spend per month with social media and communication brands.
Stickiness is how Verto measures user engagement with a particular digital property, by comparing daily users to monthly users. Our analysis of the stickiest social media and communications brands among Social Media Savvy Millennials shows which social media platforms this subset of Millennials use on a regular (even daily) basis. Among Social Media Savvy Millennials, the stickiest social media platforms are still dominated by Facebook-owned properties: Facebook (90% stickiness rating) and Facebook Messenger (61% stickiness rating). And while Snapchat earns a 60% stickiness rating, its user numbers still lag well behind those of Instagram (55% stickiness rating).
🚀@PerspectiveIX
☕️prs.pctvix.co/2M8AAOb
📣The Power of Recommendations on Social Media
Brand discovery is where peer-to-peer recommendations on #SocialMedia have the most impact – as much as 27% of #Millennials cite this as a way of discovering new brands.
🚀@PerspectiveIX
Read more at https://prs.pctvix.co/2wH6rlb
📺Who’s Watching the Ads on YouTube?
This week, #YouTube announced a new type of in-stream ad format, positioned as a new way for “advertisers to connect with their audience” by allowing viewers to move beyond mere click-through interactions and onto more complex transactions, like downloading an app or buying a movie ticket.
According to Verto data gathered over the past year, men and Millennials spend the most time watching ads on YouTube’s mobile app.
Men spend an average of 6 minutes per month watching ads on the app, compared to just under 4 minutes per month among women (and an average of just under 5 minutes per month for all users).
Younger #Millennials (18-24) rack up an average of 9 minutes per month watching ads on the YouTube mobile app, which is nearly double the amount of time that older Millennials (25-34) spend with ads on the YouTube app.
🚀@PerspectiveIX via VertoAnalytics.
💌 Join Pulse Weekly
❓Have you watched a video on YouTube during last 7 days?
📊 Gen Z is Still on Facebook
Think you cannot target #GenZ on #Facebook? Think again!
Socialbakers' data shows that this generation is giving brands as much love as #Millennials!
🚀@PerspectiveIX via Socialbakers.
⚡️Generation Z & Their Love for Aesthetic Boards
#GenZ is often referred to as one of the most unique, values-driven generations. They see identity as fluid and care about social impact, with 56% considering themselves socially conscious, according to #Pinterest.
There are over 37 million aesthetic related boards on Pinterest, with Gen Z’ers searching for “aesthetic” 447% more than #Millennials. Through aesthetic boards like witch, grunge and love, Gen Z is finding their identity.
- Witch Aesthetic +281%, 3.1X more than millennials
- Grunge Aesthetic +262%, 6.3X more than millennials
- Love Aesthetic +351%, 2.6X more than millennials
- Art Aesthetic +353%, searching 3.3X more than millennials
- Writing Aesthetic +241%, searching 7.0X more than millennials
As Gen Z curates these boards to find their inner selves, they provide a unique look into emerging subcultures and passions.
❗️Generation Z or Gen Z, also known by a number of other names, is the demographic cohort after the Millennials. There are no precise dates for when this cohort starts or ends, but demographers and researchers typically use the mid-1990s to mid-2000s as starting birth years. There is little consensus regarding ending birth years.
🚀@PerspectiveIX via Pinterest .
❓When were you born?
🤳The Story of Stories
According to a VidMob survey conducted among a thousand 16-24-year-olds in the US, #Snapchat (73%) edges #Instagram (70%) for consumption of Stories. However, the gap in #GenZ's content creation for Stories is a lot bigger on these platforms where Snapchat (58%) is way ahead of Instagram (39%).
For #Millennials, however, the story is a bit different. According to the accompanying survey of a thousand 25-34-year-olds, they seem to prefer Instagram (58%) instead of Snapchat (53%) for story consumption. But just like their younger counterparts, Snapchat (34%) is their platform of choice when it comes to creating stories compared to Instagram (31%) or #Facebook (20%).
🚀@PerspectiveIX
via MarketingCharts: prs.pctvix.co/2MTD6e9
❓Where do YOU WATCH Stories?