awesome-repositories.com
博客
awesome-repositories.com

通过 AI 驱动的搜索,发现最优秀的开源仓库。

探索精选搜索开源替代品自托管软件博客网站地图
项目关于排名机制媒体报道MCP 服务器
法律隐私政策服务条款
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
python-trio avatar

python-trio/trio

0
View on GitHub↗
7,280 星标·398 分支·Python·5 次浏览trio.readthedocs.io↗

Trio

Trio is an asynchronous I/O runtime and concurrency library for Python. It provides a system for executing non-blocking network and disk operations through a centralized event loop and task scheduler.

The library is built on a structured concurrency model, which ensures that asynchronous tasks are bound to a specific lifetime and cannot outlive the scope that started them. It utilizes a nursery-based task manager to track task lifecycles in a parent-child tree, preventing orphaned concurrent operations by requiring child tasks to be joined before their parent scope exits.

The framework covers asynchronous I/O programming and high concurrency networking, allowing for the management of multiple parallel operations and network connections. It also includes capabilities for concurrent task coordination and async resource management to ensure clean shutdowns of tasks and system resources.

Features

  • Concurrency Libraries - Provides a complete runtime and library for managing asynchronous I/O and parallel tasks in Python.
  • Asynchronous Event Loops - Provides a single-threaded event loop that manages a queue of pending I/O events and callbacks.
  • Resource Lifecycle Managers - Manages the lifecycle of network sockets and processes to ensure clean resource disposal and prevent leaks.
  • Scope-Based Resource Cleanup - Provides predictable teardown of active operations by automatically releasing resources when tasks go out of scope.
  • High-Concurrency Networking - Enables the creation of Python servers and clients capable of maintaining thousands of active connections efficiently.
  • Asynchronous I/O Libraries - Provides a non-blocking interface and event loop for handling simultaneous network connections and file operations in Python.
  • Async I/O Runtimes - Implements a centralized event loop and task scheduler for executing non-blocking network and disk operations.
  • Structured Concurrency Managers - Implements a structured concurrency model where asynchronous tasks are strictly bound to the lifetime of their creating scope.
  • Structured Concurrency Hierarchies - Uses a nursery-based task hierarchy to ensure all child concurrent operations are joined before the parent scope exits.
  • Cancellation Propagation - Propagates cancellation signals down the task tree using scoped exceptions to ensure predictable resource cleanup.
  • Nursery Managers - Implements nursery-based task management to ensure child tasks are always joined, preventing orphaned concurrent operations.
  • Cooperative Schedulers - Schedules multiple concurrent tasks on a single thread by requiring functions to voluntarily yield control.
  • Event-Driven I/O - Handles high-concurrency network connections and subprocess monitoring using an event-driven asynchronous I/O framework.
  • Asynchronous Shutdown Coordination - Coordinates the asynchronous shutdown of tasks by blocking process termination until all registered operations complete.
  • I/O Polling - Implements low-level system selector interfaces to efficiently wake asynchronous tasks when I/O data is ready.
  • Process Signal Management - Processes OS-level interrupt signals to ensure concurrent tasks shut down cleanly without leaving orphaned processes.
  • Concurrent Task Runners - Manages and monitors multiple concurrent asynchronous tasks to ensure a predictable and organized order of execution.
  • Alternative Runtimes - Pythonic library for asynchronous I/O.
  • Asynchronous Programming - Simplifies async I/O with a structured concurrency model.
  • Networking - Library for asynchronous concurrency and I/O.

Star 历史

python-trio/trio 的 Star 历史图表python-trio/trio 的 Star 历史图表

AI 搜索

探索更多 awesome 仓库

用简单的语言描述您的需求 —— AI 将根据相关性为您从数千个精选开源项目中进行排序。

Start searching with AI

Trio 的开源替代方案

