{ "info": { "author": "Stephen Rosen", "author_email": "sirosen@globus.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": ".. image:: https://travis-ci.org/sirosen/tinyprompt.svg?branch=master\n :alt: build status\n :target: https://travis-ci.org/sirosen/tinyprompt\n\n.. image:: https://img.shields.io/pypi/v/tinyprompt.svg\n :alt: Latest Released Version\n :target: https://pypi.org/project/tinyprompt/\n\n.. image:: https://img.shields.io/pypi/pyversions/tinyprompt.svg\n :alt: Supported Python Versions\n :target: https://pypi.org/project/tinyprompt/\n\n.. image:: https://img.shields.io/badge/License-Apache%202.0-blue.svg\n :alt: License\n :target: https://opensource.org/licenses/Apache-2.0\n\n\ntinyprompt\n==========\n\nA tiny lib for nice, handy prompts, primarily for Ops scripts.\n\nThis README contains all documentation.\n\nUsage\n-----\n\n``pip install tinyprompt``\n\nUse `tinyprompt.skippable` to wrap script steps with a `Yes / Skip / Quit`\nprompt. This is very useful for simple scripted operations where\n- `yes` is the normal case\n- `skip` can be used to resume after a failure or abort\n- `quit` is used to abort when issues are encountered\n\n.. code-block:: python\n\n import tinyprompt\n\n # note: tinyprompt.skippable passes arguments through verbatim, but it's\n # not guaranteed to return a meaningful result\n # `quit` does a sys.exit(1) and `skip` makes it return `None`\n\n @tinyprompt.skippable('skippable script step')\n def my_func():\n \"\"\"\n Do some things, this docstring will show up as a command description\n when the script is run.\n The \"skippable script step\" arg will be uppercased and used as the step\n name.\n \"\"\"\n print('this skippable step')\n\n\n @tinyprompt.skippable('other skippable script step', color=False)\n def my_func2():\n \"\"\"another func\"\"\"\n print('hi')\n\n\n def otherfunc():\n # yes, it's on purpose\n tinyprompt.color_print('red string', tinyprompt.RED)\n tinyprompt.color_print('yellow string', tinyprompt.BLUE)\n tinyprompt.color_print('green string', tinyprompt.GRAY)\n tinyprompt.color_print('blue string', tinyprompt.GREEN)\n tinyprompt.color_print('gray string', tinyprompt.YELLOW)\n\n\n def main():\n my_func() # skippable\n my_func2() # skippable\n otherfunc() # not skippable, but not reached on quit\n\n if __name__ == '__main__':\n main()\n\n\nContributing\n------------\n\n- All code must pass `make test`\n- All code is autoformatted with `black` and `isort`\n- Try to write a test whenever you find a bug\n- Make your PRs clean. Rebase to avoid merge conflicts and squash fixup commits", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/sirosen/tinyprompt", "keywords": "cli,prompt,utility", "license": "", "maintainer": "", "maintainer_email": "", "name": "tinyprompt", "package_url": "https://pypi.org/project/tinyprompt/", "platform": "", "project_url": "https://pypi.org/project/tinyprompt/", "project_urls": { "Homepage": "https://github.com/sirosen/tinyprompt" }, "release_url": "https://pypi.org/project/tinyprompt/0.1.0/", "requires_dist": null, "requires_python": "", "summary": "Tiny Handy Prompting Lib", "version": "0.1.0" }, "last_serial": 4446756, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "1a39babf78b5daf1d17b8b474de07a64", "sha256": "cfa6a67b9f31e3a745f262317814b7701cedfd60d4459b17e1b84fbfbba10f6c" }, "downloads": -1, "filename": "tinyprompt-0.1.0.tar.gz", "has_sig": false, "md5_digest": "1a39babf78b5daf1d17b8b474de07a64", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4224, "upload_time": "2018-11-03T05:04:13", "url": "https://files.pythonhosted.org/packages/56/ed/7685ecf5e549536df8a18ea6c3a889835bcd7e391fcc1d056499828d4a31/tinyprompt-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1a39babf78b5daf1d17b8b474de07a64", "sha256": "cfa6a67b9f31e3a745f262317814b7701cedfd60d4459b17e1b84fbfbba10f6c" }, "downloads": -1, "filename": "tinyprompt-0.1.0.tar.gz", "has_sig": false, "md5_digest": "1a39babf78b5daf1d17b8b474de07a64", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4224, "upload_time": "2018-11-03T05:04:13", "url": "https://files.pythonhosted.org/packages/56/ed/7685ecf5e549536df8a18ea6c3a889835bcd7e391fcc1d056499828d4a31/tinyprompt-0.1.0.tar.gz" } ] }