pyfileindex
PyFileIndex - pythonic file system index
The pyfileindex helps to keep track of files in a specific directory, to monitor added files, modified files and deleted files. The module is compatible with Python 3.7 or later but restricted to Unix-like system - Windows is not supported.
Installation
The pyfileindex can either be installed via pip using:
pip install pyfileindex
Or via anaconda from the conda-forge channel
conda install -c conda-forge pyfileindex
Usage
Import pyfileindex:
from pyfileindex import PyFileIndex
pfi = PyFileIndex(path=".")
Or you can filter for a specifc file extension:
def filter_function(file_name):
return ".txt" in file_name
pfi = PyFileIndex(path=".", filter_function=filter_function)
List files in the file system index:
pfi.dataframe
Each row is a file or directory below the indexed path:
| Column | Type | Description |
|---|---|---|
basename |
str | File or directory name, e.g. output.txt |
path |
str | Absolute path |
dirname |
str | Absolute path of the parent directory |
is_directory |
bool | True for directories, False for files |
mtime |
float | Last modification time (POSIX timestamp, same as os.stat().st_mtime) |
nlink |
int | Hard link count (os.stat().st_nlink), used internally to detect changes |
| Update file system index: |
pfi.update()
And open a subdirectory using:
pfi.open(path="subdirectory")
For more details, take a look at the example notebook: https://github.com/pyiron/pyfileindex/blob/main/notebooks/getting_started.ipynb
License
The pyfileindex is released under the BSD license https://github.com/pyiron/pyfileindex/blob/main/LICENSE . It is a spin-off of the pyiron project https://github.com/pyiron/pyiron therefore if you use the pyfileindex for your publication, please cite:
@article{pyiron-paper,
title = {pyiron: An integrated development environment for computational materials science},
journal = {Computational Materials Science},
volume = {163},
pages = {24 - 36},
year = {2019},
issn = {0927-0256},
doi = {https://doi.org/10.1016/j.commatsci.2018.07.043},
url = {http://www.sciencedirect.com/science/article/pii/S0927025618304786},
author = {Jan Janssen and Sudarsan Surendralal and Yury Lysogorskiy and Mira Todorova and Tilmann Hickel and Ralf Drautz and Jörg Neugebauer},
keywords = {Modelling workflow, Integrated development environment, Complex simulation protocols},
}
Documentation
Metadata
Release files for pyfileindex 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyfileindex-0.2.3.tar.gz | 11.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyfileindex-0.2.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.5 kB
Release files / pyfileindex-0.2.3.tar.gz
| Download URL | pyfileindex-0.2.3.tar.gz |
|---|---|
| Size | 11.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
73559424955763e3c675526f0113e6e00a3e06772eda7cdcfc0a09b9271f887a
|
|
BLAKE2b-256 checksum How to use checksums |
a042f34fdc964184963e20029c95fd4b4f49ab6cb32c85ee3a02de4a65a7625b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 22, 2026.
Transparency logRelease files / pyfileindex-0.2.3-py3-none-any.whl
| Download URL | pyfileindex-0.2.3-py3-none-any.whl |
|---|---|
| Size | 11.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
68f9aa3fbd45dcf4b57cd5072cd75abdf56c4ac93b28c57d37427a70559443d9
|
|
BLAKE2b-256 checksum How to use checksums |
f9f16d505a8e41fe389d37719a16d58756c05f0006ca1e153ad974dcb5aff9d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 22, 2026.
Transparency log