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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pathtraits-0.4.tar.gz.
File metadata
- Download URL: pathtraits-0.4.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7436cac5a9ca076eca52bff5a408adea8ee7d56d381eef8274a0e3726ff1e5d0
|
|
| MD5 |
f3bdb16ae6926527d145447197633a6f
|
|
| BLAKE2b-256 |
e131806afaf3f1e12c6dd9e672271338603aef5ac1e885f199f9cc2bbcd1f14f
|
Provenance
The following attestation bundles were made for pathtraits-0.4.tar.gz:
Publisher:
python-publish.yml on danlooo/pathtraits
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pathtraits-0.4.tar.gz -
Subject digest:
7436cac5a9ca076eca52bff5a408adea8ee7d56d381eef8274a0e3726ff1e5d0 - Sigstore transparency entry: 798566735
- Sigstore integration time:
-
Permalink:
danlooo/pathtraits@0f7b3ff5a3db1d89a9ded240bd2e0cea2e963063 -
Branch / Tag:
refs/tags/v0.4 - Owner: https://github.com/danlooo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@0f7b3ff5a3db1d89a9ded240bd2e0cea2e963063 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pathtraits-0.4-py3-none-any.whl.
File metadata
- Download URL: pathtraits-0.4-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
859867c134650714196110f7b24fec9433d70375113b7470157e7a06342ab193
|
|
| MD5 |
27e9c0407e5ee7057280cf5c01eab46b
|
|
| BLAKE2b-256 |
ce8caeadfb5b828770341ee33d3bbadeaefd403f1e3304c903edfb6f3cd75e55
|
Provenance
The following attestation bundles were made for pathtraits-0.4-py3-none-any.whl:
Publisher:
python-publish.yml on danlooo/pathtraits
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pathtraits-0.4-py3-none-any.whl -
Subject digest:
859867c134650714196110f7b24fec9433d70375113b7470157e7a06342ab193 - Sigstore transparency entry: 798566739
- Sigstore integration time:
-
Permalink:
danlooo/pathtraits@0f7b3ff5a3db1d89a9ded240bd2e0cea2e963063 -
Branch / Tag:
refs/tags/v0.4 - Owner: https://github.com/danlooo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@0f7b3ff5a3db1d89a9ded240bd2e0cea2e963063 -
Trigger Event:
release
-
Statement type: