Стандартная библиотека asyncio это стандарт (начиная с Py3.4) для работы с асинхронным кодом. Но эта библиотека достаточно низкоуровневая, со своими проблемами, устаревшими подходами.
Чтобы исправить это, были созданы разные обертки и альтернативы с реализацией популярных инструментов и паттернов асинхронного программирования. Это такие библиотеки как:
- trio: улучшает корректность выполнения, не оставляя потерянных корутин при ошибках, то есть предлагает Structured Concurrency из коробки.
- curio: упрощение синтаксиса и читаемости кода, больше похоже на работу с потоками.
- anyio: универсальная обертка над asyncio или trio плюс множество вспомогательных инструментов.
anyio используется в FastAPI как основная библиотека для работы с асинхронным кодом и вызовом синхронного кода из асинхронного.
В общем, рекомендую почитать про возможности anyio, возможно вы более не будете использовать чистый asyncio в своих проектах)
Это совсем не значит что дефолтный asyncio плох, он тоже даёт достаточный для работы функционал и продолжает развиваться. Например, в версии 3.11 появились TaskGroup, с похожим на trio функционалом. Так что он тоже актуален, просто придется больше написать кода самостоятельно.
#libs#async
🪩Nick Fanciulli at Savaya Bali
📆 Sunday, 12 January
Nic Fanciulli is a respected figure in electronic music, recognised for his Grammy-nominated remix of Gorillaz's ‘Dare’ and for founding the influential Saved Records label. His credits include projects such as The Social festival with top artists, as well as appearances at venues such as Space Ibiza and Tomorrowland, cementing his legacy in the dance music scene.
🔍 Details of the event, as well as tickets, are available on the official website.
@BaliNews
#wheretogo#events#parties
🥳A four-day Halloween party in Kuta
🔔 Starting tomorrow, October 30, Old Man's will be hosting a series of Halloween parties starting at 5:00pm.
Come dressed to impress as your favorite ghoul, ghost, or Halloween character for a chance to win big in our spine-chilling costume contest.
🎫 Tables for one-day start from Rp2,400,000 – included entrance fee for 4 pax, 1 bottle of house pouring and 4 mixers.
👨💻 More information via the link.
@BaliNews
#wheretogo#parties#Kuta
🪩 There will be a party at Savaya on Saturday
ℹ️ Building upon her cultural heritage and her musical tastes (the artist grew up listening to artists such as Nina Simone, Bob Marley and Marvin Gaye), AWEN started to produce her unique style of Afro-house.
🧞♀️ It mixed electronic instrumentation with timeless melodies - and a touch of spirituality.
📲 More info and tickets (Rp 600,000) are here.
#wheretogo#parties#Badung@BaliNews
⭐️Electronic music star Boris Brejcha in Bali
📍 Savaya Bali
📆 May 18, 2005
⏰ Doors Open at 1:00 pm
🔞 Entry strictly 21+
🎟 Rp1,350,000
🪩 German DJ Boris Brejcha is known to all lovers of techno and mind-blowing parties. As part of his world tour he will be stopping by Bali.
🔎 More information and tickets here.
@BaliNews
#events#parties#Badung
🪩Morabito presents Bombossa Brothers
📍 Morabito Art Villa, Canggu
📅 Friday, February 28
⏰ 6:00 pm
Bombossa Brothers are twins with two interesting personalities and one mission: to entertain as many people as possible with their groovy melodic sound. Over the past couple of years, they have built up their reputation as a duo to watch by playing around the world and expanding their Momentum event series, hosting up to 2000 people in their hometown of Tallinn, Estonia.
🎫Tickets at the link from 250.000 IDR.
@BaliNews
#wheretogo#parties#Canggu