TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #424 · 13 апр.

Стандартная библиотека asyncio это стандарт (начиная с Py3.4) для работы с асинхронным кодом. Но эта библиотека достаточно низкоуровневая, со своими проблемами, устаревшими подходами. Чтобы исправить это, были созданы разные обертки и альтернативы с реализацией популярных инструментов и паттернов асинхронного программирования. Это такие библиотеки как: - trio: улучшает корректность выполнения, не оставляя потерянных корутин при ошибках, то есть предлагает Structured Concurrency из коробки. - curio: упрощение синтаксиса и читаемости кода, больше похоже на работу с потоками. - anyio: универсальная обертка над asyncio или trio плюс множество вспомогательных инструментов. anyio используется в FastAPI как основная библиотека для работы с асинхронным кодом и вызовом синхронного кода из асинхронного. В общем, рекомендую почитать про возможности anyio, возможно вы более не будете использовать чистый asyncio в своих проектах) Это совсем не значит что дефолтный asyncio плох, он тоже даёт достаточный для работы функционал и продолжает развиваться. Например, в версии 3.11 появились TaskGroup, с похожим на trio функционалом. Так что он тоже актуален, просто придется больше написать кода самостоятельно. #libs#async

Hashtags

Резултати

Пронајдени 2 слични објави

Пребарај: #stellenbosch

当前筛选 #stellenbosch清除筛选

🍇🚋 Franschhoek Wine Valley Discover the beauty of the Franschhoek Wine Valley on board the famous Wine Tram🚋 — a hop-on, hop-off experience that lets you explore at your own pace, just 75 km east of Cape Town. 🏞 With 10 different routes, every journey offers something special: ✨ world-class wine tastings 🍷 ✨ guided cellar tours 🛖 ✨ leisurely vineyard lunches 🍽 ✨ peaceful walks among the vines 🌿 The town of Franschhoek — meaning “French Corner” — is part of the Stellenbosch Municipality. Stellenbosch itself is South Africa’s second-oldest town and today stands as a vibrant center of winemaking, gastronomy, art, and culture. 🌍 #Wine#Travel#SouthAfrica#Franschhoek#Stellenbosch#CapeTown

🗓December 3 marks the birthday of Huberte Rupert (1919–2005), a South African philanthropist and art enthusiast whose legacy shaped cultural and social development in the country. 🎨💛🇿🇦 She co-founded the Rupert Museum and supported numerous initiatives in education, healthcare, and the arts. 🖼 The Rupert Museum houses a remarkable collection of modern South African art from the 1940s to the early 2000s. It is located in Stellenbosch, just 50 km east of Cape Town. Her husband, Anton Rupert, was a prominent South African businessman. #SouthAfrica#Art#Culture#Philanthropy#HuberteRupert#RupertMuseum#Stellenbosch