Skip to main content

Attributes of files and directories stored in YAML sidecar files

Project description

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

# create some test data
echo "test" > foo.txt
echo "test: true" > foo.txt.yml

# create database
pathtraits batch .

# query traits
pathtraits get foo.txt

Configuration

Database path

The databse 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

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

pathtraits-0.5.1.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pathtraits-0.5.1-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file pathtraits-0.5.1.tar.gz.

File metadata

  • Download URL: pathtraits-0.5.1.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pathtraits-0.5.1.tar.gz
Algorithm Hash digest
SHA256 bca980787acb7a7d4626994ac57f8349ab6cdb7adac9da3cc8afab74e8fa24ab
MD5 01f36cfeba7f0ffdf181d482b45cc92e
BLAKE2b-256 62a364e66402e015e05043bd0b3d3be416f85e0374a2ffcd8ffc761ba71939ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for pathtraits-0.5.1.tar.gz:

Publisher: python-publish.yml on danlooo/pathtraits

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pathtraits-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: pathtraits-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pathtraits-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 de38723ed3c5462b60dc40a8d0c87a06e694800d3d4717befa9ce464b34121cf
MD5 7b120b69a443fa288167c216b1346292
BLAKE2b-256 a19b3819f477fef93ec4d0bdf950a1d46b82232a80fceb14c4ccf62be8cd7fdc

See more details on using hashes here.

Provenance

The following attestation bundles were made for pathtraits-0.5.1-py3-none-any.whl:

Publisher: python-publish.yml on danlooo/pathtraits

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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