A growing collection of Python shims around Rust crates; fast, async-first, and ergonomic.
DOCS: ryo3.dev (WIP)
API: ryo3.dev/api
This is a work in progress ~ feedback and PRs are welcome.
- Async-first client and blocking/sync client: Built on
reqwest, with afetch-like API. Supports streaming, zero-copy IO via the buffer protocol, timeouts, redirect-following, and native JSON (de)serialization viaserde/jiter. jiffbased datetime library: comprehensive datetime library based onjiff(pydantic-compatible).- Async file I/O: Built on
tokio, with anAsyncFileAPI similar toaiofilesandanyio's async-file api. Supports buffered reads/writes, truncation, streaming reads, andanyiocompatibility. - (de)compression: (de)compression tools for
zstd,brotli,gzip, andbzip2. - Miscellaneous bindings: Includes crates like
globset,walkdir,sqlformat,unindent,twox-hash, and more. - Designed for ergonomics: Async where it matters. Simple where possible. Python-native behavior with minimal friction.
- Type Annotated: All public APIs are (painstakingly) type annotated.
- Performant: Speed without the words "blazingly fast." 1
- Pydantic Integration: ry data types (mostly) work good w/ pydantic.
- Not slop: written by a human 2
- No emojis
pip install ry
uv add ry
# check install
python -m ryCheck out the examples directory for some quickstart examples.
ry-- the python packageryo3-*-- the rust crates that are used byryand possibly your ownpyo3-based python package
- jessekrubin jessekrubin@gmail.com
- possibly you!?
(aka: questions that I have been asking myself)
- Q: Why?
- A: I (jesse) needed several hashing functions for python and then kept adding things as I needed them
- Q: Does this have anything to do with the (excellent) package manager
rye?- A: short answer: no. long answer: no, it does not.
- Q: Why is the repo split into
ryandryo3?- A:
ryis the python package,ryo3is a rust crate setup to let you "register" functions you may want if you were writing your own pyo3-python bindings library; maybe someday theryo3::libsmodule will be split up into separate packages
- A:
| crate | ryo3-crate |
|---|---|
std |
ryo3-std |
bytes |
ryo3-bytes |
bzip2 |
ryo3-bzip2 |
dirs |
ryo3-dirs |
fspath |
ryo3-fspath |
glob |
ryo3-glob |
heck |
ryo3-heck |
http |
ryo3-http |
jiter |
ryo3-jiter |
json |
ryo3-json |
pydantic |
ryo3-pydantic |
reqwest |
ryo3-reqwest |
serde |
ryo3-serde |
shlex |
ryo3-shlex |
size |
ryo3-size |
sqlformat |
ryo3-sqlformat |
tokio |
ryo3-tokio |
ulid |
ryo3-ulid |
unindent |
ryo3-unindent |
url |
ryo3-url |
uuid |
ryo3-uuid |
which |
ryo3-which |
| Compression | ~ |
brotli |
ryo3-brotli |
flate2 |
ryo3-flate2 |
zstd |
ryo3-zstd |
| Hashing | ~ |
fnv |
ryo3-fnv |
twox-hash |
ryo3-twox-hash |
| @BurntSushi | ~ |
globset |
ryo3-globset |
jiff |
ryo3-jiff |
memchr |
ryo3-memchr |
regex |
ryo3-regex |
same-file |
ryo3-same-file |
walkdir |
ryo3-walkdir |
justis used to run tasks- Do not use the phrase
blazing fastor any emojis in any PRs or issues or docs - type annotations are required
ruffused for formatting and linting
- utiles: web-map tile utils