{ "info": { "author": "Gregory Petukhov", "author_email": "lorien@lorien.name", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Utilities" ], "description": "=================\nRunscript package\n=================\n\nIt is not a rare case when the project has a few tasks to run periodically or at certain times e.g. deploying the project on the server or initial generation of data for new work place. Runscript package provides simple `run` utility that you can use to run your tasks. The `run` command is nothing more than launcher of the `main()` function of one of your scripts stored in predefined directory. Also `run` utility slightly simplifies the handling of command line arguments.\n\n\nReal world example\n==================\n\nSuppose you need to save some data from database into text file. For example, you have some web-site with user accounts and you want to dump the ID of each user account and also its email. Also you want to be able to choose the country of accounts to dump. Create \"script/\" directory in the root of your project and then create the file \"script/dump.py\" with content::\n\n import pymongo\n\n def setup_arg_parser(parser):\n parser.add_argument('-c', '--count')\n\n def main(count, **kwargs):\n with open('export/user.csv', 'w') as out:\n for user in db.user.find({'country': country}):\n out.write('%s:%s\\n' % (user['_id'], user['email'])) \n\n\nFew words about what is going here. The value of `parser` option that is passed to `setup_arg_parser` is the instance of `ArgumentParser` class. You can add any option you need or just do not specify `setup_arg_parser` in you script. If you define some custom options then their values will be passed in `**kwargs` arguments to your `main` function.\n\nOK, now you can run the following command from the console::\n\n $ run dump\n\nThat's all :) Of course this is not the rocket science, but I found that this simple script launcher saved me a lot of time.\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/lorien/runscript", "keywords": "script cli utility run launch task", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "runscript", "package_url": "https://pypi.org/project/runscript/", "platform": "", "project_url": "https://pypi.org/project/runscript/", "project_urls": { "Homepage": "http://github.com/lorien/runscript" }, "release_url": "https://pypi.org/project/runscript/0.2.8/", "requires_dist": null, "requires_python": "", "summary": "Simple script launcher", "version": "0.2.8" }, "last_serial": 5497598, "releases": { "0.1.1": [], "0.2.0": [ { "comment_text": "", "digests": { "md5": "08d36f832ebe7ec47d89e02e5f4cb430", "sha256": "c88f26f044caf1c6f38c1af002f06c7edccc2d04851908d1f3f0e300bed82cb6" }, "downloads": -1, "filename": "runscript-0.2.0.tar.gz", "has_sig": false, "md5_digest": "08d36f832ebe7ec47d89e02e5f4cb430", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4823, "upload_time": "2015-01-25T12:01:35", "url": "https://files.pythonhosted.org/packages/d6/ec/e71956a35aafc1f2167bb4cb50b6760961d2180deb752ab5f8e9d0b8dd0c/runscript-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "7b3eec1eb764cdd76a2476af6d686a1c", "sha256": "5ba1529fc44f9beb33c0b417113de710e3d418b9ffff6ff835d97c88fb733e4f" }, "downloads": -1, "filename": "runscript-0.2.1.tar.gz", "has_sig": false, "md5_digest": "7b3eec1eb764cdd76a2476af6d686a1c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4808, "upload_time": "2015-01-26T14:08:25", "url": "https://files.pythonhosted.org/packages/05/7a/66b93398d1f4fc6377f27ad330db1614295b2f3b0d6d35ffe520d137423d/runscript-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "2ed9c7913b7ce8322a4de1cbbf4011e8", "sha256": "ccaa632abd5e2b10b86979ca24aca124e293895aaf091ddb29b9004110a2000e" }, "downloads": -1, "filename": "runscript-0.2.2.tar.gz", "has_sig": false, "md5_digest": "2ed9c7913b7ce8322a4de1cbbf4011e8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4611, "upload_time": "2015-01-28T22:01:28", "url": "https://files.pythonhosted.org/packages/ec/ac/b50debbd6ac07bd33faa51c2725270bb86333999779d7fd03bddb173e2a0/runscript-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "a586a05e4582c9a95bd708752ec5f367", "sha256": "3ca67c0039d11269e996c5007d2661389a1ef1c5e549295281fa0b16c607b26a" }, "downloads": -1, "filename": "runscript-0.2.3.tar.gz", "has_sig": false, "md5_digest": "a586a05e4582c9a95bd708752ec5f367", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4679, "upload_time": "2015-11-24T05:06:31", "url": "https://files.pythonhosted.org/packages/c8/f3/69e58aadb6c29dfac61de07e15d22bcb248064c0053ab04a27a641ec76dd/runscript-0.2.3.tar.gz" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "efed92549cbe6efbe5c3003919da92b8", "sha256": "3d6b3df79b10cb5d6deb8eb069aae9878f3fa228299095f29fb154ef1c79ea90" }, "downloads": -1, "filename": "runscript-0.2.5.tar.gz", "has_sig": false, "md5_digest": "efed92549cbe6efbe5c3003919da92b8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4831, "upload_time": "2017-01-21T06:59:59", "url": "https://files.pythonhosted.org/packages/0d/0a/98fd8a0f6bde5a57fc1a616eb2c8ba4288e28ecdfb58ed7b09c88c62437b/runscript-0.2.5.tar.gz" } ], "0.2.6": [ { "comment_text": "", "digests": { "md5": "afc52e92a9c7e585d2f2c5d687aabdbe", "sha256": "37c6c01faad74911a1f74b2ed2f617d15d0dbb1d459ce6b92acb116ca0063a84" }, "downloads": -1, "filename": "runscript-0.2.6.tar.gz", "has_sig": false, "md5_digest": "afc52e92a9c7e585d2f2c5d687aabdbe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4807, "upload_time": "2017-01-21T07:36:53", "url": "https://files.pythonhosted.org/packages/2e/ef/871b0c931a860bfb7b4860b968f0887f73fd4b966ad38ba5cf0dd60709cf/runscript-0.2.6.tar.gz" } ], "0.2.7": [ { "comment_text": "", "digests": { "md5": "4876645fadc403dba306d54d8aa6b7d0", "sha256": "c939126e58cf9f74d162945f887ea33e58ed44fd335a93db22d4b02848516128" }, "downloads": -1, "filename": "runscript-0.2.7.tar.gz", "has_sig": false, "md5_digest": "4876645fadc403dba306d54d8aa6b7d0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4881, "upload_time": "2019-07-07T16:47:22", "url": "https://files.pythonhosted.org/packages/b8/86/1d40b631b45131d552e42369ce5bbf5100a7c5c84605feeb116cf803fa95/runscript-0.2.7.tar.gz" } ], "0.2.8": [ { "comment_text": "", "digests": { "md5": "6095e34912bfa8ee4e3664d35701353b", "sha256": "404bb6af06a6e448ea4890def98c760be9c3eada0e143a675fe7f9cf4c464fce" }, "downloads": -1, "filename": "runscript-0.2.8.tar.gz", "has_sig": false, "md5_digest": "6095e34912bfa8ee4e3664d35701353b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4991, "upload_time": "2019-07-07T17:14:11", "url": "https://files.pythonhosted.org/packages/59/73/aa64220cf33d68c769db252ae154896276f1f92d6e1787d070bc23d80c68/runscript-0.2.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6095e34912bfa8ee4e3664d35701353b", "sha256": "404bb6af06a6e448ea4890def98c760be9c3eada0e143a675fe7f9cf4c464fce" }, "downloads": -1, "filename": "runscript-0.2.8.tar.gz", "has_sig": false, "md5_digest": "6095e34912bfa8ee4e3664d35701353b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4991, "upload_time": "2019-07-07T17:14:11", "url": "https://files.pythonhosted.org/packages/59/73/aa64220cf33d68c769db252ae154896276f1f92d6e1787d070bc23d80c68/runscript-0.2.8.tar.gz" } ] }