{ "info": { "author": "Johan Nestaas", "author_email": "johannestaas@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Environment :: MacOS X", "Environment :: Win32 (MS Windows)", "Environment :: X11 Applications :: Qt", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python" ], "description": "inter\n=====\n\nToolset for interactive command-line applications\n\n``inter`` is a utility for providing an interactive command line interface.\nYou can use it to ask question and coerce values into ints, floats, boolean values,\nand you have a number of options like specifying integer and floating point constraints,\nsetting the color of the question text, and specifying default values.\n\nInstallation\n------------\n\ninter is installable through pip. To install to your system, just run::\n\n $ sudo pip install inter\n\nor to install from source, run::\n\n $ python setup.py install\n\nUsage\n-----\n\ninter is easy to use in your python scripts. Check the following example::\n\n from inter import Interact\n\n cli = Interact()\n\n # Takes a string from the user and strips the whitespace, and lowercase it.\n first_name = cli.ask_str('enter your first name', strip=True, lower=True)\n\n # title=True will take input like \"hey there\" and return \"Hey There\"\n full_name = cli.ask_str('enter your full name', strip=True, title=True)\n\n # Prints \"whats your age: \" and gives an error message regarding min and max\n # if the user fails to enter a value within that range.\n age = cli.ask_int('whats your age', min=1, max=120)\n\n # Prints \"are you in the US [yn]: \"\n in_the_us = cli.ask_bool('are you in the US')\n\n # Prints \"are you a developer [Yn]: \"\n # If user provides no input, default True is returned. Otherwise it checks for\n # \"yes\", \"y\", \"true\", or \"no\", \"n\", \"false\" and if it receives none of those,\n # it will print an error message in red.\n developer = cli.ask_bool('are you a developer', default=True)\n\n # Asks for a path to a file that doesn't exist and is creatable\n new_path = cli.ask_path('path to file ill create', exists=False, creatable=True)\n\n # Asks for path to a directory that it can add files inside\n inside_dir = cli.ask_path('path to dir i will write in', is_dir=True, writeable=True)\n\n # Asks for path to a file it can read but cant write to and exists as a file\n readable = cli.ask_path('i can read but not write this file', readable=True,\n writeable=False, is_file=True)\n\n\nRelease Notes\n-------------\n\n:0.1.4:\n bugfixes for ask_str default and more python 2.7 compatibility\n:0.1.3:\n Make python 2.7 compatible with print as function\n:0.1.2:\n Add ``Interact.print`` and ``Interact.exit``\n:0.1.1:\n Fix path stuff\n:0.1.0:\n Alpha release with usable int/float/bool/str tooling.\n:0.0.1:\n Project created", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://www.bitbucket.org/johannestaas/inter", "keywords": "", "license": "GPLv3+", "maintainer": "", "maintainer_email": "", "name": "inter", "package_url": "https://pypi.org/project/inter/", "platform": "", "project_url": "https://pypi.org/project/inter/", "project_urls": { "Homepage": "https://www.bitbucket.org/johannestaas/inter" }, "release_url": "https://pypi.org/project/inter/0.1.5/", "requires_dist": null, "requires_python": "", "summary": "Toolset for interactive command-line applications", "version": "0.1.5" }, "last_serial": 4088041, "releases": { "0.0.1": [], "0.1.0": [ { "comment_text": "", "digests": { "md5": "d21ab09167edd1eda1d6833754862134", "sha256": "5f0c99c011c0f77d8e6f7f64877883301070a6acd8aebea067ea369e6d7e2b13" }, "downloads": -1, "filename": "inter-0.1.0.tar.gz", "has_sig": false, "md5_digest": "d21ab09167edd1eda1d6833754862134", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6630, "upload_time": "2017-04-28T09:57:58", "url": "https://files.pythonhosted.org/packages/fe/4f/f64bc100714487944cafc8beb9aaaf9b9f3289199079b7b81fa3cc581fe9/inter-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "82714d5c6424a6a3f09774783288a327", "sha256": "d70a75535c5c70e94d0e6f64f836e8a85483ea5cae97055e9396c435c60a6d7e" }, "downloads": -1, "filename": "inter-0.1.1.tar.gz", "has_sig": false, "md5_digest": "82714d5c6424a6a3f09774783288a327", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6884, "upload_time": "2017-04-28T10:22:47", "url": "https://files.pythonhosted.org/packages/cb/b4/111f0b354a399730a6414fe365f46db639b7fa93b7e34e42076ca8a4b260/inter-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "eb3e0d65519867bc3d99001e0082423c", "sha256": "4386f964a4168cf45f5772fca47864b4531c300eebd46351c01e20da61e1e29a" }, "downloads": -1, "filename": "inter-0.1.2.tar.gz", "has_sig": false, "md5_digest": "eb3e0d65519867bc3d99001e0082423c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7027, "upload_time": "2017-05-02T09:09:45", "url": "https://files.pythonhosted.org/packages/13/25/d183be819b2012926a9e030ee625495d8ed040464c7fe1d86c792a3e2c04/inter-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "c5ea1ee8b69f7a0993dc0e356c24c415", "sha256": "6f122bd60d619c9d4642013d1f992b9ecd150e2491e21ea565a7d1539b30176a" }, "downloads": -1, "filename": "inter-0.1.3.tar.gz", "has_sig": false, "md5_digest": "c5ea1ee8b69f7a0993dc0e356c24c415", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7090, "upload_time": "2017-05-08T06:59:33", "url": "https://files.pythonhosted.org/packages/82/f6/a878736212e4a3f2a5811f00e65475ee0e5d083d9f821e4a8489b2f71481/inter-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "d412a489ccf2ff72e565bc0ef4aacaf3", "sha256": "1e5e35683d7798dffe50200f4595a7efb56363acf2ff6bf3a37372ae6f800cc3" }, "downloads": -1, "filename": "inter-0.1.4.tar.gz", "has_sig": false, "md5_digest": "d412a489ccf2ff72e565bc0ef4aacaf3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7163, "upload_time": "2017-05-08T07:06:18", "url": "https://files.pythonhosted.org/packages/d5/b2/4ae8650f513222d7a3ec44251dab70fb9a111731c9957ddf4063e051f493/inter-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "bd12cbd82242206e3e0d9b113fe4e57e", "sha256": "974c5a96d7167fc1eca850a6c1dc877a4c979702258df0f5fc6e3d689ef44c90" }, "downloads": -1, "filename": "inter-0.1.5.tar.gz", "has_sig": false, "md5_digest": "bd12cbd82242206e3e0d9b113fe4e57e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7166, "upload_time": "2018-07-21T08:07:09", "url": "https://files.pythonhosted.org/packages/bb/02/36825d5f19053954508f7d852e5f4210237b266dd46b3941cc9710ea67f9/inter-0.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bd12cbd82242206e3e0d9b113fe4e57e", "sha256": "974c5a96d7167fc1eca850a6c1dc877a4c979702258df0f5fc6e3d689ef44c90" }, "downloads": -1, "filename": "inter-0.1.5.tar.gz", "has_sig": false, "md5_digest": "bd12cbd82242206e3e0d9b113fe4e57e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7166, "upload_time": "2018-07-21T08:07:09", "url": "https://files.pythonhosted.org/packages/bb/02/36825d5f19053954508f7d852e5f4210237b266dd46b3941cc9710ea67f9/inter-0.1.5.tar.gz" } ] }