相似的开源项目,按与 Trio 的功能重合度排序。
  • tokio-rs/miotokio-rs 的头像

    tokio-rs/mio

    7,024在 GitHub 上查看↗

    Mio is a low-level I/O library for Rust that provides an event-driven framework for monitoring multiple network sockets and file descriptors. It acts as a portable wrapper for operating system native polling systems, including epoll, kqueue, and IOCP, allowing applications to trigger events when resources are ready for reading or writing without blocking the execution thread. The library provides a non-blocking socket interface for managing TCP, UDP, and Unix sockets. It distinguishes itself through a vectored I/O implementation, enabling scatter-gather reads and writes across multiple buffer

    Rustasynchronousnetworkingnon-blocking
    在 GitHub 上查看↗7,024
  • gevent/geventgevent 的头像

    gevent/gevent

    6,440在 GitHub 上查看↗

    Gevent is a Python coroutine concurrency library and asynchronous task manager designed for high-concurrency I/O tasks. It provides a cooperative networking framework for building asynchronous TCP, UDP, and HTTP servers, as well as a WSGI web server implementation for hosting web applications. The project is distinguished by its standard library monkey-patching tool, which replaces blocking synchronous functions with cooperative versions to enable asynchronous behavior in third-party code. This allows for a cooperative multitasking workflow where the system yields execution during I/O waits t

    Pythonasynciocoroutinesgreenlet
    在 GitHub 上查看↗6,440
  • smol-rs/smolsmol-rs 的头像

    smol-rs/smol

    4,979在 GitHub 上查看↗

    Smol is a lightweight Rust asynchronous runtime and task executor. It provides a suite of foundational tools for scheduling and executing asynchronous futures, managing background workloads, and handling non-blocking network and file operations. The project includes a compatibility layer for adapting asynchronous types and execution contexts, enabling futures to run across different runtime ecosystems. It also features a mechanism to offload synchronous I/O and CPU-intensive operations to dedicated worker thread pools to prevent runtime stalls. Its capabilities cover non-blocking network I/O

    Rustasyncconcurrencyfutures
    在 GitHub 上查看↗4,979
  • yedf2/handyyedf2 的头像

    yedf2/handy

    4,653在 GitHub 上查看↗

    Handy is a C++11 network server framework and event-driven networking engine designed for building high-performance concurrent TCP and UDP servers. It functions as an asynchronous I/O library and an HTTP server implementation that separates asynchronous network I/O from synchronous business logic to simplify server development. The framework distinguishes itself by utilizing platform-specific event notifications to manage millions of simultaneous network connections and providing an SSL/TLS network wrapper for encrypted asynchronous data transmission. It implements a half-sync/half-async proc

    C++cc-plus-plusconcurrent-programming
    在 GitHub 上查看↗4,653
查看 Trio 的所有 30 个替代方案→

常见问题解答

python-trio/trio 是做什么的?

Trio is an asynchronous I/O runtime and concurrency library for Python. It provides a system for executing non-blocking network and disk operations through a centralized event loop and task scheduler.

python-trio/trio 的主要功能有哪些?

python-trio/trio 的主要功能包括:Concurrency Libraries, Asynchronous Event Loops, Resource Lifecycle Managers, Scope-Based Resource Cleanup, High-Concurrency Networking, Asynchronous I/O Libraries, Async I/O Runtimes, Structured Concurrency Managers。

python-trio/trio 有哪些开源替代品?

python-trio/trio 的开源替代品包括: tokio-rs/mio — Mio is a low-level I/O library for Rust that provides an event-driven framework for monitoring multiple network… gevent/gevent — Gevent is a Python coroutine concurrency library and asynchronous task manager designed for high-concurrency I/O… smol-rs/smol — Smol is a lightweight Rust asynchronous runtime and task executor. It provides a suite of foundational tools for… yedf2/handy — Handy is a C++11 network server framework and event-driven networking engine designed for building high-performance… sourcegraph/conc — conc is a Go concurrency library and structured concurrency framework providing primitives for managing parallel… twisted/twisted — Twisted is an event-driven networking engine for Python that provides a framework for building asynchronous network…