文件元数据标记和组织。
coda的Python项目详细描述
CODA是一个文件系统管理器,专为经常处理 有大量的异构数据。在这个数据主宰一切的时代,能够 高效地搜索和标记这些数据对于保持生产力至关重要。尾波 允许您使用任意元数据标记文件,以便在 随着时间的推移管理/分析大型数据集。
作为一个简单的例子,coda可能有助于组织任意数据集, 请参见以下示例(请参见documentation 有关更深入的文档:
>>>importcoda>>>>>># generate a collection of files from a directory>>>cl=coda.Collection('/path/to/test/data')>>>>>># show all of the files in the structure>>>printcl/path/to/test/data/type1.txt/path/to/test/data/type1.csv/path/to/test/data/type2.txt/path/to/test/data/type2.csv>>>>>># set properties about the collection>>>cl.group='test'>>>cl.cohort='My Cohort'>>>>>># add the files in the collection to the database>>># for tracking and retrieval later>>>coda.add(cl)>>>>>># do the same with a training dataset>>>cl=coda.Collection('/path/to/train/data',metadata={'group':'train'})>>>coda.add(cl)>>>>>># wait ... add one more file in a different location to>>># the training set>>>fi=coda.File('/my/special/training/file.csv')>>>fi.group='train'>>>coda.add(fi)>>>>>># ... later in time ...>>>>>># query all of our training files>>>cl=coda.find({'group':'train'})>>>printcl/path/to/train/data/type1.txt/path/to/train/data/type1.csv/path/to/train/data/type2.txt/path/to/train/data/type2.csv/my/special/training/file.csv>>>>>># filter those by csv files>>>printcl.filter(lambdax:'.csv'inx.name)/path/to/train/data/type1.csv/path/to/train/data/type2.csv/my/special/training/file.csv>>>>>># tag the special file with new metadata>>>cl.files[-1].special=True>>>coda.add(cl.files[-1])>>>>>># query it back (for the example)>>>fi=coda.find_one({'special':True})>>>printfi.metadata{'group':'train','special':True}
文档
有关安装和使用说明,请参阅documentation。
问题/反馈
在GitHub issue tracker中提交问题。