#pyo3 #python

pyo3-filelike

Rust access to Python file-like objects

2 unstable releases

0.2.0 Nov 26, 2023
0.1.0 Nov 26, 2023

#691 in Development tools

Download history 475/week @ 2023-11-25 519/week @ 2023-12-02 209/week @ 2023-12-09 419/week @ 2023-12-16 735/week @ 2023-12-23 262/week @ 2023-12-30 184/week @ 2024-01-06 183/week @ 2024-01-13 371/week @ 2024-01-20 477/week @ 2024-01-27 264/week @ 2024-02-03 466/week @ 2024-02-10

1,615 downloads per month
Used in 6 crates (via breezyshim)

Apache-2.0

7KB
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

~1.9–8MB
~43K SLoC