exception-slacker-0.1.1
توضیحات
Notify exceptions on slack
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | exception-slacker-0.1.1 |
| نام | exception-slacker |
| نسخه کتابخانه | 0.1.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | hassaku |
| ایمیل نویسنده | hassaku.apps@gmail.com |
| آدرس صفحه اصلی | https://github.com/hassaku/exception_slacker |
| آدرس اینترنتی | https://pypi.org/project/exception-slacker/ |
| مجوز | MIT |
[](https://travis-ci.org/hassaku/exception-slacker)
# Install
```
$ pip install exception-slacker
```
# Usage
## When ENV set
```
import os
import exception_slacker
os.environ['EXCEPTION_SLACKER_TOKEN'] = "XXXXXXXXXX"
os.environ['EXCEPTION_SLACKER_CHANNEL'] = "#notification-test"
os.environ['EXCEPTION_SLACKER_NAME'] = "Exception Notifier"
raise StandardError("ERROR")
```

## When ENV not set
```
import exception_slacker
raise StandardError("ERROR")
```
```
Error in sys.excepthook:
Traceback (most recent call last):
File "/path/to/exception_slacker.py", line 17, in notification
raise StandardError("exception_slacker is imported, but %s aren't found in ENV." % ','.join(__KEYS))
StandardError: exception_slacker is imported, but EXCEPTION_SLACKER_TOKEN,EXCEPTION_SLACKER_CHANNEL,EXCEPTION_SLACKER_NAME aren't found in ENV.
Original exception was:
Traceback (most recent call last):
File "test.py", line 20, in <module>
raise StandardError("ERROR")
StandardError: ERROR
```
# Update PyPI
```
$ nosetests -vs
$ python setup.py register # if necessary
$ python setup.py sdist upload
```
# Contributing
- Fork the repository on Github
- Create a named feature branch (like add_component_x)
- Write your change
- Write tests for your change (if applicable)
- Run the tests, ensuring they all pass
- Submit a Pull Request using Github
# License
MIT
نحوه نصب
نصب پکیج whl exception-slacker-0.1.1:
pip install exception-slacker-0.1.1.whl
نصب پکیج tar.gz exception-slacker-0.1.1:
pip install exception-slacker-0.1.1.tar.gz