RSFILE
RSFile provides pure-python drop-in replacements for the classes of the io module, and for the open() builtin.
Its goal is to provide a cross-platform, reliable, and comprehensive synchronous file I/O API, with advanced features like fine-grained opening modes, shared/exclusive file record locking, thread-safety, disk cache synchronization, file descriptor inheritability, and handy stat getters (size, inode, times…).
Locking is performed using actual file record locking capabilities of the OS, not by using separate files/directories as locking markers, or other fragile gimmicks.
Possible use cases for this library: concurrently writing to logs without ending up with garbled data, manipulating sensitive data like disk-based databases, synchronizing heterogeneous producer/consumer processes when multiprocessing semaphores aren’t an option, etc.
Tested on CPython3, on windows and unix-like systems. Should work with IronPython/Jython/PyPy too, since it uses stdlib utilities and ctypes bridges.
Read the documentation here: https://rsfile.readthedocs.io/en/latest/
INSTALL
$ pip install rsfile
QUICKSTART
from pathlib import Path
from rsfile import rsopen
path = Path("myfile.txt")
with rsopen(path, "w") as f:
f.write("This string will be veeeeeryyyyy safely written to file.")
with rsopen(path, "WANISB", locking=False, thread_safe=False) as f:
f.write(b"See the docs for info on these cool new modes and parameters.")
See CONTRIBUTING.rst for development advice (testing, benchmarking…)
Metadata
Release files for RSFile 3.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rsfile-3.4.tar.gz | 473.0 kB | Without provenance | Details for rsfile-3.4.tar.gz |
Release files / rsfile-3.4.tar.gz
| Download URL | rsfile-3.4.tar.gz |
|---|---|
| Size | 473.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a19a4c7919dbf56d6be3356c6c41abbf69c9fde7192992dd23eebdf91e0f043e
|
|
BLAKE2b-256 checksum How to use checksums |
c777082c410a4839799878061c6d7ef96fec0f03d913064e0c44776240af9f93
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Security for RSFile 3.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.