Стандартная библиотека asyncio это стандарт (начиная с Py3.4) для работы с асинхронным кодом. Но эта библиотека достаточно низкоуровневая, со своими проблемами, устаревшими подходами.
Чтобы исправить это, были созданы разные обертки и альтернативы с реализацией популярных инструментов и паттернов асинхронного программирования. Это такие библиотеки как:
- trio: улучшает корректность выполнения, не оставляя потерянных корутин при ошибках, то есть предлагает Structured Concurrency из коробки.
- curio: упрощение синтаксиса и читаемости кода, больше похоже на работу с потоками.
- anyio: универсальная обертка над asyncio или trio плюс множество вспомогательных инструментов.
anyio используется в FastAPI как основная библиотека для работы с асинхронным кодом и вызовом синхронного кода из асинхронного.
В общем, рекомендую почитать про возможности anyio, возможно вы более не будете использовать чистый asyncio в своих проектах)
Это совсем не значит что дефолтный asyncio плох, он тоже даёт достаточный для работы функционал и продолжает развиваться. Например, в версии 3.11 появились TaskGroup, с похожим на trio функционалом. Так что он тоже актуален, просто придется больше написать кода самостоятельно.
#libs#async
🐱 Выжиматор кошачьего корма – экологично, чисто и удобно!
Это удобное устройство поможет оставить руки чистыми от влажного корма и сделает кормление кошек проще! Без отходов, легко моется, быстро печатается на 3D-принтере!
🔗Скачать:Printables
#️⃣ Категория:#Pets@anzar3d
🖨3D модели для печати | 3D Маркетплейс | Max
Hamster Kombat Announcement: Celebrate International Hamster Day!
#hamster#pets
Hamster Kombat Announcement highlights International Hamster Day on April 12, a day to celebrate these adorable pets with treats and affection. Join in the tradition and make your hamster feel extra special.
Source: link
@tonlines
Furry friends receive blessings at Peru monastery
Animal lovers in Lima, Peru, had their pets blessed during a special mass for their four-legged friends at the Saint Francis Monastery.
#News#Reuters#Pets#Peru
Subscribe: http://smarturl.it/reuterssubscribe
Reuters brings you the latest business, finance and breaking news video from around the globe. Our reputation for accuracy and impartiality is unparalleled.
Get the latest news on: http://reuters.com/
Follow Reuters on Facebook: https://www.facebook.com/Reuters
Follow Reuters on Twitter: https://twitter.com/Reuters
Follow Reuters on Instagram: https://www.instagram.com/reuters/?hl=en
➖@reutersworldchannel➖
Nest Veterinary Secures $700K Funding
Nest Veterinary has successfully raised $700,000 in funding to support its innovative platform that enables users to create and manage customized wellness plans for pets. This funding round took place on December 16, 2024. For more details, visit Nest Veterinary.
#Veterinary#Funding#WellnessPlans#Pets#Startup
Russia Proposes Unified Pet Registry
The St. Petersburg Legislative Assembly has initiated a bill to create a unified registry for pets, requiring mandatory registration and tagging. The draft law is now in the State Duma. Owners must register their animals, aiding quick recovery if lost and identifying owners in case of damage. The government will approve which animals must be registered. A similar proposal led by deputy Nina Ostanina previously gained committee support.
#Russia#pets#registry#law#StateDuma
The main news of Russia and the world ishere.
Slideshow: Drive-through pet blessing
Hundreds of animal lovers in the Philippines had their pets blessed via a drive-through ceremony.
#News#Reuters#Drivethrough#pets#blessing#slideshow
Subscribe: http://smarturl.it/reuterssubscribe
Reuters brings you the latest business, finance and breaking news video from around the globe. Our reputation for accuracy and impartiality is unparalleled.
Get the latest news on: http://reuters.com/
Follow Reuters on Facebook: https://www.facebook.com/Reuters
Follow Reuters on Twitter: https://twitter.com/Reuters
Follow Reuters on Instagram: https://www.instagram.com/reuters/?hl=en
➖@reutersworldchannel➖
Jumping spiders are small spiders in the Salticidae family. They have four pairs of eyes, with large front eyes for hunting and navigation. They do not build webs to catch prey. They hunt by stalking and leaping on insects. They use silk as a safety line when they jump. Some species are kept as pets and are easy to care for.
🕷️🌿🎯
[Read more]
@googlefactss
#Spiders#JumpingSpider#Salticidae#Nature#Pets