Skip to main content

Syncurity 常用实用程序类和函数

项目描述

https://badge.fury.io/py/syncurity-utils.svg https://circleci.com/gh/Syncurity/syncurity-utils/tree/master.svg?style=svg&circle-token=8a8847e25e6eed888591abb3fbc40ba165d2417e https://api.codacy.com/project/badge/Grade/878a6906207f44d99f0b746b4e30c55f https://api.codacy.com/project/badge/Coverage/878a6906207f44d99f0b746b4e30c55f

syncurity -utils包与我们的其他 python 包一起使用 IR-Flow 平台实现自动化和编排工作。

用法

在 PyPI 上可用

$ pip install syncurity-utils

在您的 Stackstorm 包中使用如下:

from syncurity_utils import typecheck, find_domain
from syncurity_utils.exceptions import TypecheckException

您可以通过执行以下操作来使用集成:

from syncurity_utils.db.db import StackstormDB
from syncurity_utils.db.alert import Alert
import time

db = StackstormDB("[user]", "[pass]", "[Database Name]", "[host]", [port])

此时,您可以访问用于创建和查询警报的辅助方法。

例子:

db.add_alert(Alert({message: test message}, time.time(),Sensor_ref_name, [IRFlow Alert Id], [Integration Id], [Tenant Id], [Alert Type Id], [ttl_seconds], [inserted_timestamp], [parent_alert_id]))
db.delete_alert(1)

项目详情


下载文件

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

源分布

syncurity_utils-0.4.1.tar.gz (17.7 kB 查看哈希

已上传 source

内置分布

syncurity_utils-0.4.1-py2.py3-none-any.whl (16.2 kB 查看哈希

已上传 py2 py3