#pyo3 #read-write #traits

pyo3-filelike

Rust access to Python file-like objects

3 releases (breaking)

0.3.0 Jun 25, 2024
0.2.0 Nov 26, 2023
0.1.0 Nov 26, 2023

#840 in Development tools

Download history 1157/week @ 2024-07-03 1120/week @ 2024-07-10 832/week @ 2024-07-17 2050/week @ 2024-07-24 2383/week @ 2024-07-31 3195/week @ 2024-08-07 1534/week @ 2024-08-14 3334/week @ 2024-08-21 2231/week @ 2024-08-28 2097/week @ 2024-09-04 1497/week @ 2024-09-11 1731/week @ 2024-09-18 1823/week @ 2024-09-25 856/week @ 2024-10-02 656/week @ 2024-10-09 1058/week @ 2024-10-16

4,988 downloads per month
Used in 8 crates (via breezyshim)

Apache-2.0

8KB
163 lines

Rust compatible wrappers for file-like objects in Python

This crate provides implementations of the Write, Seek, Read and AsRawFd rust traits on top of file-likb objects in PyO3.

Example


let f = py3o_filelike::PyBinaryFile::from(o);

let mut buf = [0u8; 4];
f.read_exact(&mut buf)?;

Dependencies

~2.5MB
~48K SLoC