{ "info": { "author": "Alessandro Molina", "author_email": "amol@turbogears.org", "bugtrack_url": null, "classifiers": [ "Framework :: TurboGears", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Internet :: WWW/HTTP :: WSGI", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "About gearbox\n-------------------------\n\nGearbox is a paster command replacement for TurboGears2.\nIt has been created during the process of providing Python3 support to the TurboGears2 web framework,\nwhile still being backward compatible with the existing TurboGears projects.\n\nGearbox is based on a stripped down version of *Cliff* command line framework, you might want\nto consider `Cliff `_ for more advanced use cases\nand custom command interpreters.\n\nInstalling\n-------------------------------\n\ngearbox can be installed from pypi::\n\n easy_install gearbox\n\nor::\n\n pip install gearbox\n\nshould just work for most of the users\n\nOut of The Box\n------------------------------\n\nJust by installing gearbox itself your TurboGears project will be able to use gearbox system wide\ncommands like ``gearbox serve``, ``gearbox setup-app`` and ``gearbox makepackage`` commands.\nThese commands provide a replacement for the paster serve, paster setup-app and paster create commands.\n\nThe main difference with the paster command is usually only that gearbox commands explicitly set the\nconfiguration file using the ``--config`` option instead of accepting it positionally. By default gearbox\nwill always load a configuration file named `development.ini`, this mean you can simply run ``gearbox serve``\nin place of ``paster serve development.ini``\n\nTo have a list of the available commands simply run ``gearbox --help``::\n\n $ gearbox --help\n usage: gearbox [--version] [-v] [--log-file LOG_FILE] [-q] [-h] [--debug]\n\n TurboGears2 Gearbox toolset\n\n optional arguments:\n --version show program's version number and exit\n -v, --verbose Increase verbosity of output. Can be repeated.\n --log-file LOG_FILE Specify a file to log output. Disabled by default.\n -q, --quiet suppress output except warnings and errors\n -h, --help show this help message and exit\n --debug show tracebacks on errors\n\n Commands:\n help print detailed help for another command\n makepackage Creates a basic python package\n migrate Handles TurboGears2 Database Migrations\n quickstart Creates a new TurboGears2 project\n serve Serves a web application that uses a PasteDeploy configuration file\n setup-app Setup an application, given a config file\n tgshell Opens an interactive shell with a TurboGears2 app loaded\n scaffold Creates a new file from a scaffold template\n\nThen it is possible to ask for help for a given command by using ``gearbox help command``::\n\n $ gearbox help serve\n usage: gearbox serve [-h] [-n NAME] [-s SERVER_TYPE]\n [--server-name SECTION_NAME] [--daemon]\n [--pid-file FILENAME] [--reload]\n [--reload-interval RELOAD_INTERVAL] [--monitor-restart]\n [--status] [--user USERNAME] [--group GROUP]\n [--stop-daemon] [-c CONFIG_FILE]\n [args [args ...]]\n\n Serves a web application that uses a PasteDeploy configuration file\n\n positional arguments:\n args\n\n optional arguments:\n -h, --help show this help message and exit\n -n NAME, --app-name NAME\n Load the named application (default main)\n -s SERVER_TYPE, --server SERVER_TYPE\n Use the named server.\n --server-name SECTION_NAME\n Use the named server as defined in the configuration\n file (default: main)\n --daemon Run in daemon (background) mode\n --pid-file FILENAME Save PID to file (default to gearbox.pid if running in\n daemon mode)\n --reload Use auto-restart file monitor\n --reload-interval RELOAD_INTERVAL\n Seconds between checking files (low number can cause\n significant CPU usage)\n --monitor-restart Auto-restart server if it dies\n --status Show the status of the (presumably daemonized) server\n --user USERNAME Set the user (usually only possible when run as root)\n --group GROUP Set the group (usually only possible when run as root)\n --stop-daemon Stop a daemonized server (given a PID file, or default\n gearbox.pid file)\n -c CONFIG_FILE, --config CONFIG_FILE\n application config file to read (default:\n development.ini)\n\n\nDevelopment Tools Commands\n-------------------------------\n\nInstalling the TurboGears 2.3 development tools you will get access some some gearbox commands specific\nto TurboGears2 projects management, those are the ``gearbox quickstart``, ``gearbox tgshell`` and\n``gearbox migrate`` commands.\n\nWhile the *quickstart* command will be automatically available, you will have to enable project scope plugins\nfor gearbox before the other two became available. This will let gearbox know that you are running it inside\na TurboGears2 project and so that the commands that only make sense for TurboGears2 projects will became available.\n\nEnabling migrate and tgshell commands\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nTo enable ``gearbox migrate`` and ``gearbox tgshell`` commands make sure that your *setup.py* `entry_points`\nlook like::\n\n entry_points={\n 'paste.app_factory': [\n 'main = makonoauth.config.middleware:make_app'\n ],\n 'gearbox.plugins': [\n 'turbogears-devtools = tg.devtools'\n ]\n }\n\nThe **paste.app_factory** section will let ``gearbox serve`` know how to create the application that\nhas to be served. Gearbox relies on PasteDeploy for application setup, so it required a paste.app_factory\nsection to be able to correctly load the application.\n\nWhile the **gearbox.plugins** section will let *gearbox* itself know that inside that directory the tg.devtools\ncommands have to be enabled making ``gearbox tgshell`` and ``gearbox migrate`` available when we run gearbox\nfrom inside our project directory.\n\nGearbox Interactive Mode\n-------------------------------\n\nBy default launching gearbox without any subcommand will start the interactive mode.\nThis provides an interactive prompt where gearbox commands, system shell commands and python statements\ncan be executed. If you have any doubt about what you can do simply run the ``help`` command to get\na list of the commands available (running ``help somecommand`` will provide help for the given sub command).\n\nGearbox HTTP Servers\n------------------------------\n\nIf you are moving your TurboGears2 project from paster you will probably end serving your\napplication with Paste HTTP server even if you are using the ``gearbox serve`` command.\n\nThe reason for this behavior is that gearbox is going to use what is specified inside\nthe **server:main** section of your *.ini* file to serve your application.\nTurboGears2 projects quickstarted before 2.3 used Paste and so the projects is probably\nconfigured to use Paste#http as the server. This is not an issue by itself, it will just require\nyou to have Paste installed to be able to serve the application, to totally remove the Paste\ndependency simply replace **Paste#http** with **gearbox#wsgiref**.\n\nThe **gearbox#wsgiref** also supports an experimental multithreaded version that\ncan be enabled by setting the ``wsgiref.threaded = true`` option in your server\nconfiguration section.\n\nServing with GEvent\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nGearbox cames with builtin support for gevent, so serving an application under Gevent\nis just a matter of using **gearbox#gevent** as your server inside the **server:main** section\nof the configuration file.\n\nThe gearbox gevent server will automatically monkeypatch all the python modules apart\nfrom the DNS related functions before loading your application.\nNot much more apart making sure that your code is gevent compatible is required.\n\nScaffolding\n-----------\n\nScaffolding is the process of creating a new component of your web application \nthrough a template or preset.\n\nThe ``gearbox scaffold`` command permits to create new files from scaffolds (file templates)\nwhich you can place inside your project itself. Scaffold files should be named with\n``.template`` extension and can be used by running::\n\n $ gearbox scaffold templatename target\n\nThis will create a ``target`` file (do not provide the extension, that is specified inside\nthe templatename itself) starting from the ``templatename`` scaffold.\n\nA tipical scaffold filename will be named like ``model.py.template`` and will look like::\n\n class {{target.capitalize()}}(DeclarativeBase):\n __tablename__ = '{{target.lower()}}s'\n\n uid = Column(Integer, primary_key=True)\n data = Column(Unicode(255), nullable=False)\n\nPatching\n--------\n\n``patch`` is one of the few builtin commands of Gearbox and is commonly used to\nupdate code. You can think of it as an easier to used sed command mixed with python.\n\nHere are a few examples, this will replace all xi:include occurrences\nwith py:extends in all the template files recursively::\n\n $ gearbox patch -R '*.html' xi:include -r py:extends\n\nIt is also possible to rely on regex and python for more complex\nreplacements, like updating the Copyright year in your documentation::\n\n $ gearbox patch -R '*.rst' -x 'Copyright(\\s*)(\\d+)' -e -r '\"Copyright\\\\g<1>\"+__import__(\"datetime\").datetime.utcnow().strftime(\"%Y\")'\n\nPlease refer to ``gearbox help patch`` for available options.\n\n\nWriting new gearbox commands\n----------------------------\n\nGearbox will automatically load any command registered as a setuptools entry point with\n``gearbox.commands`` key. To create a new command you must subclass the ``gearbox.command.Command``\nclass, override the ``get_parser`` and ``take_action`` methods to provide custom options and\na custom behaviour::\n\n class MyCcommand(Command):\n def take_action(self, opts):\n print('Hello World!')\n\nThen register your command in the setup.py entry points of your package::\n\n setup(name='mydistribution',\n entry_points={\n 'gearbox.commands': [\n 'mycommand = mypackage.commands:MyCommand',\n ]\n })\n\nTemplate Based Commands\n~~~~~~~~~~~~~~~~~~~~~~~\n\nWriting new gearbox template commands is as simple as creating a **gearbox.command.TemplateCommand** subclass and\nplace it inside a *command.py* file in a python package.\n\nInherit from the class and implement the *get_description*, *get_parser* and *take_action* methods\nas described by the documentation.\n\nThe only difference is that your *take_action* method has to end by calling ``self.run_template(output_dir, opts)``\nwhere *output_dir* is the directory where the template output has to be written and *opts* are the command options\nas your take_action method received them.\n\nWhen the run_template command is called Gearbox will automatically run the **template**\ndirectory in the same package where the command was available.\n\nEach file ending with the *_tmpl* syntax will be processed with the Tempita template engine and\nwhenever the name of a file or directory contains *+optname+* it will be substituted with the\nvalue of the option having the same name (e.g., +package+ will be substituted with the value\nof the --package options which will probably end being the name of the package).\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/TurboGears/gearbox", "keywords": "web framework command-line setup", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "gearbox", "package_url": "https://pypi.org/project/gearbox/", "platform": "", "project_url": "https://pypi.org/project/gearbox/", "project_urls": { "Homepage": "https://github.com/TurboGears/gearbox" }, "release_url": "https://pypi.org/project/gearbox/0.2.0/", "requires_dist": null, "requires_python": "", "summary": "Command line toolkit born as a PasteScript replacement for the TurboGears2 web framework", "version": "0.2.0" }, "last_serial": 4817625, "releases": { "0.0.10": [ { "comment_text": "", "digests": { "md5": "eeef491b485c5b990f30164a9de8d9bc", "sha256": "0eefd9d8c718e2909ca4480ce7370991047b5c4da5b0574ebd6f9b351fd3b156" }, "downloads": -1, "filename": "gearbox-0.0.10.tar.gz", "has_sig": false, "md5_digest": "eeef491b485c5b990f30164a9de8d9bc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25549, "upload_time": "2015-11-05T21:29:15", "url": "https://files.pythonhosted.org/packages/1f/53/02f083707f2a64b438443a0289856f4d0c7ca6fe5ee57c98318fc63f2d26/gearbox-0.0.10.tar.gz" } ], "0.0.11": [ { "comment_text": "", "digests": { "md5": "4fe2dbca82129abd99011d0267ef0e90", "sha256": "c71b7872fd9fec10ebe54632d1213a77efe09e385b29576b4393f9d239b96cc2" }, "downloads": -1, "filename": "gearbox-0.0.11.tar.gz", "has_sig": false, "md5_digest": "4fe2dbca82129abd99011d0267ef0e90", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25778, "upload_time": "2015-11-09T10:50:40", "url": "https://files.pythonhosted.org/packages/3b/8f/d371aade4526098b85677e4f5d8796681ca03e890dfa2c058f7ad7f066a9/gearbox-0.0.11.tar.gz" } ], "0.0.1a": [ { "comment_text": "", "digests": { "md5": "fdbf80af37507c2af72fd6e170fef263", "sha256": "5277cb0c1883c95228f0288b4392f7a2d582222dae8f1427bc9b5c283ff873de" }, "downloads": -1, "filename": "gearbox-0.0.1a.tar.gz", "has_sig": false, "md5_digest": "fdbf80af37507c2af72fd6e170fef263", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21212, "upload_time": "2013-01-31T21:05:52", "url": "https://files.pythonhosted.org/packages/80/62/1efe8ad8ad586a46021e199527dd2cf4e959d091d053ef0e1924c9c19aa0/gearbox-0.0.1a.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "b59ee7bd95fc5c06b9d752386d37a7d1", "sha256": "ee41ad39d59a2ccb8b68a26fca6efc45e7a1726a193b962ce196e31d14a5a268" }, "downloads": -1, "filename": "gearbox-0.0.2.tar.gz", "has_sig": false, "md5_digest": "b59ee7bd95fc5c06b9d752386d37a7d1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21559, "upload_time": "2013-04-19T19:53:59", "url": "https://files.pythonhosted.org/packages/93/a1/503ae4965c24cd7feae1414f85031646eb8a118db33c28b599e6536c4e19/gearbox-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "f1a571f82e23dc4e763ccb5072c415df", "sha256": "324f62b37d8c2cc5d2735cf61bad844b7e156ed1551bdd2be5018f6f55d1100f" }, "downloads": -1, "filename": "gearbox-0.0.3.tar.gz", "has_sig": false, "md5_digest": "f1a571f82e23dc4e763ccb5072c415df", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21610, "upload_time": "2013-12-09T11:26:50", "url": "https://files.pythonhosted.org/packages/a9/d8/b15c715b9381115321d2dfb43c3368198e899c009e0eeb429c7afe05f19f/gearbox-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "dca9ccc151fa1219dfa675a4d063c09c", "sha256": "1f91493ddb5f6a5b286e05411aee263093c8f99ed414164a14b5278bd008b034" }, "downloads": -1, "filename": "gearbox-0.0.4.tar.gz", "has_sig": false, "md5_digest": "dca9ccc151fa1219dfa675a4d063c09c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21633, "upload_time": "2014-01-07T00:59:28", "url": "https://files.pythonhosted.org/packages/22/c0/3f496b2b5035934c6b019bc2097251305380424ac7a8fe36c5e166f0301a/gearbox-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "4b60a96a416d78be922fe3bfe9850e16", "sha256": "d0a840b97635148a5781c61877cad98b670fc23deff732356c60c0e966149d51" }, "downloads": -1, "filename": "gearbox-0.0.5.tar.gz", "has_sig": false, "md5_digest": "4b60a96a416d78be922fe3bfe9850e16", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21664, "upload_time": "2014-02-05T21:49:22", "url": "https://files.pythonhosted.org/packages/63/68/549e2a5ce7d7deb45c877196ab835fd5024dfbf9b49e0edb04d8f93f597c/gearbox-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "a97091bccd468ffe83fb2ed1be999267", "sha256": "3e89731d7dc5c614f06de42fb4435a729bc8320615eaf54a9c323f955670ec3a" }, "downloads": -1, "filename": "gearbox-0.0.6.tar.gz", "has_sig": false, "md5_digest": "a97091bccd468ffe83fb2ed1be999267", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21791, "upload_time": "2014-03-10T20:24:10", "url": "https://files.pythonhosted.org/packages/85/f3/e375a6eeb696e9b891481d492fb3030967527afe6767482476bc7d31345a/gearbox-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "541416d2a5858a180b392d3099df4c3c", "sha256": "96a840ae26bf097f8065a6034e884725f3e1b0b35b5e6504c0fd114f5bc5addf" }, "downloads": -1, "filename": "gearbox-0.0.7.tar.gz", "has_sig": false, "md5_digest": "541416d2a5858a180b392d3099df4c3c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23625, "upload_time": "2015-02-05T14:40:41", "url": "https://files.pythonhosted.org/packages/49/08/a463468471e373f9cea892c2318fd012c58ace78c0bfa18a3ee32194277f/gearbox-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "fc381dc814aa77d91dea9f465adaa604", "sha256": "70ef98ced30031f81c3971dc6f71286f4667de2a1a31ffd2926ce416a7d28ef2" }, "downloads": -1, "filename": "gearbox-0.0.8.tar.gz", "has_sig": false, "md5_digest": "fc381dc814aa77d91dea9f465adaa604", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25334, "upload_time": "2015-07-23T14:28:23", "url": "https://files.pythonhosted.org/packages/af/e6/3dd0f5ba146d5f909ccc4be2d161aa055eaa72545c110f7b8a3a860cc0b8/gearbox-0.0.8.tar.gz" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "51a39c097471ef5eb3164206d5e3ba5a", "sha256": "731632b6b1403f028cf58d1b3b2f7de1dc679bde430bd0cf5f5fd90d5e4a4e19" }, "downloads": -1, "filename": "gearbox-0.0.9.tar.gz", "has_sig": false, "md5_digest": "51a39c097471ef5eb3164206d5e3ba5a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25358, "upload_time": "2015-10-12T17:33:37", "url": "https://files.pythonhosted.org/packages/4d/6d/0f4421957bfede2ad32eb795d25df5a62e1d34a2a6f6f69d97b42dc88bc1/gearbox-0.0.9.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "8eba57ce84febe1166032946925d7e6a", "sha256": "17830faf37e23ea5b0636e23b50b6b33ab7122f1fa8f7213442fd781a2f0948f" }, "downloads": -1, "filename": "gearbox-0.1.0.tar.gz", "has_sig": false, "md5_digest": "8eba57ce84febe1166032946925d7e6a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28985, "upload_time": "2016-03-05T17:18:07", "url": "https://files.pythonhosted.org/packages/05/9d/14e91c640adb184eaa650a5175934d73340c9d0297c04a7c3debd8ec1804/gearbox-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "3bc90f4d35b1451250f5e6394f765246", "sha256": "3d31e4796f490c7cccd10353c894a0388260596fc24f0601e57d60be9c610a66" }, "downloads": -1, "filename": "gearbox-0.1.1.tar.gz", "has_sig": false, "md5_digest": "3bc90f4d35b1451250f5e6394f765246", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28986, "upload_time": "2016-03-06T21:31:55", "url": "https://files.pythonhosted.org/packages/01/77/731c12d104a9df980baa4828347882d57a4e39a44d1f5e6c7bd0d627fc11/gearbox-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "c9e495fb44aa6a4e054a50dfa2bfcc89", "sha256": "506a7553440529e288d2e47b78e5a5628f807c3abeb282973ff92c085eb78d11" }, "downloads": -1, "filename": "gearbox-0.2.0.tar.gz", "has_sig": false, "md5_digest": "c9e495fb44aa6a4e054a50dfa2bfcc89", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30427, "upload_time": "2019-02-13T21:46:47", "url": "https://files.pythonhosted.org/packages/27/72/36b4bbbbb705b9b3ccad1199a64185a91183e079673d1383dd329aefd209/gearbox-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c9e495fb44aa6a4e054a50dfa2bfcc89", "sha256": "506a7553440529e288d2e47b78e5a5628f807c3abeb282973ff92c085eb78d11" }, "downloads": -1, "filename": "gearbox-0.2.0.tar.gz", "has_sig": false, "md5_digest": "c9e495fb44aa6a4e054a50dfa2bfcc89", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30427, "upload_time": "2019-02-13T21:46:47", "url": "https://files.pythonhosted.org/packages/27/72/36b4bbbbb705b9b3ccad1199a64185a91183e079673d1383dd329aefd209/gearbox-0.2.0.tar.gz" } ] }