File Database
Fast index and query of local files using pandas and pyarrow.
Features
- Recursively index files in specified directories
- Regex-based exclusion of file and folder patterns
- Optional BLAKE2b hashing for deduplication
- Feather-format output for fast query
- Simple CLI powered by
click
Usage
# Index files
file-db index --config config.yaml
# Query files
file-db query --expr "size > 1e7 and suffix == '.csv'"
Query Language
Query Examples
recent files, top 10, drop dir column but add create column, files with names matching regex "q?md$", which means suffix qmd or md.
verbose recent top 10 select !dir,create ! q?md$
Min config file
included/excluded files must not be empty.
project: Samsung 64GB compact flash
hostname: KOLMOGOROV
database: G:/sams64gb.fdb-feather
included_dirs:
- G:/
excluded_dirs: []
excluded_files: []
excluded_files:
hash_files: true
hash_workers: 6
last_indexed: 0
timezone: Europe/London
tablefmt: mixed_grid
To Do
- Util to create a blank config file (maybe with prompts)
- Incremental updates check for deletes and if the file is logged (changed spec), use set and set diff and
df = df[~df["col"].isin(seen)] - Create job and python path
- query > file work
- add duplicates and hardlinks key works
- parse queries in order independent manner
- GT should have a repr_text version!
- directory sizes?!
- recent directories (recent changes to dirs)
Regex look aheads/look backs
Metadata
Release files for file-database 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| file_database-0.2.0.tar.gz | 18.6 kB | Without provenance | Details for file_database-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| file_database-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for file_database-0.2.0-py3-none-any.whl |
Total release size: 40.1 kB
Release files / file_database-0.2.0.tar.gz
| Download URL | file_database-0.2.0.tar.gz |
|---|---|
| Size | 18.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b1ebdbe7f90274e055cf44b732fc5fef79e4f82c852e2d4db6aa3befc52a4c6a
|
|
BLAKE2b-256 checksum How to use checksums |
31f4f593ca587eddc78deecbb7a25a36d41a7b49caf77b9d4be783f312d6cf6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.13
|
Release files / file_database-0.2.0-py3-none-any.whl
| Download URL | file_database-0.2.0-py3-none-any.whl |
|---|---|
| Size | 21.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e2199b67319da61e534bf675b650e7bcb98672b4d7d88c59acf2ccc32e1abbf5
|
|
BLAKE2b-256 checksum How to use checksums |
2bf7fa2b1c4f3b0f4df1c54e8752292b30a46d954e0b7f575d1ee8f4d7ba3516
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.13
|
Security for file-database 0.2.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.