Skip to main content

pathtraits: Annotate files and directories

Create a YAML file "meta.yml" inside a directory to annotate all files in that directory with any attributes. The data will be collected in a SQLite database to query and visualize.

Get Started

Pathtraits are attributes of files and directories stores in YAML side car files. Pathtraits of parent directories are inherited for a given path and can be overwritten by those of child directories. Pathtraits can be either of type string, int, or real.

# install
python -m pip install pathtraits

# optionally add dust to calculate size and number of files per meta.yml
# https://github.com/bootandy/dust

# create some test data
pathtraits create .

# create database
pathtraits batch .

# query traits
pathtraits get foo.txt

Configuration

Database path

The database is being created in your home directory by default at "~/.pathtraits.db". One can change this by setting the environmental variable PATHTRAITS_DB_PATH to any other path with write permssions if needed.

Developing

  • use Pylint
  • normalize data base to 3NF to store each new trait in a new table, allowing sparse traits

Metadata

Release files for pathtraits 0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pathtraits 0.6
File Size Uploaded
pathtraits-0.6.tar.gz 8.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pathtraits 0.6
File Interpreter ABI Platform
pathtraits-0.6-py3-none-any.whl Python 3 none any Details

Total release size: 20.1 kB

Release files / pathtraits-0.6.tar.gz

Download URL pathtraits-0.6.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ad04d25f56c2461b57eb036c5807af70bfca5de1f40aef2e2fe398d1c885c5e9
BLAKE2b-256 checksum
How to use checksums
5d75b0f41635159be56a787f12e6aa640a4d9c6fab51d82fd544cd27d22b0e73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 4, 2026.

Transparency log

Release files / pathtraits-0.6-py3-none-any.whl

Download URL pathtraits-0.6-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
94fee52a47d0b41c8d2a34b615c79c383bcda0031f21260a46b64b4613541637
BLAKE2b-256 checksum
How to use checksums
785b9963e8400fceb2d49f5898472da9980155d37c85c93033966244bdedbb82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 4, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.6 This release

2 release files

0.5.1

2 release files

0.5

2 release files

0.4

2 release files

0.3

2 release files

0.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page