fstrans - Python module for filesystem transactions
Description
This module allows to manipulate some directory tree in safe way, making sure that in case of error tree would left intact, and no other process such as webserver would access partially modified tree (although you can use external programs from your script to work with tree)
It also serializes write tree access - if one program starts transaction with some directory, other one, if started, would wait for some time for it to complete.
Module is Unix-only. It heavily relies on hard links to quickly make copies of big trees.
As working tree is populated with symlinks from final tree, user should make sure that file is different in local copy before modifying it.
For this module provides following methods:
- open - works just like builtin function open, but makes sure that original file would not be clobbered before commit.
- putfile - safely replaces file in tree with other file
- clonefile, clonetree - make exact copy of original file with link count = 1.
Installation
You can install released version with pip3 install fstrans.
If you prefer cutting age software, recommended way is
python3 setup.py sdist
pip3 install ./dist/fstrans-1.0.tar.gz
Of course, you can install system-wide build your OS packages and so on. But if you are planning to do so, you probably don't need special instructions.
Testing
There is unittest-based test suite in the test directory.
Run
python3 setup.py test
to run test suite.
Metadata
Release files for fstrans 1.0.1
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 |
|---|---|---|---|---|
| fstrans-1.0.1.tar.gz | 19.4 kB | Without provenance | Details for fstrans-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fstrans-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for fstrans-1.0.1-py3-none-any.whl |
Total release size: 39.0 kB
Release files / fstrans-1.0.1.tar.gz
| Download URL | fstrans-1.0.1.tar.gz |
|---|---|
| Size | 19.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8fc664dd583db403cb0150aa7f928b481e1e26214d373caca68fc3dcdfa7f170
|
|
BLAKE2b-256 checksum How to use checksums |
a981186945eb92a341fd772ab1b644d5b2a77ab50431f3411d22b3f6302d6fbe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3
|
Release files / fstrans-1.0.1-py3-none-any.whl
| Download URL | fstrans-1.0.1-py3-none-any.whl |
|---|---|
| Size | 19.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7e3ccfdcdbdbad624267e0236fb6c331929abf484fde1ad19f2f9fe290e2b3fb
|
|
BLAKE2b-256 checksum How to use checksums |
39ef7b936a2cd88877d614131acc99ec9cf6a191abb014fc31182bfa7fd1b675
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3
|
Security for fstrans 1.0.1
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.