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, cache synchronization, file descriptor inheritability, and handy stat getters (size, inode, times…).
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…
This version 2 of the lib drops support for Python2.6, and puts RSFile in compliance with the numerous evolutions that happened to the I/O modules of the stdlib, over the past years.
Tested on python2.7 and python3.3+, on windows and unix-like systems. Should work with IronPython/Jython/PyPy too, since it uses stdlib utilities and ctypes bridges.
Learn more about RSFile: http://rsfile.readthedocs.io/
INSTALL
Using pip is recommended, although installing from a checkout of the repository (via setup.py) also works:
$ pip install rsfile
QUICKSTART
from rsfile import rsopen
with rsopen("myfile.txt", "w") as f:
f.write(u"This string will be veeeeeryyyyy safely written to file.")
with rsopen("myfile.txt", "WANISB", locking=False, thread_safe=False) as f:
f.write(b"See the docs for info on these cool new modes and parameters.")
Metadata
Release files for RSFile 2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distributions (sdists)
| File | Size | Uploaded | |
|---|---|---|---|
| RSFile-2.1.zip | 148.3 kB | Details | |
| RSFile-2.1.tar.gz | 128.7 kB | Details |
Release files / RSFile-2.1.zip
| Download URL | RSFile-2.1.zip |
|---|---|
| Size | 148.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e79d9e778ee32ddc4d5500364dde1a29f9ba3d0d5d19ebec8240adad8c6288be
|
|
BLAKE2b-256 checksum How to use checksums |
bcebb8320aa43dfd6888e92e0bb3ac6202d9149af0c2e22bf94e469920d96e87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / RSFile-2.1.tar.gz
| Download URL | RSFile-2.1.tar.gz |
|---|---|
| Size | 128.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7678cae7b1a3251678f85951582385222bf8a494fb82fdf07b923366bca7a68e
|
|
BLAKE2b-256 checksum How to use checksums |
712c80e3abdc54dec4b3bb133cd307d9b765c1eed7c88bd16b62e1e35effcd0d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |