Package: bomberman-python
# BombermanThis is a Python client for the Bomberman HTTP API. It has been builtand tested against Python 2.6.1.[Bomberman](http://addons.heroku.com/bomberman): shelter from profanity bombing, is an [add-on](http://addons.heroku.com) for Herokuapplications. If you would like to be part of the alpha or early betatesting process please email <bomberman-support@ikayzo.com>.For detailed instructions on installing the addon to your Herokuapplication please see our [add-on documentation page](http://bomberman.ikayzo.com/)## InstallationInstall the Python client using pip.```term$ pip install bomberman-python```Before making client requests, make sure your environment contains your API key. If you're using Heroku or Foreman, this should already be set for you.```term$ export BOMBERMAN_API_KEY=<your api key>```For users of the Bomberman Heroku addon, please, uncomment line 8 of the connection.py file.Once that is done, create the client in your Python code.```pythonfrom bomberman.client import Clientbomberman = Client()```### Checking if Text Contains ProfanityTo check if a piece of text or *corpus* contains profanity use the`.is_profane(corpus)` method.  This will return a boolean value as theresult```pythonnon_profane_text = "The quick brown fox jumped over the lazy dog."bomberman.is_profane(non_profane_text)#=> Falseprofane_text = "The quick brown fox jumped over the F-BOMBing lazy dog."bomberman.is_profane(profane_text)#=> True```### Censoring Profane Words & PhrasesIf you would like to save or display text where the profane words (ifany) are censored, use the `.censor(corpus, replacement_text)` method.```pythonnon_profane_text = "The quick brown fox jumped over the lazy dog."bomberman.censor(non_profane_text, "####")#=> "The quick brown fox jumped over the lazy dog."profane_text = "The quick brown fox jumped over the F-BOMBing lazy dog."bomberman.censor(profane_text, "####")#=> "The quick brown fox jumped over the ### lazy dog."```The `replacement_text` parameter is a string and optional. `"***"` issuppled by default.### Highlighting Profane Words & PhrasesSometimes it is useful to leave the original profane word/phrase intactbut wrap it in some sort of tag to make it stand out. This can beaccomplished with the `.highlight(corpus, start_tag, end_tag)` method.```pythonnon_profane_text = "The quick brown fox jumped over the lazy dog."bomberman.highlight(non_profane_text, "<blink>", "</blink>")#=> "The quick brown fox jumped over the lazy dog."profane_text = "The quick brown fox jumped over the F-BOMBing lazy dog."bomberman.highlight(profane_text, "<blink>", "</blink>")#=> "The quick brown fox jumped over the <blink>F-BOMBing</blink> lazy dog."```The `start_tag` & `end_tag` parameters are strings and optional. A pairof opening and closing `<strong>` tags are used if none are provided.For more info on customizing Bomberman please refer to the [add-on documentation](http://bomberman.ikayzo.com/).## TroubleshootingWe are just starting out.  If you experience trouble please contact usat <bomberman-support@ikayzo.com>.## ContributingGiven the early stage of this project we are open to comments &suggestions for this library please send them to <bomberman-support@ikayzo.com>.