Стандартная библиотека asyncio это стандарт (начиная с Py3.4) для работы с асинхронным кодом. Но эта библиотека достаточно низкоуровневая, со своими проблемами, устаревшими подходами.
Чтобы исправить это, были созданы разные обертки и альтернативы с реализацией популярных инструментов и паттернов асинхронного программирования. Это такие библиотеки как:
- trio: улучшает корректность выполнения, не оставляя потерянных корутин при ошибках, то есть предлагает Structured Concurrency из коробки.
- curio: упрощение синтаксиса и читаемости кода, больше похоже на работу с потоками.
- anyio: универсальная обертка над asyncio или trio плюс множество вспомогательных инструментов.
anyio используется в FastAPI как основная библиотека для работы с асинхронным кодом и вызовом синхронного кода из асинхронного.
В общем, рекомендую почитать про возможности anyio, возможно вы более не будете использовать чистый asyncio в своих проектах)
Это совсем не значит что дефолтный asyncio плох, он тоже даёт достаточный для работы функционал и продолжает развиваться. Например, в версии 3.11 появились TaskGroup, с похожим на trio функционалом. Так что он тоже актуален, просто придется больше написать кода самостоятельно.
#libs#async
#GTC/USDT analysis :
#GTC is currently retracing towards the 200 EMA, creating a potential long opportunity on lower time frames (LTF). The price has bounced back from the support zone and is anticipated to test higher levels.
TF : 2h
Entry : $0.418
Target : $0.469
SL : $0.385
#GTC/USDT analysis :
#GTC is currently in a downtrend, marked by a series of lower lows (LLs) and lower highs (LHs). The price is trading within a resistance zone, encountering significant resistance. Consequently, a continuation of the decline is anticipated from this level, with the price likely to test lower levels in the near future.
TF : 4H
Entry : $0.658
Target : $0.560
SL : $0.722
#GTC/USDT analysis :
#GTC has broken below support levels. The price is expected to continue falling and test lower levels, as the higher time frame (HTF) is bearish. Wait for the price to retest the zone before entering a short position.
TF : 4h
Entry : $0.644
Target : $0.596
SL : $0.678
#GTC/USDT UPDATE:
#GTC is now trading around 1.27$. #GTC has broken out a Inverse Head and shoulder pattern on hourly time frame. So the Possible scenario is According to the pattern, we can see short term bullish momentum in it and we can see the price pump 15-20%. Stay tuned with us for further updates✔️
#GTC
The coin looks very good, there is buying, there is reaction from the zones, waiting for further markup of the asset to cover the upper weekly imbalance
📈Sign up on Bybit to trade with me