{ "info": { "author": "Emmanuel Ogbizi-Ugbe", "author_email": "iamogbz+pygithooks@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Topic :: Software Development" ], "description": "# py-githooks\n\n[![code linting: flake8](https://img.shields.io/badge/lint-flake8-blue.svg)](http://flake8.pycqa.org/) [![code quality: pytest](https://img.shields.io/badge/test-pytest-yellow.svg)](https://docs.pytest.org/) [![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](https://lbesson.mit-license.org/)\n[![CircleCI](https://circleci.com/gh/iamogbz/python-githooks.svg?style=svg)](https://circleci.com/gh/iamogbz/python-githooks)\n\n> Create git hooks with ease using a simple configuration file in a git project\n\n## Install\n\n```bash\npip install py-githooks\n```\n\n## Usage\n\n1. Create a `.githooks.ini` configuration file (If not provided a dummy configuration file will be created).\n2. Add sections based on `git hooks names` followed by a `command` property with the shell code you want to run.\n3. Run either `python -m python_githooks` or `githooks` in your virtual environment.\n\n**Configuration file example**:\n\n```ini\n# .githooks.ini\n\n[pre-commit]\ncommand = pytest --cov\n\n[pre-push]\ncommand = pytest --cov && flake8\n```\n\n## Removing a hook\n\nIf you already created a hook and now want to remove it, just set the command value to empty, like this:\n\n```ini\n# .githooks.ini\n\n[pre-commit]\ncommand =\n```\n\nThis will not actually physically remove the hook from the git local project, just will make it instantly exit with `0` status code.\n\n## Unuse\n\n1. Running `python -m python_githooks --deactivate` or `githooks --deactivate` will stop shimming git hooks but keep the commands in `.git/hooks`\n2. Run `rm .githooks.ini` to remove the configuration file (optional).\n3. `rm .git/hooks/pre-commit` or any other githook to stop them from executing (optional).\n e.g. `rm .git/hooks/*`\n\n## License\n\npy-githooks is [MIT-licensed](LICENSE).\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/iamogbz/python-githooks", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "py-githooks", "package_url": "https://pypi.org/project/py-githooks/", "platform": "", "project_url": "https://pypi.org/project/py-githooks/", "project_urls": { "Homepage": "https://github.com/iamogbz/python-githooks" }, "release_url": "https://pypi.org/project/py-githooks/1.1.0/", "requires_dist": [ "configparser" ], "requires_python": "", "summary": "Create git hooks with ease using a simple configuration file in a git project", "version": "1.1.0" }, "last_serial": 5940605, "releases": { "1.1.0": [ { "comment_text": "", "digests": { "md5": "b17755b444c1a5da034546d8a056915e", "sha256": "490300652f93196c4450326cac2af3b1b043f72423cc5e5c146932ce8bef6e48" }, "downloads": -1, "filename": "py_githooks-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "b17755b444c1a5da034546d8a056915e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6143, "upload_time": "2019-10-07T18:13:36", "url": "https://files.pythonhosted.org/packages/be/78/2374239027834f52c185f2f5b578a52cb92c94fd37cf285d992830a8c15b/py_githooks-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f388f23e721bb11d24e7879dc868e395", "sha256": "d7d562fe25f894d0ca1e0975c3386d6cba76ac6bd64f167bc211a0394e6bc01f" }, "downloads": -1, "filename": "py-githooks-1.1.0.tar.gz", "has_sig": false, "md5_digest": "f388f23e721bb11d24e7879dc868e395", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4407, "upload_time": "2019-10-07T18:13:39", "url": "https://files.pythonhosted.org/packages/5d/aa/2cbca79a6d46abb2fce8de6c3541d4e4b35a5c1c98d0dd6b8338505afb68/py-githooks-1.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b17755b444c1a5da034546d8a056915e", "sha256": "490300652f93196c4450326cac2af3b1b043f72423cc5e5c146932ce8bef6e48" }, "downloads": -1, "filename": "py_githooks-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "b17755b444c1a5da034546d8a056915e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6143, "upload_time": "2019-10-07T18:13:36", "url": "https://files.pythonhosted.org/packages/be/78/2374239027834f52c185f2f5b578a52cb92c94fd37cf285d992830a8c15b/py_githooks-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f388f23e721bb11d24e7879dc868e395", "sha256": "d7d562fe25f894d0ca1e0975c3386d6cba76ac6bd64f167bc211a0394e6bc01f" }, "downloads": -1, "filename": "py-githooks-1.1.0.tar.gz", "has_sig": false, "md5_digest": "f388f23e721bb11d24e7879dc868e395", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4407, "upload_time": "2019-10-07T18:13:39", "url": "https://files.pythonhosted.org/packages/5d/aa/2cbca79a6d46abb2fce8de6c3541d4e4b35a5c1c98d0dd6b8338505afb68/py-githooks-1.1.0.tar.gz" } ] }