{ "info": { "author": "Ben Griffiths", "author_email": "sendbenspam@yahoo.co.uk", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Build Tools" ], "description": "# Arbitrium - The Easy Menu System For Python\n\n## Install\n`pip install arbitrium`\n\n## Usage\n```\nfrom arbitrium import menu\nfrom os import exit\n\n@menu([\"Option One\", \"Option Two\", \"Final Option\"])\ndef choice_handler(choice):\n if choice == 1:\n # Option One Selected\n pass\n if choice == 2:\n # Option Two Selected\n pass\n if choice == 3:\n # Final Option Selected\n exit(1)\n\n# Calling the choice handler will also print the menu\nchoice_handler()\n```\nWill produce:\n```\n1) Option One\n2) Option Two\n99) Final Option\nPlease enter your choice:\n```\n\n**NOTE: Final Option will always be 99. It will run the choice handler once and then exit the choice handler function.**\n\n## Authentication\nArbitrium provides an easy system for adding auth to your menu:\n```\nfrom arbitrium import menu, requires_auth\n\ndef auth_function():\n u = input(\"Enter username: \")\n p = input(\"Enter password: \")\n # Check Passwords\n if password_correct:\n return True\n return False\n\n@requires_auth(auth_function, True)\n@menu([\"Option One\", \"Option Two\", \"Exit\"])\ndef choice_handler(choice):\n [...]\n\nchoice_handler()\n```\nWill run auth_function before a user can see or select any menu options. If auth_function returns True, the menu will run, if it returns False, it will exit with an error message.\nAlternatively,\n```\nfrom arbitrium import menu, requires_auth\n\ndef auth_function(username, password):\n # Check Passwords\n if password_correct:\n return True\n return False\n\n@requires_auth(auth_function(input(\"Please Enter Username\"), input(\"Please Enter Password\")))\n@menu([\"Option One\", \"Option Two\", \"Exit\"])\ndef choice_handler(choice):\n [...]\n\nchoice_handler()\n```\nYou can supply the first argument with a boolean - if true, the function will run. Else, it won't.\nIf you supply the first argument with a function, you must supply the second argument with True.", "description_content_type": "", "docs_url": null, "download_url": "https://github.com/bentechy66/arbitrium/archive/v_01.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/bentechy66/arbitrium", "keywords": "MENU,EASY,BEGINNER-FRIENDLY", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "arbitrium", "package_url": "https://pypi.org/project/arbitrium/", "platform": "", "project_url": "https://pypi.org/project/arbitrium/", "project_urls": { "Download": "https://github.com/bentechy66/arbitrium/archive/v_01.tar.gz", "Homepage": "https://github.com/bentechy66/arbitrium" }, "release_url": "https://pypi.org/project/arbitrium/1.1.4/", "requires_dist": null, "requires_python": "", "summary": "Arbitrium - The Easy Menu System For Python", "version": "1.1.4" }, "last_serial": 4400230, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "7833684bd368aef340790b978191ea0f", "sha256": "fd6754b4bdbc302b2506b4ae8f49bfd9af4467a8081494b4e1dac9842d2552ee" }, "downloads": -1, "filename": "arbitrium-1.0.0.tar.gz", "has_sig": false, "md5_digest": "7833684bd368aef340790b978191ea0f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1722, "upload_time": "2018-10-21T17:30:16", "url": "https://files.pythonhosted.org/packages/04/f9/fadc5c8bcd6119166271543c89d5e09f72af46c8c6caffa59954e9dc91cd/arbitrium-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "9828099c23d03b8b87c8d0e97e8e99cc", "sha256": "4f8dbde3aa15306180330ca78ab1448f544510edd3bc038a1eda2b9070c845df" }, "downloads": -1, "filename": "arbitrium-1.1.0.tar.gz", "has_sig": false, "md5_digest": "9828099c23d03b8b87c8d0e97e8e99cc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2252, "upload_time": "2018-10-21T18:42:01", "url": "https://files.pythonhosted.org/packages/9d/65/c199f3ed2343238f8edf47d685bcf491619b65594f97e85e952d34abec11/arbitrium-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "2bc0b796d33a668be889f01b3f1eca25", "sha256": "52246d1bfe512f0573219e0403732f55ca2b283f6de68fd384aafed1663b3bb7" }, "downloads": -1, "filename": "arbitrium-1.1.1.tar.gz", "has_sig": false, "md5_digest": "2bc0b796d33a668be889f01b3f1eca25", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2251, "upload_time": "2018-10-21T18:45:37", "url": "https://files.pythonhosted.org/packages/f0/ff/2efcb49cc40cd36ab6fabac1fb6fadf83e405a291e38aaf2c366334637b4/arbitrium-1.1.1.tar.gz" } ], "1.1.2": [ { "comment_text": "", "digests": { "md5": "8e1ccc2dac11c3344898ab227d408da3", "sha256": "6ed45a2a36c84306ee526f3db6755fef0b55fe136b9d8285ccfdd11817358e18" }, "downloads": -1, "filename": "arbitrium-1.1.2.tar.gz", "has_sig": false, "md5_digest": "8e1ccc2dac11c3344898ab227d408da3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2050, "upload_time": "2018-10-21T18:51:30", "url": "https://files.pythonhosted.org/packages/7d/cc/2d5b8ecd9b4f3f85e9cc598d9e7b0ff5fcfa6f12750936c774ed2e593bc8/arbitrium-1.1.2.tar.gz" } ], "1.1.3": [ { "comment_text": "", "digests": { "md5": "c081f1d4438812f56c6ad1301917ef16", "sha256": "cd81f4ad49df894fbb95fd22a0012c86a36988c96ba6c15ddf8f3a1bd5a52b27" }, "downloads": -1, "filename": "arbitrium-1.1.3.tar.gz", "has_sig": false, "md5_digest": "c081f1d4438812f56c6ad1301917ef16", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2043, "upload_time": "2018-10-21T19:07:22", "url": "https://files.pythonhosted.org/packages/33/f8/30d648fc3bffe46b03759d86e6e936c902003cfd2e56fa625b38c80a3570/arbitrium-1.1.3.tar.gz" } ], "1.1.4": [ { "comment_text": "", "digests": { "md5": "e198d523d9f39c9442a9e07fe3ad6a86", "sha256": "d79263a6a11a4268db01e9a786f1a1ca8cccb961e030abd62b38b55422e7caa2" }, "downloads": -1, "filename": "arbitrium-1.1.4.tar.gz", "has_sig": false, "md5_digest": "e198d523d9f39c9442a9e07fe3ad6a86", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3109, "upload_time": "2018-10-21T19:27:20", "url": "https://files.pythonhosted.org/packages/16/37/164e3af21c0f067d843ef1576a8bb6a9aa6efbc0e05b174cd3fc2ae29fb0/arbitrium-1.1.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e198d523d9f39c9442a9e07fe3ad6a86", "sha256": "d79263a6a11a4268db01e9a786f1a1ca8cccb961e030abd62b38b55422e7caa2" }, "downloads": -1, "filename": "arbitrium-1.1.4.tar.gz", "has_sig": false, "md5_digest": "e198d523d9f39c9442a9e07fe3ad6a86", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3109, "upload_time": "2018-10-21T19:27:20", "url": "https://files.pythonhosted.org/packages/16/37/164e3af21c0f067d843ef1576a8bb6a9aa6efbc0e05b174cd3fc2ae29fb0/arbitrium-1.1.4.tar.gz" } ] }