Name: The name of the user, if available Organization model It exposes a consistent interface for different platforms.Įmail: The email address of the user, if available This messenger object can be used to send messages to the user. Messenger: Returns an implementation of object. Org: The organization this user belongs to. Make sure to define defaults for all fields. For example, if a slack team is authenticated, MyUser object will be created for each user in the team. This user model is automatically created for each authenticated user. Models.py from converse.models import AbstractUser class MyUser ( AbstractUser ): credits = models. Settings.py INSTALLED_APPS = # must remove CSRFMiddleware MIDDLEWARE = # making sure reversing URLs produces https instead of http, required for Slack integration SECURE_PROXY_SSL_HEADER = ( 'HTTP_X_FORWARDED_PROTO', 'https' ) Getting started User modelįirst, we need to define the model and attributes of every user communicating with the bot. Of course, if you prefer doing things the hard way, by pulling down the source code directly into your project: git clone It also requires slackclient and apiai python libraries for communication with the external services. The message parsing and delivery is done in the background with the help of celery.
Requirements and Installationĭjango-bot for Python works with Python 2.7, 3.4, 3.5, 3.6 and django >= 1.8, and requires PyPI to install dependencies. This library helps to maintain authenticated users and groups in the database and allows you to respond to any messages as well as initiate conversations with any of those. Future plans include supporting more messaging platforms (Facebook Messenger, Telegram, Kik, Google assistant, Cortana, Skype, Alexa), and more natural langauge parsers (AWS Lex, wit.ai).
OverviewīETA version: Currently django-bot only supports Slack and api.ai. Slack, FB messenger) and natural langauge parsers (eg. A django library that makes it easier to develop bots with a common interface for messaging platforms (eg.