tools Package
alert 模块
###可用于qywx报警/通知
from pyzr import Alert
alert= Alert(name='test', url='https://xxxxxx')
参数:
name 报警描述,必传
url 报警链接,必传
delay 是否降低报警频率,可选,默认值为 False
interval 报警频率间隔,可选,在delay为True时才能生效,默认值为 10 (单位:s)
包含四个方法:
alert.error('test...')
alert.warning('test...')
alert.info('test...')
alert.statistics('test...')
phone 模块
###可用于电话告警
from pyzr import Phone
phone= Phone(uid='xxxx', url='https://xxxxxx', token='xxxxx', model_code='xxxxx')
参数:
uid 创建人id,必传
url 电话告警链接,必传
token 电话告警token,必传
model_code 电话告警模版编号,必传
包含一个方法:
phone.alter_phone(mobiles, data)
参数:
mobiles 告警发给的人,发给多人使用 list 或 以英文逗号隔开的 str,例如: '18xxx' or '181xxx,182xxx'
data 电话告警内容,type: dict, 例如: {"system": "xx平台", "server": "xx系统", "error": "xxx", "level": "p0"}
Release files for pyzr 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyzr-0.0.4.tar.gz | 3.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyzr-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.7 kB
Release files / pyzr-0.0.4.tar.gz
| Download URL | pyzr-0.0.4.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4ad18371d6dd28c2d1dfbfdf44a620670c218f760a0d40cbeda21321dd1e9eb1
|
|
BLAKE2b-256 checksum How to use checksums |
ee0e7ad66131bbd7a2d2ce5e83c918f928f488f62fb057a7b202b824b1c211b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.8
|
Release files / pyzr-0.0.4-py3-none-any.whl
| Download URL | pyzr-0.0.4-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d26b7e079e9ae6dd418cd95c810329c661a6834255aa598c0fbd4e4cdd61bbae
|
|
BLAKE2b-256 checksum How to use checksums |
5f52a87fc13b0912ffd6ba942e9682fd4ad3ed423a225da550c0813fffbbb20d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.8
|