awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
python-trio avatar

python-trio/trio

0
View on GitHub↗
7,280 stars·398 forks·Python·22 viewstrio.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 history

Star history chart for python-trio/trioStar history chart for python-trio/trio

How this analysis was created: This summary and feature list were written by an AI model that read the project's README and public documentation pages. Each feature links to the documentation it came from; stars, license and language come straight from the GitHub API. The model does not read the source code, and the analysis is refreshed when the project is re-analysed. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Open-source alternatives to Trio

Similar open-source projects, ranked by how many features they share with Trio.
  • tokio-rs/miotokio-rs avatar

    tokio-rs/mio

    7,024View on 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
    View on GitHub↗7,024
  • gevent/geventgevent avatar

    gevent/gevent

    6,440View on 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
    View on GitHub↗6,440
  • smol-rs/smolsmol-rs avatar

    smol-rs/smol

    4,979View on 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
    View on GitHub↗4,979
  • yedf2/handyyedf2 avatar

    yedf2/handy

    4,653View on 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
    View on GitHub↗4,653
See all 30 alternatives to Trio→

Frequently asked questions

What does python-trio/trio do?

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.

What are the main features of python-trio/trio?

The main features of python-trio/trio are: 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.

What are some open-source alternatives to python-trio/trio?

Open-source alternatives to python-trio/trio include: 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…