ppathspec
Fast gitignore-style file path pattern matching for Python — a drop-in replacement for pathspec that is 6–11x faster at compiling .gitignore rules and matching thousands of file paths.
Install
pip install ppathspec
Prebuilt wheels are included for Linux, macOS, and Windows (Python 3.9+, no Rust toolchain needed).
Usage
from ppathspec import GitIgnoreSpec
spec = GitIgnoreSpec.from_lines(["*.pyc", "__pycache__/", "build/", "!build/keep.txt"])
spec.match_file("src/__pycache__/mod.cpython-312.pyc") # True
list(spec.match_files(["src/main.py", "build/out.o", "build/keep.txt"])) # ["build/out.o"]
Performance
Benchmarked against pathspec v1.1.1 on a 31-rule .gitignore and 2,000 file paths:
| Workload | pathspec (x86-64) |
ppathspec (x86-64) |
ppathspec (Apple M4) |
|---|---|---|---|
| Compile 31 rules (x200) | 17.28 ms | 1.47 ms (11.8x) | 1.38 ms (9.4x) |
match_file (2,000 paths) |
12.02 ms | 1.57 ms (7.7x) | 1.38 ms (6.0x) |
match_files (2,000 paths) |
11.82 ms | 1.51 ms (7.8x) | 1.27 ms (6.8x) |
Under the hood
- Written in Rust (PyO3) with zero external runtime dependencies and runtime SIMD dispatch (AVX2 / SSE2 / ARM64 NEON)
- Compact
cp39-abi3wheel (gil_used = false, free-threaded Python ready) with PEP 561 type stubs (py.typed+__init__.pyi) - Verified with Hypothesis differential fuzzing against
pathspecand tested as a drop-in replacement inblack,yamllint, andhatchling
License
MIT
Metadata
Release files for ppathspec 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ppathspec-0.1.0.tar.gz | 24.5 kB | With provenance | Details for ppathspec-0.1.0.tar.gz |
Built distributions (wheels)
Total release size: 2.1 MB
Release files / ppathspec-0.1.0.tar.gz
| Download URL | ppathspec-0.1.0.tar.gz |
|---|---|
| Size | 24.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8ab1a1b870cacc1ec790d94749f9f042a309e5b798ee24fc9518a3143a755055
|
|
BLAKE2b-256 checksum How to use checksums |
3cf6981006bc03d4fcb949c0692770ebdaaeb8ce9958354d20960cc0131090b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logRelease files / ppathspec-0.1.0-cp39-abi3-win_amd64.whl
| Download URL | ppathspec-0.1.0-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 173.9 kB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
2b49d5cb0adc3c2321c16f7c752e0f99dbabc2205beeb91058ef90ebf5e83e83
|
|
BLAKE2b-256 checksum How to use checksums |
f3d0bb2ab18902b2c2dd7017ca0020cc67348dcaf77cf88cb1cce9f0ba5058a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logRelease files / ppathspec-0.1.0-cp39-abi3-musllinux_1_2_x86_64.whl
| Download URL | ppathspec-0.1.0-cp39-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 396.4 kB |
| Tags | CPython 3.9 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
3b240bcc3d70569782e244aa66c20301dc9e4948325e816bf7b18a91245d8fec
|
|
BLAKE2b-256 checksum How to use checksums |
2d663535cfdf84facd2ed99533d8d69bb0973b4bf66f79a6cc51a384cdc122f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logRelease files / ppathspec-0.1.0-cp39-abi3-musllinux_1_2_aarch64.whl
| Download URL | ppathspec-0.1.0-cp39-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 386.9 kB |
| Tags | CPython 3.9 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
b33fa7c772bc84e654a3f059b45412b6985a04ac592ed9534650fc022355b3c0
|
|
BLAKE2b-256 checksum How to use checksums |
4c9d83a9303c8746fe3c5a3c5984a8465984e8072da14337d5d9ea996cd76982
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logRelease files / ppathspec-0.1.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | ppathspec-0.1.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 292.3 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
4c200fdc0e35befb8161d0ca1389845fe009c15e18ae4963ceeffc2a4498b687
|
|
BLAKE2b-256 checksum How to use checksums |
a4f2c57d6d58566e8a19bcb8741bbb9740572201ad21fbc38242e51337ba1226
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logRelease files / ppathspec-0.1.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
| Download URL | ppathspec-0.1.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
|---|---|
| Size | 291.4 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
e9327471e37e12bd6cb5483ad2a39275f4944569c07aca3380ab5bc031272732
|
|
BLAKE2b-256 checksum How to use checksums |
a8dffc49eae28d06d8fd46548d38aa887b573e8bea8b47b3275f2898f1ba1d15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logRelease files / ppathspec-0.1.0-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | ppathspec-0.1.0-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 264.0 kB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
a9e0474acf8b548c3e526e0a9dcdf3028980126c600834871921070193d13aa7
|
|
BLAKE2b-256 checksum How to use checksums |
d97a36f22602eb2c384242a65cba2b5dbc4938d223bc73521aef3d1519e79cb4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logRelease files / ppathspec-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl
| Download URL | ppathspec-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 271.7 kB |
| Tags | CPython 3.9 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
d84c6099ecaa56505d381871a44e7cfa00448e3d5d7fb2b4a867e477ed65a5fb
|
|
BLAKE2b-256 checksum How to use checksums |
f9f15d01467415777388d65fb800cdafdbadf914800143b838213e3589cbc568
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logSecurity for ppathspec 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 8 files in this release have been uploaded with provenance metadata.
Attestation for ppathspec-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.