Skip to main content

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={ "optionA": True, "optionB": 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

treestamps-0.4.2.tar.gz (21.6 kB view details)

Uploaded Source

Built Distribution

treestamps-0.4.2-py3-none-any.whl (22.6 kB view details)

Uploaded Python 3

File details

Details for the file treestamps-0.4.2.tar.gz.

File metadata

  • Download URL: treestamps-0.4.2.tar.gz
  • Upload date:
  • Size: 21.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.11.3 Linux/5.15.0-1030-aws

File hashes

Hashes for treestamps-0.4.2.tar.gz
Algorithm Hash digest
SHA256 806e5b9daeef6c6cfa5cb0c878d8739f07c03cb4b47fa27896613373218d9be8
MD5 bce573714f648ce7fcbbe9d710a8810f
BLAKE2b-256 7059a94703bac82cedcf0d4cf3041a6256242e54ca5bba476a79572e29b5436a

See more details on using hashes here.

File details

Details for the file treestamps-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: treestamps-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 22.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.11.3 Linux/5.15.0-1030-aws

File hashes

Hashes for treestamps-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d195373ea56e4d92d4a127b154ea27d41b0e6246be02d7e8fedc96cc822d3955
MD5 2db628382c6902a632dd368375602b82
BLAKE2b-256 eea4c2e20723844fbac238e50a2ae77db143bee72547627dbafe9e4a16762fda

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page