Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/shonenada/flask-bearychat

A Flask extension to help interact with BearyChat
https://github.com/shonenada/flask-bearychat

Last synced: 26 days ago
JSON representation

A Flask extension to help interact with BearyChat

Awesome Lists containing this project

README

        

Flask-BearyChat
===============

Flask-BearyChat is a Flask Extension to help you work with `BearyChat `_.

Installation
------------

::

$ pip install flask-bearychat

Usage
-----

.. code-block:: python

from flask import Flask
from flask.ext.bearychat import BearyChat

app = Flask(__name__)
app.config['BEARYCHAT_TOKEN'] = 'token-from-bearychat-robot'
app.config['BEARYCHAT_CALLBACK'] = '/hook'
bearychat = BearyChat(app)

@bearychat.command('hello')
def list(**kwargs):
username = kwargs.get('username')
text = 'Hello, %s' % username
return bearychat.response(text=text)

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