You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Rust](http://www.rust-lang.org/) bindings for [Python](https://www.python.org/)'s [Asyncio Library](https://docs.python.org/3/library/asyncio.html). This crate facilitates interactions between Rust Futures and Python Coroutines and manages the lifecycle of their corresponding event loops.
9
9
10
-
* API Documentation: [stable](https://docs.rs/pyo3-asyncio/) | [master](https://awestlake87.github.io/pyo3-asyncio/master/doc)
@@ -19,6 +23,7 @@ This library can give spurious failures during finalization prior to PyO3 releas
19
23
20
24
## Quickstart
21
25
26
+
### Rust Applications
22
27
Here we initialize the runtime, import Python's `asyncio` library and run the given future to completion using Python's default `EventLoop` and `async-std`. Inside the future, we convert `asyncio` sleep into a Rust future and await it.
23
28
24
29
More details on the usage of this library can be found in the [API docs](https://awestlake87.github.io/pyo3-asyncio/master/doc).
> Note that we are using `EventLoop.run_until_complete` here instead of the newer `asyncio.run`. That is because `asyncio.run` will set up its own internal event loop that `pyo3_asyncio` will not be aware of. For this reason, running `pyo3_asyncio` conversions through `asyncio.run` is not currently supported.
177
+
>
178
+
> This restriction may be lifted in a future release.
179
+
180
+
## MSRV
181
+
Currently the MSRV for this library is 1.46.0, _but_ if you don't need to use the `async-std-runtime`
182
+
feature, you can use rust 1.45.0.
183
+
> `async-std` depends on `socket2` which fails to compile under 1.45.0.
0 commit comments