{ "info": { "author": "Andy Dirnberger", "author_email": "dirn@dirnonline.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "=======================================\nSwitches: Friendly Command Line Scripts\n=======================================\n\nA user-friendly way to define and process command line scripts.\n\nUsage\n=====\n\nexample.py::\n\n \"\"\"Build commands with switches\"\"\"\n\n from switches import command, commandline\n\n\n @command\n def spam(argument1, argument2=None):\n \"\"\"Print the arguments\"\"\"\n print argument1\n if argument2 is not None:\n print argument2\n\n\n @command\n def eggs(argument1=True, argument2=False):\n \"\"\"Conditionally print the arguments\"\"\"\n if argument1:\n print 'argument1 is True'\n if argument2:\n print 'argument2 is True'\n\n\n if __name__ == '__main__':\n commandline(__doc__)\n\nOn the command line::\n\n $ python example.py --help\n usage: example.py [-h] {eggs,spam} ...\n\n Build commands with switches\n\n positional arguments:\n {eggs,spam} commands\n eggs Conditionally print the arguments\n spam Print the arguments\n\n optional arguments:\n -h, --help show this help message and exit\n\n $ python example.py spam --help\n usage: example.py spam [-h] [--argument2 ARGUMENT2] argument1\n\n positional arguments:\n argument1\n\n optional arguments:\n -h, --help show this help message and exit\n --argument2 ARGUMENT2\n The default value is \"None\".\n\n $ python example.py eggs --help\n usage: example.py eggs [-h] [--argument1 ARGUMENT1] [--argument2 ARGUMENT2]\n\n optional arguments:\n -h, --help show this help message and exit\n --argument1 ARGUMENT1\n The default value is \"True\".\n --argument2 ARGUMENT2\n The default value is \"False\".\n\nFull documentation can be found on `Read the Docs`_.\n\n.. _Read the Docs: http://readthedocs.org/docs/switches/en/latest/\n\nInstallation\n============\n\nInstalling Switches is easy::\n\n pip install switches\n\nor download the source and run::\n\n python setup.py install", "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/dirn/switches", "keywords": null, "license": "Copyright (c) 2012, Andy Dirnberger\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n 1. Redistributions of source code must retain the above copyright notice,\n this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n\n 3. Neither the name of the project nor the names of its contributors may\n be used to endorse or promote products derived from this software without\n specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.", "maintainer": null, "maintainer_email": null, "name": "switches", "package_url": "https://pypi.org/project/switches/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/switches/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/dirn/switches" }, "release_url": "https://pypi.org/project/switches/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "Friendly Command Line Scripts", "version": "0.1.1" }, "last_serial": 745624, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "483ef3ceaae89fbc32d18b0ed69cb6e9", "sha256": "ac7bb23435ef4333618c2cd4f950795a2c9e0a5dccce78098746c750765945df" }, "downloads": -1, "filename": "switches-0.1.0.tar.gz", "has_sig": false, "md5_digest": "483ef3ceaae89fbc32d18b0ed69cb6e9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3839, "upload_time": "2012-06-11T02:45:23", "url": "https://files.pythonhosted.org/packages/c5/73/9f6fb674aab82d762711d0a793ff8bdb112aabe7a994172d24015ddc131c/switches-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "b3b7458520b5feefc43c0532f6a27560", "sha256": "3a05e077fa47f55383bcf76595ecd63c14be301a7b5aea67f95be82939b733e2" }, "downloads": -1, "filename": "switches-0.1.1.tar.gz", "has_sig": false, "md5_digest": "b3b7458520b5feefc43c0532f6a27560", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4173, "upload_time": "2012-06-13T05:34:50", "url": "https://files.pythonhosted.org/packages/b6/39/22232dd2588d26a58073f18175060c2753e6f2c18e168577f632f45e206e/switches-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b3b7458520b5feefc43c0532f6a27560", "sha256": "3a05e077fa47f55383bcf76595ecd63c14be301a7b5aea67f95be82939b733e2" }, "downloads": -1, "filename": "switches-0.1.1.tar.gz", "has_sig": false, "md5_digest": "b3b7458520b5feefc43c0532f6a27560", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4173, "upload_time": "2012-06-13T05:34:50", "url": "https://files.pythonhosted.org/packages/b6/39/22232dd2588d26a58073f18175060c2753e6f2c18e168577f632f45e206e/switches-0.1.1.tar.gz" } ] }