Expand description

Generic implementations of PyO3 Asyncio utilities that can be used for any Rust runtime

Items marked with unstable-streams are only available when the unstable-streams Cargo feature is enabled:

[dependencies.pyo3-asyncio]
version = "0.17"
features = ["unstable-streams"]

Traits

Exposes the utilities necessary for using task-local data in the Runtime
Generic utilities for a JoinError
Adds the ability to scope task-local data for !Send futures
Generic Rust async/await runtime
Extension trait for async/await runtimes that support spawning local tasks

Functions

Convert a Rust Future into a Python awaitable with a generic runtime
Convert a Rust Future into a Python awaitable with a generic runtime
Either copy the task locals from the current task OR get the current running loop and contextvars from Python.
Get the current event loop from either Python or Rust async task local context
Convert a Python awaitable into a Rust Future
Convert a !Send Rust Future into a Python awaitable with a generic runtime
Convert a !Send Rust Future into a Python awaitable with a generic runtime and manual specification of task locals.
Run the event loop until the given Future completes
Run the event loop until the given Future completes