rulecc
Shell-style wildcards for arbitrary strings — including **, which fnmatch
does not treat specially.
Install
pip install rulecc
Usage
from rulecc import wildcard_match
wildcard_match("*.py", "app.py") # True
wildcard_match("*.py", "pkg/app.py") # False * does not cross /
wildcard_match("**/*.py", "pkg/app.py") # True
wildcard_match("**/*.py", "app.py") # True **/ may match nothing
wildcard_match("a?c", "abc") # True
wildcard_match("[abc]x", "bx") # True
wildcard_match("[!abc]x", "bx") # False
Differences from fnmatch
| Pattern | fnmatch |
rulecc |
|---|---|---|
* |
crosses / |
does not cross / |
** |
same as * |
crosses / |
**/x |
— | matches x and a/b/x |
That makes patterns usable for paths without surprises.
To reuse a pattern, call compile_wildcard once and .match() the result.
License
MIT
Metadata
Release files for rulecc 0.0.3
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 |
|---|---|---|---|---|
| rulecc-0.0.3.tar.gz | 3.0 kB | Without provenance | Details for rulecc-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rulecc-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for rulecc-0.0.3-py3-none-any.whl |
Total release size: 6.4 kB
Release files / rulecc-0.0.3.tar.gz
| Download URL | rulecc-0.0.3.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
de8aaf70d729650d9a90152496da86222de691ff76f6713a036de38576a83d0a
|
|
BLAKE2b-256 checksum How to use checksums |
0199d14a7a62025dc7d8de13078e731e44f17222c4cf92a15284ef68592861b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.11
|
Release files / rulecc-0.0.3-py3-none-any.whl
| Download URL | rulecc-0.0.3-py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e74bae4aa91d3f903e61273442020f9d5c36223010d06e0a85bd8fb2df8e4717
|
|
BLAKE2b-256 checksum How to use checksums |
c9727755654a54b7f0ce47e2a414a8fa2056105561dc04d49207ef04af3febe5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.11
|
Security for rulecc 0.0.3
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.