Skip to main content
[![Build Status](https://travis-ci.org/hassaku/exception-slacker.png)](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")
```

![screenshot](https://raw.githubusercontent.com/hassaku/exception-slacker/master/screenshot.png)

## 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

Download files

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

Source Distribution

exception-slacker-0.1.1.tar.gz (2.3 kB view details)

Uploaded Source

File details

Details for the file exception-slacker-0.1.1.tar.gz.

File metadata

File hashes

Hashes for exception-slacker-0.1.1.tar.gz
Algorithm Hash digest
SHA256 88658664307806ed55166b869d12a751d349d4cb3c104ff036136e75e298738f
MD5 259d151de4ec5492f931dcac85254bbe
BLAKE2b-256 6b1b1e9a5e99df5a286029d66c3af11950f47e5b66e6318673a7166f7581dfa9

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 file

0.1.0

1 file

Supported by

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