{"id":16535827,"url":"https://github.com/mherrmann/gitignore_parser","last_synced_at":"2025-04-04T08:07:22.770Z","repository":{"id":37773892,"uuid":"158854737","full_name":"mherrmann/gitignore_parser","owner":"mherrmann","description":"A spec-compliant gitignore parser for Python 3.5+","archived":false,"fork":false,"pushed_at":"2024-01-23T21:18:54.000Z","size":71,"stargazers_count":161,"open_issues_count":7,"forks_count":39,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-14T11:55:07.639Z","etag":null,"topics":["gig","gitignore","python","python3"],"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/mherrmann.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2018-11-23T16:18:00.000Z","updated_at":"2024-06-18T14:38:53.429Z","dependencies_parsed_at":"2024-06-18T14:38:49.955Z","dependency_job_id":"5d60040b-f66b-42ca-92d4-1cbd8564c951","html_url":"https://github.com/mherrmann/gitignore_parser","commit_stats":{"total_commits":65,"total_committers":16,"mean_commits":4.0625,"dds":"0.49230769230769234","last_synced_commit":"b8d1872d14f87beafd209ac64bb3d33f333c189a"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mherrmann%2Fgitignore_parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mherrmann%2Fgitignore_parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mherrmann%2Fgitignore_parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mherrmann%2Fgitignore_parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mherrmann","download_url":"https://codeload.github.com/mherrmann/gitignore_parser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247142066,"owners_count":20890652,"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":["gig","gitignore","python","python3"],"created_at":"2024-10-11T18:29:00.612Z","updated_at":"2025-04-04T08:07:22.750Z","avatar_url":"https://github.com/mherrmann.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gitignore_parser\n\n![CI](https://github.com/mherrmann/gitignore_parser/workflows/CI/badge.svg)\n[![PyPI version](https://badge.fury.io/py/gitignore-parser.svg)](https://badge.fury.io/py/gitignore-parser)\n\nA spec-compliant gitignore parser for Python\n\n## Installation\n\n    pip install gitignore_parser\n\n## Usage\n\nSuppose `/home/michael/project/.gitignore` contains the following:\n\n    __pycache__/\n    *.py[cod]\n\nThen:\n\n    \u003e\u003e\u003e from gitignore_parser import parse_gitignore\n    \u003e\u003e\u003e matches = parse_gitignore('/home/michael/project/.gitignore')\n    \u003e\u003e\u003e matches('/home/michael/project/main.py')\n    False\n    \u003e\u003e\u003e matches('/home/michael/project/main.pyc')\n    True\n    \u003e\u003e\u003e matches('/home/michael/project/dir/main.pyc')\n    True\n    \u003e\u003e\u003e matches('/home/michael/project/__pycache__')\n    True\n\n## Motivation\n\nI couldn't find a good library for doing the above on PyPI. There are\nseveral other libraries, but they don't seem to support all features,\nbe it the square brackets in `*.py[cod]` or top-level paths `/...`.\n\n## Contributing\n\nI'm very open to merging PRs. But before you start working on one, please\nread through my\n[guidelines for PRs](https://gist.github.com/mherrmann/5ce21814789152c17abd91c0b3eaadca).\nIt will save us both time and unnecessary effort.\n\n## Attribution\n\nThe implementation is based on https://github.com/snark/ignorance/ by\nSteve Cook.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmherrmann%2Fgitignore_parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmherrmann%2Fgitignore_parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmherrmann%2Fgitignore_parser/lists"}