k3fnmatch
Enhanced fnmatch with grouping regex and path transformation
k3fnmatch is a component of pykit3 project: a python3 toolkit set.
Enhanced fnmatch with grouping regex and path transformation.
Provides:
- translate(): Enhanced fnmatch.translate() with grouping and ** support
- fnmap(): Transform paths using source and destination patterns
Examples: >>> import re >>> pattern = translate("**/*.md") >>> m = re.match(pattern, "foo/bar/doc.md") >>> len(m.groups()) >= 3 True
>>> fnmap("foo/bar.md", "**/*.md", "**/*-cn.md")
'foo/bar-cn.md'
Install
pip install k3fnmatch
Synopsis
>>> import re
>>> pattern = translate("**/*.md")
>>> m = re.match(pattern, "foo/bar/doc.md")
>>> len(m.groups()) >= 3
True
>>> fnmap("foo/bar.md", "**/*.md", "**/*-cn.md")
'foo/bar-cn.md'
Author
Zhang Yanpo (张炎泼) drdr.xp@gmail.com
Copyright and License
The MIT License (MIT)
Copyright (c) 2015 Zhang Yanpo (张炎泼) drdr.xp@gmail.com
Metadata
Release files for k3fnmatch 0.1.6
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 |
|---|---|---|---|---|
| k3fnmatch-0.1.6.tar.gz | 9.8 kB | Without provenance | Details for k3fnmatch-0.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| k3fnmatch-0.1.6-py3-none-any.whl | Python 3 | none | any | Details for k3fnmatch-0.1.6-py3-none-any.whl |
Total release size: 16.1 kB
Release files / k3fnmatch-0.1.6.tar.gz
| Download URL | k3fnmatch-0.1.6.tar.gz |
|---|---|
| Size | 9.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
764c510d1fc8ce741fc48788079545275da8b50b93c112f5fe51355e53774a8c
|
|
BLAKE2b-256 checksum How to use checksums |
92269e741908f74d220936bafb5f92773849964f09d159da2a9d907c66d04b69
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|
Release files / k3fnmatch-0.1.6-py3-none-any.whl
| Download URL | k3fnmatch-0.1.6-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7ecd8d69f8a33f122d89e84e16f4877ffbce2a42ca98bbc83e8d8efa78a7a1e3
|
|
BLAKE2b-256 checksum How to use checksums |
35af941ff81af29b8945f7548349aba27f18a6d4d86fe13945e28dfef2a2c59d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|
Security for k3fnmatch 0.1.6
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.