Стандартная библиотека asyncio это стандарт (начиная с Py3.4) для работы с асинхронным кодом. Но эта библиотека достаточно низкоуровневая, со своими проблемами, устаревшими подходами.
Чтобы исправить это, были созданы разные обертки и альтернативы с реализацией популярных инструментов и паттернов асинхронного программирования. Это такие библиотеки как:
- trio: улучшает корректность выполнения, не оставляя потерянных корутин при ошибках, то есть предлагает Structured Concurrency из коробки.
- curio: упрощение синтаксиса и читаемости кода, больше похоже на работу с потоками.
- anyio: универсальная обертка над asyncio или trio плюс множество вспомогательных инструментов.
anyio используется в FastAPI как основная библиотека для работы с асинхронным кодом и вызовом синхронного кода из асинхронного.
В общем, рекомендую почитать про возможности anyio, возможно вы более не будете использовать чистый asyncio в своих проектах)
Это совсем не значит что дефолтный asyncio плох, он тоже даёт достаточный для работы функционал и продолжает развиваться. Например, в версии 3.11 появились TaskGroup, с похожим на trio функционалом. Так что он тоже актуален, просто придется больше написать кода самостоятельно.
#libs#async
🌎 Layers of ancient lake and ocean sediments serve as natural records of Earth's climate. By studying pollen, ash, and chemical changes in these sediments, scientists can reconstruct temperature, rainfall, and ecosystem shifts from thousands to millions of years ago. Some Greenland and Antarctic cores show detailed yearly changes stretching back over 100,000 years. ✨
#geology⚡#climate⚡#paleoclimate
👉subscribe Interesting Planet
👉more Channels
🌍 The Sahara was once a lush region covered with lakes and grasslands about 10,000 years ago. Ancient rock art and fossils show hippos and crocodiles lived where desert sands now stretch for miles. ✨
#historicalgeography⚡#paleoclimate⚡#sahara⚡#geography⚡#nature⚡#earth
👉subscribe Amazing Geography🌍
🌎 Layers of ancient coral reefs act as natural records of Earth’s climate history. By analyzing their growth bands, scientists uncover patterns of sea temperature and ocean chemistry stretching back millions of years. ✨
#coral⚡#geology⚡#paleoclimate
👉subscribe Interesting Planet
🌎 Ancient lake beds called "playa lakes" preserve natural records of Earth's past. Layers of sediment in these basins capture pollen, plant remains, and even insect fossils, revealing climate cycles and environmental shifts over thousands of years. Some dry lakebeds in the U.S. Southwest show records going back 120,000 years. ✨
#geology⚡#paleoclimate⚡#lakes
👉subscribe Interesting Planet
👉more Channels
🌎 Mud layers at the bottom of lakes and oceans provide detailed natural records of Earth's past climates. These sediments contain pollen, fossils, and chemical traces, letting scientists reconstruct environmental changes over hundreds of thousands of years. ✨
#paleoclimate⚡#sediments⚡#geology
👉subscribe Interesting Planet
🌎 Beneath the waters of the Bahamas, the so-called “blue holes” are deep, vertical underwater caves formed during past ice ages when sea levels were lower. Some exceed 300 meters in depth and preserve ancient fossils and climate records in their oxygen-poor layers. ✨
#ocean⚡#cave⚡#paleoclimate
👉subscribe Interesting Planet
👉more Channels
🌎 Around 252 million years ago, the Permian-Triassic extinction wiped out about 90% of marine species and 70% of land vertebrates. Massive volcanic eruptions in Siberia released greenhouse gases that drove rapid global warming, ocean acidification, and low oxygen levels—making it the largest extinction event in Earth's history. ✨
#extinction⚡#volcanoes⚡#paleoclimate
👉subscribe Interesting Planet
👉more Channels
🌎 Antarctic ice cores act as natural records of Earth's atmosphere, trapping ancient air bubbles that show CO2, methane, and temperature changes going back 800,000 years. ✨
#icecores⚡#paleoclimate⚡#antarctica
👉subscribe Interesting Planet
👉more Channels
🌎 Antarctica’s ancient ice sheets hold Earth’s longest direct climate records. Deep ice cores reveal trapped air bubbles, preserving atmospheric changes over 800,000 years. This helps scientists track greenhouse gas levels and temperature shifts across multiple ice ages. ✨
#Antarctica⚡#icecores⚡#paleoclimate
👉subscribe Interesting Planet
👉more Channels
🌎 Ice cores drilled from Antarctica and Greenland are frozen time capsules, preserving thousands of years of air bubbles, pollen, and tiny particles. By analyzing these layers, scientists reconstruct past temperatures, volcanic eruptions, and atmospheric changes stretching back over 800,000 years. ✨
#icecores⚡#paleoclimate⚡#atmosphere
👉subscribe Interesting Planet
👉more Channels
Sea Secrets - Arash Sharifi
Arash Sharifi, a Ph.D. candidate of marine geology and geophysics at the UM Rosenstiel School, takes us into the compelling world of #paleoclimate research. By using climate, #historical, and #archeological records, Sharifi shows how climate change has been affecting the world since the beginning of human #civilization.
@Enviro_Climate
https://youtu.be/ovy-57jx85Q?t=3
🌎 Coral reefs provide another remarkable natural record of Earth’s past. As corals grow, they form bands in their skeletons that reflect seasonal changes in water temperature, chemistry, and even extreme weather events. Some coral cores reveal ocean conditions dating back several centuries. ✨
#coral⚡#reefs⚡#paleoclimate⚡#oceanography
👉subscribe Interesting Planet
👉more Channels