Create timestamp records for recursive operations on directory trees.
Project description
Treestamps
A library to set and retrieve timestamps to speed up operations run recursively on directory trees.
Documentation is pretty poor. Read the code for now.
Usage
Used in picopt and nudebomb. You can see how it's used in those projects.
from treestamps import Copsestamps, CopsestampsConfig
config = GrovestampsConfig(
"MyProgramName",
paths=["/foo", "/bar"],
program_config={ "option_a": True, "option_b": False}
)
cs = Grovestamps(config)
timestamp = cs["/foo"].get()
cs["/foo"].set()
cs["/foo"].dump()
cs.dump()
Breaking Changes from 0.3.x
Renamed
Treestamps.dirpath() -> Treestamps.get_dir() Treestamps.dir -> Treestamps.root_dir
Made Private
Treestamps.prune_dict() -> Treestamps._prune_dict() Treestamps.consume_all_child_timestamps() -> Treestamps._consume_all_child_timestamps()
Added
Treestamps.add_consumed_path(), for legacy treestamps importers to remove old files. Copsestamps() is the ubquitous dir of rootpaths to Treestamps.
Changed
Grovestamps() and Treestamps() both require a GrovestampsConfig or TreestampsConfig respectively as their sole param.
Treestamps now record the ignored and symlinks config options in the file and if they
change the file is not loaded.
This is optional with the check_config
configuration option.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file treestamps-0.4.4.tar.gz
.
File metadata
- Download URL: treestamps-0.4.4.tar.gz
- Upload date:
- Size: 22.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.7 Linux/5.15.0-1050-aws
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | be1d2f00598ce1b2545d9a85de2c869bea21b5ee29ab71a6daa294bca6c3d994 |
|
MD5 | 1f9382e4a7802a77d8ec16d4ba75ca6d |
|
BLAKE2b-256 | 71dce95136563108a2723941e14ad4280c0d285a15b48b06b976aaf857361f58 |
File details
Details for the file treestamps-0.4.4-py3-none-any.whl
.
File metadata
- Download URL: treestamps-0.4.4-py3-none-any.whl
- Upload date:
- Size: 22.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.7 Linux/5.15.0-1050-aws
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ea74fc41a8f0db3c6ee9152f186530a10f1abf2874a7301731694fac8e6a4a2 |
|
MD5 | 4aecd33f290c059918d7886ca00beaee |
|
BLAKE2b-256 | e1c47f73f7355abd87db75f302b378e0b9cd87a0f65ca6e07a5f3ca1f841cb4f |