跳转到主要内容

CI Messages schemas的Python封装

项目描述

python-ci_messages

这是一个围绕CI Messages规范的轻量级封装,该规范提供了该项目中定义的schema的fedora-messaging消息schema表示。该项目定义了一个具有单个入口点'ci_messages.CIMessageV1'的单个schema类。当请求特定消息的body schema时,该类会从磁盘读取相应主题的schema文件,并返回它。

安装和使用

您可以访问Pagure上的python-ci_messages项目页面,并使用以下命令克隆:git clone https://pagure.io/fedora-qa/python-ci_messages.git。通过PyPI发布tar包。

依赖项列在install.requires文件中。要全局安装模块,请运行python setup.py install

除了Python模块依赖项外,模块还需要访问CI Messages schemas作为JSON文件。默认情况下,它将尝试从目录/usr/share/ci/messages中读取它们。您可以通过创建一个内容如下所示的文件/etc/python-ci_messages.conf~/.config/python-ci_messages.conf来更改此位置

[main]
schemapath = /path/to/schema/location

您可以通过运行make convert从CI Messages git checkout生成JSON文件,这将将它们放置在名为tmp的子目录中。

只要模块已安装,它就会被任何声明其标题遵循此schema的fedora-messaging消费者自动使用。有关fedora-messaging的更多信息,请参阅其文档

本模块需要 Python 3.6 或更高版本(因为它使用了 f-strings)。

错误、拉取请求等。

您可以在 Pagure 上提交问题和拉取请求。拉取请求必须签署(使用 -s git 参数)。通过签署您的拉取请求,您同意 开发者起源证书

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

许可

python-ci_messages 在 GPL 版本 3 或任何后续版本下可用。一份副本包含在 COPYING 中。

项目详情


下载文件

下载适用于您的平台的文件。如果您不确定选择哪个,请了解更多关于 安装包 的信息。

源分布

ci_messages-0.2.1.tar.gz (22.4 kB 查看哈希值)

上传时间

构建分布

ci_messages-0.2.1-py3-none-any.whl (18.0 kB 查看哈希值)

上传时间 Python 3

由以下支持