{ "info": { "author": "lanius", "author_email": "lanius@nirvake.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: Japanese", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3" ], "description": "keiko\n=====\n\n.. image:: https://badge.fury.io/py/keiko.png\n :target: http://badge.fury.io/py/keiko\n\n.. image:: https://travis-ci.org/lanius/keiko.png\n :target: https://travis-ci.org/lanius/keiko\n\n.. image:: https://coveralls.io/repos/lanius/keiko/badge.png\n :target: https://coveralls.io/r/lanius/keiko\n\nkeiko is Python and Web API clients for `Keiko-chan`_.\n\n\nInstallation\n------------\n\nkeiko can be installed via pip or easy_install:\n\n.. code-block:: bash\n\n $ pip install keiko\n\nOr:\n\n.. code-block:: bash\n\n $ easy_install keiko\n\n\nUsage\n-----\n\nFirstly, setup Keiko-chan and assign IP address.\n\nPython\n~~~~~~\n\nSpecify the address of Keiko-chan and instantiate the client:\n\n.. code-block:: python\n\n >>> import keiko\n >>> address = '192.168.1.2' # example address of Keiko-chan\n >>> client = keiko.Client(address)\n\nControl the lamps:\n\n.. code-block:: python\n\n >>> client.lamps.green.on() # turns on the lamp\n >>> client.lamps.green.status\n 'on'\n >>> client.lamps.green.off() # turns off the lamp\n >>> client.lamps.green.status\n 'off'\n >>> client.lamps.yellow.blink() # blinks the lamp\n >>> client.lamps.yellow.status\n 'blink'\n >>> client.lamps.red.quickblink() # blinks the lamp quickly\n >>> client.lamps.red.status\n 'quickblink'\n >>> client.lamps.off() # turns off the all lamps\n\nWith delay and duration time:\n\n.. code-block:: python\n\n >>> client.lamps.red.on(wait=2, time=4) # wait 2 second, light 4 seconds\n\nControl the buzzer:\n\n.. code-block:: python\n\n >>> client.buzzer.on() # turns on the buzzer\n >>> client.buzzer.status\n 'continuous'\n >>> client.buzzer.off() # turns off the buzzer\n >>> client.buzzer.status\n 'off'\n\nControl the direct inputs and outputs:\n\n.. code-block:: python\n\n >>> client.di.status\n {1: 'off', 2: 'off', 3: 'off', 4: 'off'}\n >>> client.do.status\n {1: 'off', 2: 'off', 3: 'off', 4: 'off'}\n >>> client.do(2).on()\n >>> client.do(2).status\n 'on'\n >>> client.do.status\n {1: 'off', 2: 'on', 3: 'off', 4: 'off'}\n\nControl the voices:\n\n.. code-block:: python\n\n >>> client.voices.status\n 'stop'\n >>> client.voices(1).play() # plays #1 voice \n >>> client.voices.stop() # stops the voice \n >>> client.voices(5).play(3) # plays #5 voice 3 times\n >>> client.voices.stop()\n >>> client.voices(10).repeat() # plays #10 voice repeatedly\n >>> client.voices.stop()\n\nWeb API\n~~~~~~~\n\nSpecify the address of Keiko-chan and run Web API server:\n\n.. code-block:: bash\n\n $ keiko 192.168.1.2\n * Running on http://127.0.0.1:8080/\n\nPass optional parameters to the server:\n\n.. code-block:: bash\n\n $ keiko 192.168.1.2 --server myhost:5000\n * Running on http://myhost:5000/\n\nControl the lamps:\n\n.. code-block:: bash\n\n $ curl http://127.0.0.1:8080/lamps\n {\n \"lamps\": {\n \"green\": \"off\", \n \"red\": \"off\", \n \"yellow\": \"off\"\n }\n }\n\n $ curl http://127.0.0.1:8080/lamps/green/on\n {\n \"result\": \"success\"\n }\n\n $ curl http://127.0.0.1:8080/lamps/green\n {\n \"lamps\": {\n \"green\": \"on\"\n }\n }\n\nWith delay and duration time:\n\n.. code-block:: bash\n\n $ curl http://127.0.0.1:8080/lamps/yellow/on?wait=2&time=4\n {\n \"result\": \"success\"\n }\n\nControl the buzzer:\n\n.. code-block:: bash\n\n $ curl http://127.0.0.1:8080/buzzer\n {\n \"buzzer\": \"off\"\n }\n\n $ curl http://127.0.0.1:8080/buzzer/on\n {\n \"result\": \"success\"\n }\n\nControl the direct inputs and outputs:\n\n.. code-block:: bash\n\n $ curl http://127.0.0.1:8080/di\n {\n \"di\": {\n \"1\": \"off\", \n \"2\": \"off\", \n \"3\": \"off\", \n \"4\": \"off\"\n }\n }\n\n $ curl http://127.0.0.1:8080/do\n {\n \"do\": {\n \"1\": \"off\", \n \"2\": \"off\", \n \"3\": \"off\", \n \"4\": \"off\"\n }\n }\n\n $ curl http://127.0.0.1:8080/do/2/on\n {\n \"result\": \"success\"\n }\n\nControl the voices:\n\n.. code-block:: bash\n\n $ curl http://127.0.0.1:8080/voices\n {\n \"voices\": \"stop\"\n }\n\n $ curl http://127.0.0.1:8080/voices/10/play\n {\n \"result\": \"success\"\n }\n\n\nCaveats\n-------\n\nThis module is unofficial and tested with only Keiko-chan 4G+ (DN-1510GL) yet. For more details, see `the official documentation`_.\n\n\n.. _Keiko-chan: http://%e8%ad%a6%e5%ad%90%e3%81%a1%e3%82%83%e3%82%93.com/\n.. _the official documentation: http://www.isa-j.co.jp/dn1510gl/files/dn1510gl-manual-20130426.pdf", "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/lanius/keiko/", "keywords": null, "license": "Copyright 2013 lanius\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.", "maintainer": null, "maintainer_email": null, "name": "keiko", "package_url": "https://pypi.org/project/keiko/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/keiko/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/lanius/keiko/" }, "release_url": "https://pypi.org/project/keiko/0.2.0/", "requires_dist": null, "requires_python": null, "summary": "keiko is Python and Web API clients for Keiko-chan.", "version": "0.2.0" }, "last_serial": 875043, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "c81254611b1c5a694877f30d6faed0c7", "sha256": "60523aa068f4e0b19c18bcb28c1407d6395b1b6e628c76edf3ff3a8117a22b2e" }, "downloads": -1, "filename": "keiko-0.1.0.tar.gz", "has_sig": false, "md5_digest": "c81254611b1c5a694877f30d6faed0c7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10628, "upload_time": "2013-09-03T01:20:06", "url": "https://files.pythonhosted.org/packages/06/90/b7221096c5d99f2b617afeac784df73aaf29f0065e1ac18d4ce00f8ae886/keiko-0.1.0.tar.gz" }, { "comment_text": "", "digests": { "md5": "7f77ea95196674888bd23dc7c5f52e1e", "sha256": "07d07ff86fc79067eaf650b763472164bdb1de6b10353fc05a13055432403d5b" }, "downloads": -1, "filename": "keiko-0.1.0.zip", "has_sig": false, "md5_digest": "7f77ea95196674888bd23dc7c5f52e1e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16333, "upload_time": "2013-09-03T01:20:08", "url": "https://files.pythonhosted.org/packages/82/ea/6f046e3f55366e13431c8ef2cba8cf7c790a338f0426b1c9f6aca8b07862/keiko-0.1.0.zip" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "da17018b3dee0059e41aa8be8c2c85db", "sha256": "8921046cbfb40cfb55fd0b0d2d9ed53348cc71629a7b003c4b2e2dd9a49d7d25" }, "downloads": -1, "filename": "keiko-0.1.1.tar.gz", "has_sig": false, "md5_digest": "da17018b3dee0059e41aa8be8c2c85db", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10913, "upload_time": "2013-09-03T08:56:03", "url": "https://files.pythonhosted.org/packages/a8/67/00c931973d91ca184817b06648d4c2e38ef35928cb3222aba324a629c8e3/keiko-0.1.1.tar.gz" }, { "comment_text": "", "digests": { "md5": "298aa8fa90486f0172f80d8de5b367b8", "sha256": "a9aba18ca7a296e30683572a1cd7ca4b493efa832fa6c64373ea80663e1ef434" }, "downloads": -1, "filename": "keiko-0.1.1.zip", "has_sig": false, "md5_digest": "298aa8fa90486f0172f80d8de5b367b8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16863, "upload_time": "2013-09-03T08:56:05", "url": "https://files.pythonhosted.org/packages/94/4e/17cedc17dd49687f7bda7f75357f6ec931c6244956fc5612e373e28385f7/keiko-0.1.1.zip" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "d899eda01adc69496d4fdbf9e7158145", "sha256": "e1dfe93094cc4896dc11e818b7e3aeead2fb3e6c14351525c7dee24b17347b92" }, "downloads": -1, "filename": "keiko-0.2.0.tar.gz", "has_sig": false, "md5_digest": "d899eda01adc69496d4fdbf9e7158145", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11194, "upload_time": "2013-09-27T01:03:32", "url": "https://files.pythonhosted.org/packages/36/6b/d90b5ba3575001649d24ca2883d95886fd26a8eba5b4aeb8ae801399a94f/keiko-0.2.0.tar.gz" }, { "comment_text": "", "digests": { "md5": "84c0fc9d7bb00b40aa6d8c65f5d0318e", "sha256": "886f4a1b66a0f6b5f2a364a417d31053f2cae134392345b38433071e9ef9092f" }, "downloads": -1, "filename": "keiko-0.2.0.zip", "has_sig": false, "md5_digest": "84c0fc9d7bb00b40aa6d8c65f5d0318e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17369, "upload_time": "2013-09-27T01:03:36", "url": "https://files.pythonhosted.org/packages/b6/e0/a15538261a6801f88d2c50202270ffc384d06e27edb4a8df919b7d2da637/keiko-0.2.0.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d899eda01adc69496d4fdbf9e7158145", "sha256": "e1dfe93094cc4896dc11e818b7e3aeead2fb3e6c14351525c7dee24b17347b92" }, "downloads": -1, "filename": "keiko-0.2.0.tar.gz", "has_sig": false, "md5_digest": "d899eda01adc69496d4fdbf9e7158145", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11194, "upload_time": "2013-09-27T01:03:32", "url": "https://files.pythonhosted.org/packages/36/6b/d90b5ba3575001649d24ca2883d95886fd26a8eba5b4aeb8ae801399a94f/keiko-0.2.0.tar.gz" }, { "comment_text": "", "digests": { "md5": "84c0fc9d7bb00b40aa6d8c65f5d0318e", "sha256": "886f4a1b66a0f6b5f2a364a417d31053f2cae134392345b38433071e9ef9092f" }, "downloads": -1, "filename": "keiko-0.2.0.zip", "has_sig": false, "md5_digest": "84c0fc9d7bb00b40aa6d8c65f5d0318e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17369, "upload_time": "2013-09-27T01:03:36", "url": "https://files.pythonhosted.org/packages/b6/e0/a15538261a6801f88d2c50202270ffc384d06e27edb4a8df919b7d2da637/keiko-0.2.0.zip" } ] }