Metadata-Version: 2.4
Name: pathtraits
Version: 0.5
Summary: Attributes of files and directories stored in YAML sidecar files
License: MIT
Author: Daniel Loos
Requires-Python: >=3.12,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: PyYAML (>=6.0,<7.0)
Requires-Dist: click (>=8.1,<9.0)
Requires-Dist: inotify (>=0.2,<0.3)
Description-Content-Type: text/markdown

# 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.


```sh
# 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

