Metadata-Version: 2.4 Name: RSFile Version: 3.2 Summary: Advanced I/O file streams with fine-grained locking and creation options Author-email: Pascal Chambon License: MIT Project-URL: Repository, https://github.com/pakal/rsfile Project-URL: Documentation, https://rsfile.readthedocs.io/ Classifier: Development Status :: 5 - Production/Stable Classifier: Intended Audience :: Developers Classifier: Intended Audience :: Information Technology Classifier: Intended Audience :: System Administrators Classifier: Programming Language :: Python :: 3.7 Classifier: Programming Language :: Python :: 3.8 Classifier: Programming Language :: Python :: 3.9 Classifier: Programming Language :: Python :: 3.10 Classifier: Programming Language :: Python :: 3.11 Classifier: Programming Language :: Python :: 3.12 Classifier: Programming Language :: Python :: 3.13 Classifier: Topic :: System :: Filesystems Classifier: Topic :: Software Development :: Libraries :: Python Modules Classifier: Operating System :: Microsoft :: Windows Classifier: Operating System :: Unix Classifier: Operating System :: MacOS :: MacOS X Requires-Python: >=3.7 Description-Content-Type: text/x-rst License-File: License.txt Dynamic: license-file RSFILE ================ .. image:: https://ci.appveyor.com/api/projects/status/x002hlal3qwiavsa/branch/master :target: https://ci.appveyor.com/project/pakal/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. .. END OF PART KINDA SHARED WITH SPHINX DOC INDEX .. 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 ------------ .. code-block:: python from rsfile import rsopen with rsopen("myfile.txt", "w") as f: f.write("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.") See CONTRIBUTING.rst for development advice (testing, benchmarking...)