pyfileindex - Pythonic 文件系统索引
项目描述
pyfileindex
PyFileIndex - 遵循Python风格的文件系统索引
pyfileindex帮助跟踪特定目录中的文件,监控新增文件、修改文件和删除文件。该模块与Python 3.7或更高版本兼容,但仅限于类Unix系统 - Windows不受支持。
安装
pyfileindex可以通过pip安装,使用以下命令:
pip install pyfileindex
或者通过conda从conda-forge频道安装
conda install -c conda-forge pyfileindex
使用方法
导入pyfileindex
from pyfileindex import PyFileIndex
pfi = PyFileIndex(path='.')
或者您可以过滤特定的文件扩展名
def filter_function(file_name):
return '.txt' in file_name
pfi = PyFileIndex(path='.', filter_function=filter_function)
列出文件系统索引中的文件
pfi.dataframe
更新文件系统索引
pfi.update()
并使用以下命令打开子目录:
pfi.open(path='subdirectory')
有关更多详细信息,请参阅示例笔记本:https://github.com/pyiron/pyfileindex/blob/main/notebooks/demo.ipynb
许可证
pyfileindex在BSD许可下发布 https://github.com/pyiron/pyfileindex/blob/main/LICENSE 。它是pyiron项目的衍生产品 https://github.com/pyiron/pyiron ,因此如果您在您的出版物中使用pyfileindex,请引用
@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},
}
项目详情
下载文件
下载适用于您的平台的文件。如果您不确定选择哪个,请了解更多关于安装软件包的信息。
源分布
pyfileindex-0.0.29.tar.gz (8.3 kB 查看哈希值)
构建分布
pyfileindex-0.0.29-py3-none-any.whl (13.9 kB 查看哈希值)
关闭
pyfileindex-0.0.29.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | dde8f8d6b8e9670b4d463644285fa99e09e988bc6e2267db46e63ec3a1aeb36f |
|
MD5 | 5f3e61d48b9f85eca6223285b50a7edf |
|
BLAKE2b-256 | 3b96c2a85034bbd956e898f204043a5e39d38ba5085a17c1f897413705fef32c |