{ "info": { "author": "Colm O'Connor", "author_email": "colm.oconnor.github@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Software Development :: Build Tools" ], "description": "ProjectKey\n==========\n\nProjectKey is a framework to let you write a self-documenting suite of commands in\npython to automate common project tasks.\n\nYou can then run these commands from any folder inside your project by using the 'k'\nkey.\n\nFor example::\n\n $ k help\n Usage: k command [args]\n\n Yourproject development environment commands.\n\n runserver - Run django debug web server on port 8000\n shell - Run django shell.\n upgrade - pip upgrade on all packages and freeze to requirements afterwards.\n smtp - Run development smtp server on port 25025.\n striptrailingwhitespace - strip the trailing whitespace from all files in your mercurial repo.\n inspectfile - Inspect file(s) for pylint violations.\n\n Run 'k help [command]' to get more help on a particular command.\n\n\nThree Step Quickstart\n=====================\n\nStep 1: Install like so::\n\n $ sudo pip install projectkey\n\nStep 2: Create a key.py file in the root folder of your project like this:\n\n.. code-block:: python\n\n #!/usr/bin/python\n \"\"\"Yourproject development environment commands.\"\"\"\n from projectkey import cd, run, run_return, runnable, ignore_ctrlc\n\n def runserver():\n \"\"\"Run django debug web server on port 8080.\"\"\"\n print \"Running webserver...\"\n # Run simple shell commands, assuming you are in the same directory as your key.py file.\n run(\"./venv/bin/python manage.py runserver_plus 8080 --traceback --settings=yourproject.special_settings\")\n\n @ignore_ctrlc # Projectkey will ignore the user pressing ctrl-C when running this command\n def shell():\n \"\"\"Run django shell.\"\"\"\n print \"Running shell...\"\n # ...since you want the python shell to decide what to do with Ctrl-C.\n run(\"./venv/bin/python manage.py shell --settings=yourproject.special_settings\")\n\n def upgrade():\n \"\"\"pip upgrade on all packages and freeze to requirements afterwards.\"\"\"\n # Copy and paste in whole bash scripts if you like...\n run(\"\"\"\n ./venv/bin/pip freeze --local | grep -v '^\\-e' | cut -d = -f 1 | xargs ./venv/bin/pip install -U\n ./venv/bin/pip freeze > ./requirements.txt\n \"\"\")\n\n def smtp():\n \"\"\"Run development smtp server on port 25025.\"\"\"\n print \"Running SMTP server...\"\n run(\"python -m smtpd -n -c DebuggingServer localhost:25025\")\n\n def striptrailingwhitespace():\n \"\"\"strip the trailing whitespace from all files in your mercurial repo.\"\"\"\n # Get the output of shell commands...\n repofiles = run_return(\"hg locate *.py\").split('\\n')\n\n # ...and write simple, short, python scripts to do stuff with it.\n repofiles.remove('')\n for filename in repofiles:\n with open(filename, 'r') as fh:\n new = [line.rstrip() for line in fh]\n with open(filename, 'w') as fh:\n [fh.write('%s\\n' % line) for line in new]\n\n def inspectfile(*filenames):\n \"\"\"Inspect file(s) for pylint violations.\"\"\"\n # You can also change to the directory that the k command was run from, if you need that.\n cd(CWD)\n run(\"{0}/venv/bin/pylint --rcfile={0}/pylintrc -r n {1}\".format(KEYDIR, ' '.join(filenames)))\n\n # Add this and you can run the file directly (e.g. python key.py smtp) as well as by running \"k smtp\".\n runnable(__name__)\n\nStep 3: Run the 'k' command in any folder in your project::\n\n $ k inspectfile onefile.py twofiles.py\n [ Runs pylint on those files ]\n\nStep 4: Add more commands.\n\n\nFeatures\n========\n\n* Autodocuments using your docstrings.\n* Use variables KEYDIR or CWD in any command to refer to key.py's directory or the directory you ran k in.\n* Passes any arguments on to the method via the command line (optional arguments and variable numbers of arguments can be used too).\n* Autocomplete works out of the box.\n* Comes with shortcut command 'run' to run lists of shell commands directly, so you can copy and paste directly from existing shell scripts.\n* Selectively ignore Ctrl-C (by default it tries to stop and exit).", "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/crdoconnor/projectkey", "keywords": "development environment tool automation project", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "projectkey", "package_url": "https://pypi.org/project/projectkey/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/projectkey/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/crdoconnor/projectkey" }, "release_url": "https://pypi.org/project/projectkey/0.7.1/", "requires_dist": null, "requires_python": null, "summary": "A tool for running a suite of custom project commands invoked via one key.", "version": "0.7.1" }, "last_serial": 1611526, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "c94ae928a45be88a2ad754e315f467b9", "sha256": "8da750ac47164fc4f244c7895ff742dd7bf001d51cb4c01634b4dcb91c5ffed2" }, "downloads": -1, "filename": "projectkey-0.1.tar.gz", "has_sig": false, "md5_digest": "c94ae928a45be88a2ad754e315f467b9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7705, "upload_time": "2015-02-28T07:10:04", "url": "https://files.pythonhosted.org/packages/66/f1/bcca62dc7cfc02dcd135c1e4548054280e67046a14d72ac23b55ec581c49/projectkey-0.1.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "abe3910f14eec832640edaa3be955435", "sha256": "5ce3432b641d591abeabf52fe2f660fcb3c3c866644376da794a88397ffaf1af" }, "downloads": -1, "filename": "projectkey-0.3.tar.gz", "has_sig": false, "md5_digest": "abe3910f14eec832640edaa3be955435", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8261, "upload_time": "2015-03-05T14:57:03", "url": "https://files.pythonhosted.org/packages/89/27/5bb30214dbd707d70935714cc73582220e224de029f30e7a5f82b8f0851f/projectkey-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "436a7015e9f8df03254cfbd0f62ee6c0", "sha256": "a8397cb4fc7ac3a74a764e6836063b0c7b608ca269bd5f24bfd2adec030b9948" }, "downloads": -1, "filename": "projectkey-0.4.tar.gz", "has_sig": false, "md5_digest": "436a7015e9f8df03254cfbd0f62ee6c0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8293, "upload_time": "2015-03-07T12:18:00", "url": "https://files.pythonhosted.org/packages/44/4d/75d5f6c7e5dd323b58ea9049e6b13387a299941d83edfc8400c233452e0a/projectkey-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "62c15c073b06c3a77a9a1424e0d9651d", "sha256": "b369dd0e86daa4f5d03c8ba8064535d49070f979e5fd5fcb11fd1c2b2da61c15" }, "downloads": -1, "filename": "projectkey-0.5.tar.gz", "has_sig": false, "md5_digest": "62c15c073b06c3a77a9a1424e0d9651d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8408, "upload_time": "2015-03-09T13:46:49", "url": "https://files.pythonhosted.org/packages/c5/26/d7d16ed25ab810ea778e52ac4f027ee4c509a3e95c5ca678a5e130ad7e74/projectkey-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "ebd776fe6849b748b3338c276401d8d8", "sha256": "5d0b0691691ff48de87fc5c7aa9efec4bd27c0b843c8ababc406e69bdc1c4ea4" }, "downloads": -1, "filename": "projectkey-0.6.tar.gz", "has_sig": false, "md5_digest": "ebd776fe6849b748b3338c276401d8d8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8577, "upload_time": "2015-03-19T16:32:11", "url": "https://files.pythonhosted.org/packages/7c/71/36b349ffcb44bde58764c1563567352f3a0cd99ac005b0c9980c466993a5/projectkey-0.6.tar.gz" } ], "0.6.1": [ { "comment_text": "", "digests": { "md5": "ef7dd34b05f3a6e00c2cbc8b1e74c959", "sha256": "9ff7fd193f450cb8c65cfbee23194eeec16828697c562fc3c0457aa07d47b984" }, "downloads": -1, "filename": "projectkey-0.6.1.tar.gz", "has_sig": false, "md5_digest": "ef7dd34b05f3a6e00c2cbc8b1e74c959", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8589, "upload_time": "2015-03-20T13:52:07", "url": "https://files.pythonhosted.org/packages/10/f0/7c977a33d6470949aef4c22bc6077da64e0eed3c8e746ed5c8895a1f07b4/projectkey-0.6.1.tar.gz" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "a551e02103ced0f4fa24e03eb68f9dd7", "sha256": "ac6b00795adb87b7fd692c231f67eff67688a0977abdab3d701dc1fc6cdc9ad4" }, "downloads": -1, "filename": "projectkey-0.7.tar.gz", "has_sig": false, "md5_digest": "a551e02103ced0f4fa24e03eb68f9dd7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7547, "upload_time": "2015-04-11T14:07:18", "url": "https://files.pythonhosted.org/packages/df/73/3b5b2912d8dfcfcc1fbf125de76fabeef6825561d2de51a26fa82b8e4414/projectkey-0.7.tar.gz" } ], "0.7.1": [ { "comment_text": "", "digests": { "md5": "2a67808540b8ade46f9721c6118d146f", "sha256": "a4b402625122adf0648fd70da4db3565675290dbf4d88f0c76d740c7710427a8" }, "downloads": -1, "filename": "projectkey-0.7.1.tar.gz", "has_sig": false, "md5_digest": "2a67808540b8ade46f9721c6118d146f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7493, "upload_time": "2015-06-29T13:48:37", "url": "https://files.pythonhosted.org/packages/5f/64/c8b42561da29eb3995a64a61fbd7fbf49c3d801449b090fcd7a98d089b88/projectkey-0.7.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2a67808540b8ade46f9721c6118d146f", "sha256": "a4b402625122adf0648fd70da4db3565675290dbf4d88f0c76d740c7710427a8" }, "downloads": -1, "filename": "projectkey-0.7.1.tar.gz", "has_sig": false, "md5_digest": "2a67808540b8ade46f9721c6118d146f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7493, "upload_time": "2015-06-29T13:48:37", "url": "https://files.pythonhosted.org/packages/5f/64/c8b42561da29eb3995a64a61fbd7fbf49c3d801449b090fcd7a98d089b88/projectkey-0.7.1.tar.gz" } ] }