跳转到主要内容

pyfileindex - Pythonic 文件系统索引

项目描述

pyfileindex

PyFileIndex - 遵循Python风格的文件系统索引

Python package Coverage Status Binder

pyfileindex帮助跟踪特定目录中的文件,监控新增文件、修改文件和删除文件。该模块与Python 3.7或更高版本兼容,但仅限于类Unix系统 - Windows不受支持。

Preview

安装

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 查看哈希值)

上传时间 Python 3

由以下组织支持