Errbot is a python chatbot, this storage plugin allows you to use it with Redis databases as a persistent storage.
- Install redis library
- Then you need to add this section to your config.py:
BOT_EXTRA_STORAGE_PLUGINS_DIR='/path/to/err-storage'
STORAGE = 'Redis'
STORAGE_CONFIG = {
'host': 'localhost',
'port': 6379,
'db': 0,
'password': 'xyz123',
}STORAGE_CONFIG will send any option specified as an argument to redis.StrictRedis.
- Start your bot in text mode:
errbot -Tto give it a shot.
To run the automated test suite:
- Create and activate a Python virtual environment:
python3 -m venv .venv source .venv/bin/activate - Install the dependencies and testing requirements:
pip install -r requirements.txt errbot pytest tox fakeredis
- Run the tests using
pytestdirectly:Or run both tests and style checks usingpytest
tox:tox