该模块可用于验证BagitProfiles。

bagit_profile的Python项目详细描述


https://img.shields.io/pypi/v/bagit_profile.svghttps://circleci.com/gh/bagit-profiles/bagit-profiles-validator.svg?style=svg

说明

用于验证bagit配置文件的简单python模块。见BagIt Profiles Specification 更多信息。

本模块用于 bagit-python但不扩展它。

安装

bagit_profile.py是一个可以放入的单个文件python模块 您可以根据需要安装项目,也可以使用以下命令进行全局安装:

  1. git clone https://github.com/bagit-profiles/bagit-profiles-validator.git
  2. cd bagit-profiles-validator
  3. sudo python setup.py install

或:

pip install bagit_profile

用法

importbagitimportbagit_profile

实例化现有的包 bagitpython bag = bagit.Bag('mydir')

实例化配置文件,提供其uri。 python my_profile = bagit_profile.Profile('http://example.com/bagitprofile.json')

验证“序列化”和“接受序列化”必须这样做 之前。调用validate(bag)“mydir”是指向包的路径。

ifmy_profile.validate_serialization('mydir'):print"Serialization validates"else:print"Serialization does not validate"

验证配置文件的其余部分。

ifmy_profile.validate(bag):print"Validates"else:print"Does not validate"

或者从命令行:

bagit_profile.py 'http://uri.for.profile/profile.json' path/to/bag

测试套件

python setup.py test

开发

  1. Fork the repository
  2. 做些很棒的事
  3. Submit a pull request 解释代码的作用

许可证

CC0

cc0

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
serversocket Java服务器socket中断如何   java通过随机类和排序为数组生成数据   @Column length大于255个字符的java实体   java在使用NIO2 API时消除检查异常   java使用用户凭据通过Microsoft Graph API上的控制台应用程序发送电子邮件   java将2个ArrayList一个接一个地显示到jTextArea中,根据输入的数据多次显示   java无法使用导入的库。安卓工作室。谷歌云端点jar   spring boot Neo4j Apoc在java中获取结果摘要时的情况   转义特殊字符javajson   无法在java中使用OpenCV读取图像,涉及unicode路径   swing Document Listener java“无法实例化DocumentListener类型”   java Piglatin,难以理解如何移动“.”一串   java映射请求基于一个可观察对象中的每个元素,使用改进?   java在可扩展字符串中搜索时,如何忽略字符的大小写?   在包中分组类的java约定   python为Java应用程序创建Ubuntu指示小程序   java Camunda:如何通过processInstanceId获取所有已完成的任务