michhar / pybotframework

A Python bot framework using the Microsoft Bot Framework REST API

Home Page:http://pybotframework.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python Bot Framework Wrapper --------

Description: Python wrapper and package for Bot Framework REST API and State REST API (not production ready, yet).

A snippet of a basic bot:

See the README in the examples folder for running a test bot.

Installation

Install the pybotframework package from this repository with

pip install .

or

python setup.py

Requirements for Examples

You will also need the following models and data:

Docker Instructions ========

To build and run the Docker image ensure you have Docker running. https://docs.docker.com/engine/installation/

Then set up the botframework emulator.

https://docs.microsoft.com/en-us/bot-framework/debug-bots-emulator

Make sure to go through the "Install and configure ngrok" settings (ensure you have ngrok installed - see Requirements above). Uncheck the "Bypass ngrok for local addresses" to enable the bot to talk with Docker.

Now build the Docker image on the command line.

cd <pybotframework base directory>

docker build .

docker images

Search for your Docker "Image ID" in the list

docker run -p 3978:3978 -id <image ID> python

docker ps

You should see your container ID running.

Now try to connect to the bot by entering the address in the Emulator: http://localhost:3978/api/messages

You should see the messages "User added!" and "Bot added!" This means that you are set up!

Links

About

A Python bot framework using the Microsoft Bot Framework REST API

http://pybotframework.readthedocs.io/en/latest/

License:MIT License


Languages

Language:HTML 66.7%Language:Jupyter Notebook 23.4%Language:Python 9.8%