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

Резултати

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

Пребарај: #splinternet

当前筛选 #splinternet清除筛选
Libreware

@libreware · Post #968 · 05.07.2021 г., 01:41

SplinterNet Android app designed to create an unblockable Twitter like network that uses no cellular or Internet communications. All messages are transmitted over Bluetooth between users, creating a true peer-to-peer messaging system. All messages are anonymous to prevent retaliation by government authorities. SplinterNet is a true peer-to-peer network in that it requires physical proximity to other people to transmit messages. In the current version this happens over a close range Bluetooth connection. To illustrate how SplinterNet works, here is an example scenario: You take a picture of a protest happening near your home. Fearing a spread of the protest the government shuts down cellular and Internet access to most citizens. You write a short message about the protest in SplinterNet and attach the picture. When you next meet with your friends, you sync SplinterNet with them. They now have your photo and will spread it to their friends. You also now have all their messages, which includes photos taken of protests happening in other parts of the country. Any person who can reach a working Internet connection can post all of these photos to any sharing service or send directly to journalists to publicize. If you fear capture, you can press a single button and all the messages in your copy of SplinterNet are deleted. Features Create a post with text and an optional single image. Mark posts as important to increase their spread within the network. These posts will be sent first during syncing and will be highlighted for the people you sync with. Delete posts to stop their spread. The contents of the network reflect what users of the network think is important and appropriate. You don't have to spread anything you don't want to. Project Status This is an experimental project still in development. All of the features listed here should work, they just haven't been tested in large networks. Please let us know how it works! https://raw.githubusercontent.com/megamattron/SplinterNet/master/other/splinterNet-infosheet.png https://github.com/megamattron/SplinterNet 📡@nogoolag📡@libreware #SplinterNet#im#messaging#p2p#bt#bluetooth