dtalarm-1.0.3
توضیحات
Dtalarm for digital transformer
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | dtalarm-1.0.3 |
| نام | dtalarm |
| نسخه کتابخانه | 1.0.3 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | TimeAshore |
| ایمیل نویسنده | timeashore@163.com |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/dtalarm/ |
| مجوز | - |
# Dtalarm
## Installation
```shell
$ pip install dtalarm
```
## Dependencies
Dtalarm supports CPython 3.6.8+, PyPy, and PyPy3.6.8+.
You can install all dependencies automatically with the following command:
```shell
$ pip install dtalarm['Pillow', 'requests', 'kaleido', 'plotly', 'numpy', 'pandas']
```
## Usage
Register a new service on the DRIVE server and get a unique secret_key.
The `DTAlarmConfig` module records the configuration information required to send alarms. Here, you need to configure a server address.
```python
from dtalarm import DTAlarmConfig
DTAlarmConfig.SERVER = ""
```
Import the `TeamsChannelAlarm` class or the `TeamsPersonalAlarm` class from the package and configure the secret_key property.
After you initialize an object, you can assign a value to the alarm object. If the alarm content is a dataframe, please use the to_json method and assign it to the table property.
```python
from dtalarm import TeamsChannelAlarm
alarm = TeamsChannelAlarm(secret_key="", channel_address="", template="message_only_v1")
alarm.title = "Title"
alarm.text = "Content"
alarm.table = df.to_json()
```
Finally, use the send function to send the alarm, it will return the response, timeout property: (optional) how many seconds to wait for the server to send data
before giving up, as a float or tuple.
```python
response = alarm.send()
```
## Documentation
*Please install the following version dependencies when send error: ['Pillow==8.4.0', 'requests==2.27.1', 'kaleido==0.2.1', 'plotly==5.9.0', 'numpy==1.19.5', 'pandas==1.1.5']*
نیازمندی
| مقدار | نام |
|---|---|
| - | Pillow |
| - | requests |
| >=0.2.1 | kaleido |
| - | plotly |
| - | numpy |
| - | pandas |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6.8 | Python |
نحوه نصب
نصب پکیج whl dtalarm-1.0.3:
pip install dtalarm-1.0.3.whl
نصب پکیج tar.gz dtalarm-1.0.3:
pip install dtalarm-1.0.3.tar.gz