{ "info": { "author": "Tanja Kuery and Lars Voegtlin", "author_email": "lars.voegtlin@unifr.ch", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Programming Language :: Python :: 3.6" ], "description": "# NuQui extension\nThis is a little module to make chatbots able to ask questions. There is already a prototype that uses the NuQui module [you find it here](https://github.com/nuqui-chatbot/nuqui-nombot). It has over 200 Questions about food in German. You can easily change the sqlite database to add more questions or adapt them to your needs. (it will never ask the same questions twice).\n\nThe question will be related to the food that the user ate. If there are no meal entry it will ask a random question.\n\n### Installation\nThe installation is quite easy. It is a pypi module so you can just install it via pip.\n```\npip install nuqui\n```\n\nIf you want to install it form source code you just have to clone the, move into the root directory and then run the following command:\n```\npip install -r requirements.txt\npython setup.py install\n```\n\n### Usage\nNuqui is quite easy to use and has just a few methods to invoke in your program.\n\nFirst you need to import nuqui in the file you need it\n```\nimport nuqui\n```\n#### USer Management\nAfter the import we need to make a new user in the nuqui module so we have to call \n```\nnuqui.create_user(, )\n```\nIf your bot or program has the possibility to delete a user you have can also delete the user in the nuqui module by calling\n```\nnuqui.delete_user()\n```\nThis will delete the user and everyhting related to him.\n\n#### add meals\nThen we need to add a meal to the user. That is also pretty simple to do. Just call \n```\nnuqui.add_meal(, , )\n```\nThe 'food_string' needs to have a certain format. Just use ingredents of the meal and then concatenate them together with a comma seperation. e.g. \"wasser,apfel,salz\". The total calories are an int that represents the total calories of the whole meal.\n\n#### Get a Question\nNow as you have some restriction in the database you can ask for a question. With \n```\nnuqui.get_predefined_question_dict_with_random_answers()\n```\nyou get a question dictionary (JSON) with the following structure:\n```\n{\n \"question\": questionstring,\n \"answer\": an array with 4 answer options,\n \"value\": the points you get for this question\n}\n```\nLet your user answer with 4 options (!A, !B, !C, !D)\n\n#### Evaluate your answer\nBecause you dont know what the right answer you need e evaluation.\n```\nnuqui.evaluat(, )\n```\nThis function need an answer (A sting that contains either !A, !B, !C or !D) and the user id. It will return you a Dictornary (JSON) in the following structur:\n\n```\n{\n \"success\": boolean,\n \"right_answer\": right_answer,\n \"achieved_points\": points the question was worth,\n \"total_points\": the total points of the user\n }\n```\n\n### run tests\nYou can also test the module by running the tests in the tests folder. They are all based on the standart unit test python framework.\nTo run the tests just type\n```\npython tests/test_basic.py\n```\n\n### Future work\n* delete question form the user after a certain time\n* make the database more persistent\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "nuqui", "package_url": "https://pypi.org/project/nuqui/", "platform": "", "project_url": "https://pypi.org/project/nuqui/", "project_urls": null, "release_url": "https://pypi.org/project/nuqui/0.1.6/", "requires_dist": [ "sqlalchemy" ], "requires_python": "", "summary": "A small quiz application", "version": "0.1.6" }, "last_serial": 3579781, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "fcf81a92ae250956c6530e56e2094013", "sha256": "66b317c93d807c2c38bc4dbccac3baa38bef42b95f2d5ea396249f970532ed13" }, "downloads": -1, "filename": "nuqui-0.1.1-py3.4.egg", "has_sig": false, "md5_digest": "fcf81a92ae250956c6530e56e2094013", "packagetype": "bdist_egg", "python_version": "3.4", "requires_python": null, "size": 33688, "upload_time": "2018-02-08T09:39:44", "url": "https://files.pythonhosted.org/packages/f4/0d/ec08f5ec696ce5ed68d967efc88862f373ba9ccba13ece3f64a3ae0f1ee5/nuqui-0.1.1-py3.4.egg" }, { "comment_text": "", "digests": { "md5": "9e26e96b70018482ab216fafe54c25a8", "sha256": "aed47a90118d21daec5df2fba3bf732db38948dbeffefb787abf8058892b4dd8" }, "downloads": -1, "filename": "nuqui-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "9e26e96b70018482ab216fafe54c25a8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 30866, "upload_time": "2018-02-08T09:39:42", "url": "https://files.pythonhosted.org/packages/cd/b8/cbb1883017f1d2fcf23fb59b125832da16996376f37b1737bbd24400c12f/nuqui-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "29e8bfe4bc440456c872855216af5e20", "sha256": "9d3fb3e26d3762ce9fd4b7bcd4e4fb294ea364b049c2aa15759243cb9477a4c8" }, "downloads": -1, "filename": "nuqui-0.1.1.tar.gz", "has_sig": false, "md5_digest": "29e8bfe4bc440456c872855216af5e20", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 43277, "upload_time": "2018-02-08T09:39:45", "url": "https://files.pythonhosted.org/packages/8d/f5/65d2dbf110a22d15f50a6356e81e202ad95ac69302f6a47173e80eef4119/nuqui-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "dc5c691eeac68de3f774cd38060da56c", "sha256": "bdbbfb3b02b2d5af9651d55fb89f5bbea9d7a8338b90240910d10518481fe51b" }, "downloads": -1, "filename": "nuqui-0.1.2-py3.4.egg", "has_sig": false, "md5_digest": "dc5c691eeac68de3f774cd38060da56c", "packagetype": "bdist_egg", "python_version": "3.4", "requires_python": null, "size": 34730, "upload_time": "2018-02-10T09:16:26", "url": "https://files.pythonhosted.org/packages/39/8f/00a962a82279c896a3ce2963ede0321f8165c91b291544d19161806a567f/nuqui-0.1.2-py3.4.egg" }, { "comment_text": "", "digests": { "md5": "50730d74781ed673a01f5486dd1c9eb8", "sha256": "996f2a27c3e3b7b9ecca3cf64354debef5018bb81fcadad1a262872f1c398b57" }, "downloads": -1, "filename": "nuqui-0.1.2.tar.gz", "has_sig": false, "md5_digest": "50730d74781ed673a01f5486dd1c9eb8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 43634, "upload_time": "2018-02-10T09:16:28", "url": "https://files.pythonhosted.org/packages/6c/40/808efb1d515e8af81a69d603e22e9590b50b918d59ba85acf30420e46a7d/nuqui-0.1.2.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "875999b26dcaab116364ca6d3386be7b", "sha256": "4c729c3b4f49ae4d7076f36f06c728280d0d49bc043678f2c13e2739327cfd7d" }, "downloads": -1, "filename": "nuqui-0.1.4-py3.4.egg", "has_sig": false, "md5_digest": "875999b26dcaab116364ca6d3386be7b", "packagetype": "bdist_egg", "python_version": "3.4", "requires_python": null, "size": 26146, "upload_time": "2018-02-13T12:41:33", "url": "https://files.pythonhosted.org/packages/dc/7a/390fee3526cb856354ee241e9ae4223825e61ecf0a5aaae59a2ce385fec2/nuqui-0.1.4-py3.4.egg" }, { "comment_text": "", "digests": { "md5": "8a54f45953be0c564b9853b95c393fdc", "sha256": "23458c299223c8b41c9c69e70d71ba3ec62391d1cbd80d988116b2f3352126f2" }, "downloads": -1, "filename": "nuqui-0.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "8a54f45953be0c564b9853b95c393fdc", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 22734, "upload_time": "2018-02-13T12:41:30", "url": "https://files.pythonhosted.org/packages/85/3b/8843318dc4bc859f984bdc546b2a81548306b2fd42cc359c87b39d1a204a/nuqui-0.1.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "75e03ebb9757fb02a1a0c85a19ac9979", "sha256": "8eb04995a2c203dc3ba4088f75359bae5b07ee2672e7fa5f98d23bf321740a37" }, "downloads": -1, "filename": "nuqui-0.1.4.tar.gz", "has_sig": false, "md5_digest": "75e03ebb9757fb02a1a0c85a19ac9979", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 35312, "upload_time": "2018-02-13T12:41:35", "url": "https://files.pythonhosted.org/packages/11/dc/c5154b7a09b8394953c9985fbc2ac042b15c7e1c1c57b05af9cf40eba5d2/nuqui-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "78497029939c8e99927e44a7144bf3c0", "sha256": "c8357caeb9158e5a0753d70bd410d42bfe156cb6684e2650f294a9f052fdfd34" }, "downloads": -1, "filename": "nuqui-0.1.5-py3.4.egg", "has_sig": false, "md5_digest": "78497029939c8e99927e44a7144bf3c0", "packagetype": "bdist_egg", "python_version": "3.4", "requires_python": null, "size": 27547, "upload_time": "2018-02-13T21:43:56", "url": "https://files.pythonhosted.org/packages/17/fa/abbb03ae076270d8b4fcea26e93271a50fd768270bc608263d1bf2b8d33b/nuqui-0.1.5-py3.4.egg" }, { "comment_text": "", "digests": { "md5": "bf23d7f89b60d04d40644e1b1850e9bc", "sha256": "15cfa3851da7961bc15b046aea393f64ff3aaeebfe063036cb90b372617fa3c5" }, "downloads": -1, "filename": "nuqui-0.1.5-py3-none-any.whl", "has_sig": false, "md5_digest": "bf23d7f89b60d04d40644e1b1850e9bc", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 25418, "upload_time": "2018-02-13T21:43:53", "url": "https://files.pythonhosted.org/packages/52/f7/039e87e76ef260ac76960fd9cf8ebe59b6790dc163d9a5f53d737523971f/nuqui-0.1.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dd99aeae53c510a9a801dc62c653eef6", "sha256": "a0b1af6ea866185fec125ed77d1450e2a26514f61223c5a67cda4c1c2d0ac64f" }, "downloads": -1, "filename": "nuqui-0.1.5.tar.gz", "has_sig": false, "md5_digest": "dd99aeae53c510a9a801dc62c653eef6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 36749, "upload_time": "2018-02-13T21:43:58", "url": "https://files.pythonhosted.org/packages/9f/33/e5ef3071315a326ca557c4f66b399d40bae9a7979bcc0aa8ba61dc49c0fe/nuqui-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "46ab46e0c37b9eaf5301397611b88561", "sha256": "72597f426ee2a3a55aa2d93683343202e2a1f48a23a7c795f468e70c50f0631e" }, "downloads": -1, "filename": "nuqui-0.1.6-py3.4.egg", "has_sig": false, "md5_digest": "46ab46e0c37b9eaf5301397611b88561", "packagetype": "bdist_egg", "python_version": "3.4", "requires_python": null, "size": 27575, "upload_time": "2018-02-13T22:01:00", "url": "https://files.pythonhosted.org/packages/19/62/820f899a5435860961dfcdcdb8b96c49e34af622f3082b4af1c3fa1d4ef8/nuqui-0.1.6-py3.4.egg" }, { "comment_text": "", "digests": { "md5": "977866b7dc9d0d729acd5347820f810b", "sha256": "2e6d9a326be5e8bcc516b0c063d8f7e64d34bcda29a1437b7c963075b48d9371" }, "downloads": -1, "filename": "nuqui-0.1.6-py3-none-any.whl", "has_sig": false, "md5_digest": "977866b7dc9d0d729acd5347820f810b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 25433, "upload_time": "2018-02-13T22:00:58", "url": "https://files.pythonhosted.org/packages/eb/c0/6a98625f467448c159260cfe9e58ba737d561adf42f6c9c5aabe7a0c1ba3/nuqui-0.1.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dd57146cddcdfba98fee1a6859d77f74", "sha256": "7452ce59e164e1945e7cadb838b2dc5c3739d5035a2b0fd9bdbd24b1e25f49cd" }, "downloads": -1, "filename": "nuqui-0.1.6.tar.gz", "has_sig": false, "md5_digest": "dd57146cddcdfba98fee1a6859d77f74", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 36760, "upload_time": "2018-02-13T22:01:01", "url": "https://files.pythonhosted.org/packages/64/3f/887155063cda96a63a8f6f530a62b5d8e18b6eb3434f43a3150edd828f19/nuqui-0.1.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "46ab46e0c37b9eaf5301397611b88561", "sha256": "72597f426ee2a3a55aa2d93683343202e2a1f48a23a7c795f468e70c50f0631e" }, "downloads": -1, "filename": "nuqui-0.1.6-py3.4.egg", "has_sig": false, "md5_digest": "46ab46e0c37b9eaf5301397611b88561", "packagetype": "bdist_egg", "python_version": "3.4", "requires_python": null, "size": 27575, "upload_time": "2018-02-13T22:01:00", "url": "https://files.pythonhosted.org/packages/19/62/820f899a5435860961dfcdcdb8b96c49e34af622f3082b4af1c3fa1d4ef8/nuqui-0.1.6-py3.4.egg" }, { "comment_text": "", "digests": { "md5": "977866b7dc9d0d729acd5347820f810b", "sha256": "2e6d9a326be5e8bcc516b0c063d8f7e64d34bcda29a1437b7c963075b48d9371" }, "downloads": -1, "filename": "nuqui-0.1.6-py3-none-any.whl", "has_sig": false, "md5_digest": "977866b7dc9d0d729acd5347820f810b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 25433, "upload_time": "2018-02-13T22:00:58", "url": "https://files.pythonhosted.org/packages/eb/c0/6a98625f467448c159260cfe9e58ba737d561adf42f6c9c5aabe7a0c1ba3/nuqui-0.1.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dd57146cddcdfba98fee1a6859d77f74", "sha256": "7452ce59e164e1945e7cadb838b2dc5c3739d5035a2b0fd9bdbd24b1e25f49cd" }, "downloads": -1, "filename": "nuqui-0.1.6.tar.gz", "has_sig": false, "md5_digest": "dd57146cddcdfba98fee1a6859d77f74", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 36760, "upload_time": "2018-02-13T22:01:01", "url": "https://files.pythonhosted.org/packages/64/3f/887155063cda96a63a8f6f530a62b5d8e18b6eb3434f43a3150edd828f19/nuqui-0.1.6.tar.gz" } ] }