Skip to main content

A simple tools package

Project description

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"}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyzr-0.0.4.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyzr-0.0.4-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file pyzr-0.0.4.tar.gz.

File metadata

  • Download URL: pyzr-0.0.4.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.8

File hashes

Hashes for pyzr-0.0.4.tar.gz
Algorithm Hash digest
SHA256 4ad18371d6dd28c2d1dfbfdf44a620670c218f760a0d40cbeda21321dd1e9eb1
MD5 28d32443d686818334efdaf9b8a6f782
BLAKE2b-256 ee0e7ad66131bbd7a2d2ce5e83c918f928f488f62fb057a7b202b824b1c211b3

See more details on using hashes here.

File details

Details for the file pyzr-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: pyzr-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.8

File hashes

Hashes for pyzr-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d26b7e079e9ae6dd418cd95c810329c661a6834255aa598c0fbd4e4cdd61bbae
MD5 d2d68da1d5dd36091a1f13ed4328f11b
BLAKE2b-256 5f52a87fc13b0912ffd6ba942e9682fd4ad3ed423a225da550c0813fffbbb20d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page