All Projects → mbrown1508 → Microsoftbotframework

mbrown1508 / Microsoftbotframework

Licence: mit
Microsoft Bot Framework is a wrapper for the Microsoft Bot API by Microsoft

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Microsoftbotframework

Web develop
《Python Web开发实战》书中源码
Stars: ✭ 1,146 (+1585.29%)
Mutual labels:  flask, celery
Deepchatmodels
Conversation models in TensorFlow. (website removed)
Stars: ✭ 312 (+358.82%)
Mutual labels:  chatbot, flask
Delbot
It understands your voice commands, searches news and knowledge sources, and summarizes and reads out content to you.
Stars: ✭ 191 (+180.88%)
Mutual labels:  chatbot, flask
Wechat Admin
Wechat Management System
Stars: ✭ 1,716 (+2423.53%)
Mutual labels:  flask, celery
Flack
Companion code to my PyCon 2016 "Flask at Scale" tutorial session.
Stars: ✭ 458 (+573.53%)
Mutual labels:  flask, celery
Tedivms Flask
Flask starter app with celery, bootstrap, and docker environment
Stars: ✭ 142 (+108.82%)
Mutual labels:  flask, celery
Titan
Create Discord server widgets for websites of all sizes! A simple to setup process for end-users. Server members may view or send messages into an embedded Discord channel.
Stars: ✭ 221 (+225%)
Mutual labels:  chatbot, flask
Bugsnag Python
Official bugsnag error monitoring and error reporting for django, flask, tornado and other python apps.
Stars: ✭ 69 (+1.47%)
Mutual labels:  flask, celery
Full Stack
Full stack, modern web application generator. Using Flask, PostgreSQL DB, Docker, Swagger, automatic HTTPS and more.
Stars: ✭ 451 (+563.24%)
Mutual labels:  flask, celery
Enferno
A Python framework based on Flask microframework, with batteries included, and best practices in mind.
Stars: ✭ 385 (+466.18%)
Mutual labels:  flask, celery
Flask Full
starter/boilerplate flask application with celery, mongoengine, signals, shell commands, swagger api docs and sphinx docs integration
Stars: ✭ 117 (+72.06%)
Mutual labels:  flask, celery
Bibi
An e-commerce fullstack solution for Flask 出口电商全栈解决方案
Stars: ✭ 914 (+1244.12%)
Mutual labels:  flask, celery
Incepiton Mysql
🍭A web platform designed for mysql inception
Stars: ✭ 90 (+32.35%)
Mutual labels:  flask, celery
Docker Flask Celery Redis
Docker-Compose template for orchestrating a Flask app with a Celery queue using Redis
Stars: ✭ 165 (+142.65%)
Mutual labels:  flask, celery
Flask Log Request Id
Flask extension to track and log Request-ID headers produced by PaaS like Heroku and load balancers like Amazon ELB
Stars: ✭ 81 (+19.12%)
Mutual labels:  flask, celery
Bolt Python
A framework to build Slack apps using Python
Stars: ✭ 190 (+179.41%)
Mutual labels:  chatbot, flask
Gather Deployment
Gathers scalable tensorflow and infrastructure deployment
Stars: ✭ 326 (+379.41%)
Mutual labels:  flask, celery
Pymessager
Python API to develop chatbot on Facebook Messenger Platform
Stars: ✭ 580 (+752.94%)
Mutual labels:  chatbot, flask
Python Devops
gathers Python stack for DevOps, these are usually my basic templates use for my implementations, so, feel free to use it and evolve it! Everything is Docker!
Stars: ✭ 61 (-10.29%)
Mutual labels:  flask, celery
Faces
Do you look like a Nobel Laureate 🎖, Physicist, Chemist, Mathematician, Actor or a Programmer? God gave you one face and you went on to get a peek into the mind of God. 🌩
Stars: ✭ 65 (-4.41%)
Mutual labels:  flask

Microsoft Bot Framework

Microsoft Bot Framework is a wrapper for the Microsoft Bot API by Microsoft. It uses Flask to recieve the post messages from Microsoft and Celery to complete Async tasks.

The goal was to create a really simple to use library to enable you to interface with the Microsoft bot framework.

Full Docs can be found here: http://microsoftbotframework.readthedocs.io/

To run this app using the local simulator

Download and run the simulator from: https://docs.botframework.com/en-us/tools/bot-framework-emulator/

Install the library

pip install microsoftbotframework

Define a task

Create a file in the root directory called tasks.py. In the file define a task as follows. More information on the ReplyToActivity object and others can be found at http://microsoftbotframework.readthedocs.io/en/latest/conversationoperations/

from microsoftbotframework import ReplyToActivity

def echo_response(message):
    if message["type"] == "message":
        ReplyToActivity(fill=message,
                        text=message["text"]).send()

Create the main file

from microsoftbotframework import MsBot
from tasks import *

bot = MsBot()
bot.add_process(echo_response)

if __name__ == '__main__':
    bot.run()

Run your app

python main.py

Connect to your bot

By default the app runs at http://localhost:5000/api/messages.

Enter this address in the Enter your endpoint URL header of the emulator.

Start chatting! If you followed the above instructions it should repeat back what you type in.

To run this app using the online bot framework

In order to interact with the Microsoft bot framework you need to have a internet facing https endpoint with a valid certificate. This guide will show how to use gunicorn and heroku to host the application but you can easily use any wsgi hosting option as the MsBot object extends Flask.

Create a Microsoft Chatbot

Go to https://dev.botframework.com/bots. Register a bot and generate a 'Microsoft App ID' and 'Microsoft App Secret'. Don't worry about the messaging endpoint as we will create that soon. Create a config.yaml file in the root of your project and place the following information:

other:
    app_client_id: <Microsoft App ID>
    app_client_secret: <Microsoft App Secret>

Publish to Heroku

Create a file called requirements.txt and add the following.

microsoftbotframework
gunicorn

Create a file called "Procfile" and add the following. We are going to use gunicorn as our web server. You can remove "--log-level INFO" or set it to a lower level for production.

web: gunicorn -b '0.0.0.0:'$PORT --log-level INFO main:bot

Create a file called runtime.txt and add the following.

python-3.6.0

If you haven't yet install git

sudo apt-get install git

Signup for a Heroku account here: https://www.heroku.com/ and create a new app. Follow the instructions to Deploy using Heroku Git

Go back into the Microsoft MyBots tab and update the Messaging Endpoint to be the Domain found in the Heroku settings tab. Make sure you add "/api/messages" at the of the url.

Congratulations you should now be able to chat to your bot on Skype!

Running this library's tests

  1. Make sure that you have the required libraries installed from setup.py tests_require section with pip install -e .[test]
  2. Make sure redis and mongodb are installed locally
  3. Turn on redis: redis-server
  4. Turn on mongobd: mongod
  5. Open a terminal in the root of this directory
  6. Run the tests with one of the below options
    • nosetests (requires step 1 libraries to be installed)
    • python setup.py test (doesn't require step 1 libraries to be installed)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].