{ "info": { "author": "Vidar Tonaas Fauske", "author_email": "vidartf@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "**[Installation](#installation)** |\n**[Usage](#usage)** |\n**[Testing](#testing)** |\n**[License](#license)**\n\n# [globmatch](https://github.com/vidartf/globmatch) - Matching paths against globs\n\n[![Build Status](https://travis-ci.org/vidartf/globmatch.svg?branch=master)](https://travis-ci.org/vidartf/globmatch)\n[![codecov.io](https://codecov.io/github/vidartf/globmatch/coverage.svg?branch=master)](https://codecov.io/github/vidartf/globmatch?branch=master)\n\n`globmatch` provides functions for matching a patch against one ore more glob patterns in Python.\nThis differs from the `glob` module of the standard library, which matches a glob against the\nfile-tree on your system. `globmatch` does not interact with the filesystem at all, but relies on\ngeneric matching. It also differs from the `fnmatch` module of the standard library in that it\naccepts the double star (`**`) element, which matches zero or more directories. Additionally, the\nstar element (`*`) in `fnmatch` will also match across path separators. In `globmatch` the\nstar element matches zero or more characters of the current path element (directory/file name).\n\n\n## Installation\n\nInstall globmatch with pip:\n\n```bash\npip install globmatch\n```\n\nor for a development install:\n\n```bash\npip install -e git+https://github.com/vidartf/globmatch#egg=globmatch\n```\n\n## Usage\n\n```python\nfrom globmatch import glob_match\n\n# Some paths that match (returns True):\nglob_match('.git/gitconfig/', ['.git'])\nglob_match('foo/config', ['**/config'])\nglob_match('foo/config/bar', ['**/config'])\nglob_match('.git/gitconfig/', ['.git', '**/config'])\nglob_match('foo/config/bar', ['.git', '**/config'])\nglob_match('/.git/gitconfig/', ['**/.git'])\n\n# Some paths that do not match (returns False):\nglob_match('/.git/gitconfig/', ['.git']) # Needs ** to match subdir of root dir\nglob_match('foo/node_modules', ['node_modules']) # Will not match subdir without preceding **\n\n```\n\n\n\n## Testing\n\nInstall the develop install with test requirements:\n\n pip install -e globmatch[test]\n\nTo run Python tests locally, enter on the command line: `pytest`\n\nInstall the [codecov browser extension](https://github.com/codecov/browser-extension#codecov-extension)\nto view test coverage in the source browser on github.\n\n## License\n\nWe use a shared copyright model that enables all contributors to maintain the\ncopyright on their contributions.\n\nAll code is licensed under the terms of the revised BSD license.\n\n## Resources\n\n- [Reporting Issues](https://github.com/vidartf/globmatch/issues)\n\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gtihub.com/vidartf/globmatch", "keywords": "glob", "license": "BSD-3", "maintainer": "", "maintainer_email": "", "name": "globmatch", "package_url": "https://pypi.org/project/globmatch/", "platform": "", "project_url": "https://pypi.org/project/globmatch/", "project_urls": { "Homepage": "https://gtihub.com/vidartf/globmatch" }, "release_url": "https://pypi.org/project/globmatch/1.0.0/", "requires_dist": [ "backports.functools-lru-cache; (python_version=='2.7')", "pytest; extra == 'test'", "pytest-cov; extra == 'test'" ], "requires_python": "", "summary": "Matching paths against globs", "version": "1.0.0" }, "last_serial": 3352169, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "2e6e708bd510d55be6600c601e4f97fc", "sha256": "b18277772e64e9820dd2bb0b8b1864eeedfc85794cc1fb268b000c9a52d4de1f" }, "downloads": -1, "filename": "globmatch-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2e6e708bd510d55be6600c601e4f97fc", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6897, "upload_time": "2017-11-21T14:05:59", "url": "https://files.pythonhosted.org/packages/e0/a5/519a4518aac68146ffb4e64f1cded164d5aa4025909036adbbfed6a0a37b/globmatch-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "18a6dc054f43d0ea596d1500997b1f95", "sha256": "978c06b646ce0771a4ab2d11da4a6a65a52b5ecb95e99954a924ca9f1e9f94b2" }, "downloads": -1, "filename": "globmatch-1.0.0.tar.gz", "has_sig": false, "md5_digest": "18a6dc054f43d0ea596d1500997b1f95", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7732, "upload_time": "2017-11-21T14:06:00", "url": "https://files.pythonhosted.org/packages/71/54/837aaf678b7dc68f70513ae00aa5115a9da2390e2312d4be14cbbe19559a/globmatch-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2e6e708bd510d55be6600c601e4f97fc", "sha256": "b18277772e64e9820dd2bb0b8b1864eeedfc85794cc1fb268b000c9a52d4de1f" }, "downloads": -1, "filename": "globmatch-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2e6e708bd510d55be6600c601e4f97fc", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6897, "upload_time": "2017-11-21T14:05:59", "url": "https://files.pythonhosted.org/packages/e0/a5/519a4518aac68146ffb4e64f1cded164d5aa4025909036adbbfed6a0a37b/globmatch-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "18a6dc054f43d0ea596d1500997b1f95", "sha256": "978c06b646ce0771a4ab2d11da4a6a65a52b5ecb95e99954a924ca9f1e9f94b2" }, "downloads": -1, "filename": "globmatch-1.0.0.tar.gz", "has_sig": false, "md5_digest": "18a6dc054f43d0ea596d1500997b1f95", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7732, "upload_time": "2017-11-21T14:06:00", "url": "https://files.pythonhosted.org/packages/71/54/837aaf678b7dc68f70513ae00aa5115a9da2390e2312d4be14cbbe19559a/globmatch-1.0.0.tar.gz" } ] }