{"id":18084865,"url":"https://github.com/jwodder/gitmatch","last_synced_at":"2025-04-12T20:10:09.239Z","repository":{"id":40605493,"uuid":"507733367","full_name":"jwodder/gitmatch","owner":"jwodder","description":"Gitignore-style path matching","archived":false,"fork":false,"pushed_at":"2025-04-07T02:22:57.000Z","size":70,"stargazers_count":3,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T20:09:51.598Z","etag":null,"topics":["available-on-pypi","fnmatch","git","gitignore","glob","python","wildmatch"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jwodder.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-27T02:06:15.000Z","updated_at":"2025-01-23T14:37:14.000Z","dependencies_parsed_at":"2023-01-31T01:55:13.960Z","dependency_job_id":"300bb5c6-427f-486c-8250-389032dff0fe","html_url":"https://github.com/jwodder/gitmatch","commit_stats":{"total_commits":49,"total_committers":1,"mean_commits":49.0,"dds":0.0,"last_synced_commit":"a69467b03433f80a341537f90ce187033dbf8bb0"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwodder%2Fgitmatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwodder%2Fgitmatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwodder%2Fgitmatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jwodder%2Fgitmatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jwodder","download_url":"https://codeload.github.com/jwodder/gitmatch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248625493,"owners_count":21135513,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["available-on-pypi","fnmatch","git","gitignore","glob","python","wildmatch"],"created_at":"2024-10-31T15:08:27.119Z","updated_at":"2025-04-12T20:10:09.153Z","avatar_url":"https://github.com/jwodder.png","language":"Python","readme":"|repostatus| |ci-status| |coverage| |pyversions| |license|\n\n.. |repostatus| image:: https://www.repostatus.org/badges/latest/active.svg\n    :target: https://www.repostatus.org/#active\n    :alt: Project Status: Active — The project has reached a stable, usable\n          state and is being actively developed.\n\n.. |ci-status| image:: https://github.com/jwodder/gitmatch/actions/workflows/test.yml/badge.svg\n    :target: https://github.com/jwodder/gitmatch/actions/workflows/test.yml\n    :alt: CI Status\n\n.. |coverage| image:: https://codecov.io/gh/jwodder/gitmatch/branch/master/graph/badge.svg\n    :target: https://codecov.io/gh/jwodder/gitmatch\n\n.. |pyversions| image:: https://img.shields.io/pypi/pyversions/gitmatch.svg\n    :target: https://pypi.org/project/gitmatch/\n\n.. |license| image:: https://img.shields.io/github/license/jwodder/gitmatch.svg\n    :target: https://opensource.org/licenses/MIT\n    :alt: MIT License\n\n`GitHub \u003chttps://github.com/jwodder/gitmatch\u003e`_\n| `PyPI \u003chttps://pypi.org/project/gitmatch/\u003e`_\n| `Documentation \u003chttps://gitmatch.readthedocs.io\u003e`_\n| `Issues \u003chttps://github.com/jwodder/gitmatch/issues\u003e`_\n| `Changelog \u003chttps://github.com/jwodder/gitmatch/blob/master/CHANGELOG.md\u003e`_\n\n``gitmatch`` provides ``gitignore``-style pattern matching of file paths.\nSimply pass in a sequence of ``gitignore`` patterns and you'll get back an\nobject for testing whether a given relative path matches the patterns.\n\nInstallation\n============\n``gitmatch`` requires Python 3.8 or higher.  Just use `pip\n\u003chttps://pip.pypa.io\u003e`_ for Python 3 (You have pip, right?) to install it::\n\n    python3 -m pip install gitmatch\n\n\nExamples\n========\n\nBasic usage::\n\n    \u003e\u003e\u003e import gitmatch\n    \u003e\u003e\u003e gi = gitmatch.compile([\"foo\", \"!bar\", \"*.dir/\"])\n    \u003e\u003e\u003e bool(gi.match(\"foo\"))\n    True\n    \u003e\u003e\u003e bool(gi.match(\"bar\"))\n    False\n    \u003e\u003e\u003e bool(gi.match(\"quux\"))\n    False\n    \u003e\u003e\u003e bool(gi.match(\"foo/quux\"))\n    True\n    \u003e\u003e\u003e bool(gi.match(\"foo/bar\"))\n    True\n    \u003e\u003e\u003e bool(gi.match(\"bar/foo\"))\n    True\n    \u003e\u003e\u003e bool(gi.match(\"bar/quux\"))\n    False\n    \u003e\u003e\u003e bool(gi.match(\"foo.dir\"))\n    False\n    \u003e\u003e\u003e bool(gi.match(\"foo.dir/\"))\n    True\n\nSee what pattern was matched::\n\n    \u003e\u003e\u003e m1 = gi.match(\"foo/bar\")\n    \u003e\u003e\u003e m1 is None\n    False\n    \u003e\u003e\u003e bool(m1)\n    True\n    \u003e\u003e\u003e m1.pattern\n    'foo'\n    \u003e\u003e\u003e m1.path\n    'foo'\n    \u003e\u003e\u003e m2 = gi.match(\"bar\")\n    \u003e\u003e\u003e m2 is None\n    False\n    \u003e\u003e\u003e bool(m2)\n    False\n    \u003e\u003e\u003e m2.pattern\n    '!bar'\n    \u003e\u003e\u003e m2.pattern_obj.negative\n    True\n    \u003e\u003e\u003e m3 = gi.match(\"quux\")\n    \u003e\u003e\u003e m3 is None\n    True\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwodder%2Fgitmatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjwodder%2Fgitmatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwodder%2Fgitmatch/lists"}