{ "info": { "author": "Mitsuki Ogasahara", "author_email": "negiga@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: Implementation :: CPython" ], "description": "==================================================\nbottoku - Python Chat/Messenger Bot Microframework\n==================================================\n\nbottoku(pronounced as *bot-oku*) is a chat bot *micro* framework for Pythonista.\n\nFeature\n=======\n\nbottoku is a microframework, however, you can build chat bots without restriction.\n\nFor example,\n\n- Integration with web frameworks e.g. flask, django, etc...\n- Serverless bots running on AWS Lambda\n- Building messages compatible with Line, Facebook, and Slack\n- Messages with attachments e.g. images, videos, etc...\n- Conversations with contexts: hi! -> who r u? -> john -> hi john, how about...\n- Favorite database backend\n\nCompared to Hubot\n=================\n\n- No built-in server. If you want to build non-serverless bots, choose favorite web frameworks.\n- No built-in binary. bottoku is just a library, so please do ``pip install`` to integrate.\n- Very flexible routing system. Conditions are not defined by regex, but by Python's lambda functions.\n- And of course, bottoku is a Python framework.\n\nUsage\n=====\n\nFirst, ``pip`` it.::\n\n pip install bottoku\n\nThen, define actions and views::\n\n # views.py\n from bottoku.api.facebook.template import TextMessage\n def greeting(): # view is just a function to return a list of messages\n return [TextMesage(text='hello, i am a bot')]\n \n # actions.py\n from bottoku import route\n @route(lambda message, context: 'hello' in message) # lambda condition to reply\n def say_hello(render, message, context):\n render(greeting()) # call `render` function\n \nNext, define a bot class (application class), it is used to define routes and API clients.::\n\n # mybot.py\n from bottoku import Bot\n from bottoku.renderer.stdout import StdoutRenderer\n from bottoku.api.facebook.renderer import FacebookRenderer\n class MyBot(Bot):\n def __init__(self, env):\n super(MyBot, self).__init__(\n env,\n [\n actions.say_hello,\n # other actions...\n ],\n BlackholeRepository(), # repository to set user's data\n [\n StdoutRenderer(),\n FacebookRenderer(),\n ] # API clients\n )\n \nFinally, instantiate the bot and call ``reply`` in handler.::\n\n # handler.py, lambda handler or web frameworks' webhook handler\n def handler():\n message, receiver_id = extract_from_message()\n bot = MyBot(env)\n bot.reply(message, receiver_id)\n\nCurrently, I have not prepared docs yet. But you can see examples.\n\nExample\n=======\n\n- `example `_: most basic example\n- `example_api `_: advanced example to use Facebook and Slack APIs\n\nBugs / Feature requests\n=======================\n\n`Github's issue `_ or mention to `@yamitzky `_", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/yamitzky/bottoku", "keywords": null, "license": "The MIT License (MIT)", "maintainer": null, "maintainer_email": null, "name": "bottoku", "package_url": "https://pypi.org/project/bottoku/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/bottoku/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/yamitzky/bottoku" }, "release_url": "https://pypi.org/project/bottoku/0.1.6/", "requires_dist": null, "requires_python": null, "summary": "Microframework for Chat/Messenger Bots", "version": "0.1.6" }, "last_serial": 2354291, "releases": { "0.1.3": [ { "comment_text": "", "digests": { "md5": "a6fa4e00f6a7008b632f4d5e8ffb4adb", "sha256": "0361ed4b7301233bac3e796e59890d53ee255cf4eef2892409a0021d1e96a8b6" }, "downloads": -1, "filename": "bottoku-0.1.3.tar.gz", "has_sig": false, "md5_digest": "a6fa4e00f6a7008b632f4d5e8ffb4adb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8122, "upload_time": "2016-06-05T17:16:52", "url": "https://files.pythonhosted.org/packages/82/10/475f47c3708315bf9a73e48082e56ac16345092615ebfd2a7a030ea4c5a5/bottoku-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "3626c73d719b22a8c5fb06592b9b7bd7", "sha256": "22cb73345dd6a2afe69a7b1651313f1407a7eb42c0dbfb6478c31f72fa495dad" }, "downloads": -1, "filename": "bottoku-0.1.4.tar.gz", "has_sig": false, "md5_digest": "3626c73d719b22a8c5fb06592b9b7bd7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8116, "upload_time": "2016-06-11T09:08:12", "url": "https://files.pythonhosted.org/packages/48/0f/6e4684bb28350474482d0be7b0c59cab3314bcae4c2caf04c10c9eef825f/bottoku-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "34144b92a16a27235a4e039c4ea17487", "sha256": "c69e0321cb32d9bd7b7f30207a199540e36fb1b2011cae5612958fdf470cd430" }, "downloads": -1, "filename": "bottoku-0.1.5.tar.gz", "has_sig": false, "md5_digest": "34144b92a16a27235a4e039c4ea17487", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8113, "upload_time": "2016-06-11T09:09:38", "url": "https://files.pythonhosted.org/packages/c7/10/43b1872bdf589e258900f1b028a27fe149df9d55c67ded94555d032e7841/bottoku-0.1.5.tar.gz" } ], "0.1.6": [] }, "urls": [] }