跳转到主要内容

未提供项目描述

项目描述

Candore

简介

Candore 是命令行界面数据完整性工具。该工具旨在验证对产品所做的更改是否对产品中的数据有影响。

更改 可能包括:

  • 产品升级到新版本
  • 对产品应用了一些补丁
  • 开发者在本地/上游等处进行了代码更改
  • 或任何我们可以想到的更改

Candore支持的验证包括:

  • 数据丢失 - Candore关注的重大影响
  • 数据更改 - 数据实体的更改
  • 实体之间的关系 - 验证实体之间是否有链接损坏

安装

$ mkdir ~/candore && cd ~/candore
$ pip install candore

配置

candore 使用 DynaConf 配置Python模块来访问 settings.yaml 中的数据,它还允许通过环境变量而不是在 settings.yaml 中直接放置来声明唯一的秘密。

例如:可以通过导出环境变量来通过环境变量设置密码字段

# export CANDORE_CANDORE_PASSWORD = myPa$$worb"

使用PyPi包的配置

settings.yaml.template 复制/下载到本地 ~/candore 目录作为 settings.yaml,更新它以包含详细信息和其他配置详细信息,以成功运行。

使用示例

  • candore help
# candore --help

Usage: candore [OPTIONS] COMMAND [ARGS]...

  A data integrity validation CLI tool for products post change

Options:
  --version                   Installed version of candore
  -s, --settings-file TEXT    Settings file path
  -c, --components-file TEXT  Components file path
  --help                      Show this message and exit.

Commands:
  apis     List API lister endpoints from Product
  compare  Compare pre and post upgrade data
  extract  Extract and save data using API lister endpoints
  reader   JSON Reader for reading the specific path data from entities...

Candore工作有三个阶段

  1. 在更改之前使用API从Web服务器读取数据
# candore extract -o pre_entities.json --mode pre

这将在更改之前从Web服务器读取所有数据并保存到当前目录中的json文件中。

  1. 在更改之后使用API从Web服务器读取数据
# candore extract -o post_entities.json --mode post

这将在更改之后从Web服务器读取所有数据并保存到当前目录中的json文件中。

  1. 使用json数据文件来比较数据完整性
# candore compare -t csv -o results.csv --pre pre_entities.json --post post_entities.json

本功能比较两个JSON数据集,并以CSV格式生成数据完整性的报告文件。

报告可以以JSON格式生成

# candore compare -t json -o results.json --pre pre_entities.json --post post_entities.json

项目详情


下载文件

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

源代码分发

candore-1.4.0.tar.gz (28.4 kB 查看哈希)

上传时间 源代码

构建分发

candore-1.4.0-py2.py3-none-any.whl (35.2 kB 查看哈希)

上传时间 Python 2 Python 3

由以下支持