Стандартная библиотека asyncio это стандарт (начиная с Py3.4) для работы с асинхронным кодом. Но эта библиотека достаточно низкоуровневая, со своими проблемами, устаревшими подходами.
Чтобы исправить это, были созданы разные обертки и альтернативы с реализацией популярных инструментов и паттернов асинхронного программирования. Это такие библиотеки как:
- trio: улучшает корректность выполнения, не оставляя потерянных корутин при ошибках, то есть предлагает Structured Concurrency из коробки.
- curio: упрощение синтаксиса и читаемости кода, больше похоже на работу с потоками.
- anyio: универсальная обертка над asyncio или trio плюс множество вспомогательных инструментов.
anyio используется в FastAPI как основная библиотека для работы с асинхронным кодом и вызовом синхронного кода из асинхронного.
В общем, рекомендую почитать про возможности anyio, возможно вы более не будете использовать чистый asyncio в своих проектах)
Это совсем не значит что дефолтный asyncio плох, он тоже даёт достаточный для работы функционал и продолжает развиваться. Например, в версии 3.11 появились TaskGroup, с похожим на trio функционалом. Так что он тоже актуален, просто придется больше написать кода самостоятельно.
#libs#async
🪐 On the outskirts of our galaxy, astronomers have detected a mysterious radio signal from the direction of the dwarf galaxy Leo I, which sits about 820,000 light-years away. While this signal is not evidence of aliens, its unusual features have made Leo I a target for SETI (Search for Extraterrestrial Intelligence) researchers who are carefully studying its properties to rule out natural sources—demonstrating how real cosmic signals from known galaxies push the boundaries of the scientific search for life beyond Earth. ✨
#aliens⚡#SETI⚡#galaxies⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 In 2017, astronomers detected a possible candidate for an extraterrestrial signal known as BLC1 from the direction of Proxima Centauri, the closest star system to our Sun. Follow-up studies showed the signal was likely human-made interference, but the discovery led to months of careful investigation and demonstrated how scientists search for alien technology by sifting through real, named stars for artificial-looking radio waves. ✨
#aliens⚡#SETI⚡#exoplanets⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 In 2020, astronomers using the Breakthrough Listen initiative scanned 1327 nearby stars up to 160 light-years away—including known exoplanet systems like Epsilon Eridani and Tau Ceti—for artificial radio signals that could hint at advanced alien technology. Although the search revealed over 9 million candidate signals, all were traced back to Earth-made sources, highlighting both the challenge and the rigor of the scientific hunt for extraterrestrial intelligence. ✨
#aliens⚡#exoplanets⚡#SETI⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
🪐 Scientists at the SETI Institute used the MeerKAT radio telescope in South Africa to scan the star system HD 164595, located about 94 light-years from Earth, after an unexplained radio signal was detected there in 2016. While no follow-up signals were found and natural or human-made origins are possible, the search highlights how carefully astronomers investigate even the faintest hints of possible alien technology from real, named stars in our galaxy. ✨
#aliens⚡#SETI⚡#radio⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
🪐 Between 1960 and 1998, the Arecibo radio telescope in Puerto Rico transmitted several powerful messages toward star clusters like M13 in the hope that intelligent aliens, if they exist, might detect and respond. These "active SETI" attempts used coded radio signals aimed at real star systems—making the search for extraterrestrial life not just a matter of listening, but also of sending greetings out into the galaxy with real, named astronomical targets. ✨
#aliens⚡#SETI⚡#radioastronomy⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 The SETI Institute's ongoing Breakthrough Listen project regularly targets the region around the star Proxima Centauri—our solar system’s closest neighbor—searching for unusual radio signals that could hint at alien technology. By scanning billions of radio frequencies from Proxima Centauri and other nearby stars, scientists are using real astronomy to explore whether advanced extraterrestrial civilizations might exist within our interstellar neighborhood. ✨
#aliens⚡#ProximaCentauri⚡#SETI⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 The SETI Institute regularly scans the region near the star Ross 128, about 11 light-years away, after unusual radio signals were detected from its direction in 2017. Although those signals were later traced to Earth-based interference, the careful monitoring of Ross 128 shows how scientists use real stars as targets in the ongoing search for signs of life beyond our solar system. ✨
#aliens⚡#SETI⚡#Ross128⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels
🪐 One of the most famous searches for alien life involves listening for signals from the direction of Tabby’s Star (KIC 8462852), a real star in the constellation Cygnus known for its strange, unpredictable dips in brightness. Scientists at the SETI Institute have pointed sensitive radio telescopes at Tabby’s Star, searching for artificial signals that could suggest advanced technology, but so far, no evidence of extraterrestrial messages has been found—leaving the nature of the star’s odd behavior a true cosmic mystery. ✨
#aliens⚡#SETI⚡#Tabby⚡#nasa⚡#galaxy⚡#stars⚡#astronomy⚡#universe⚡#cosmos⚡#space
👉subscribe Universe Mysteries
👉more Channels