mfind
The mfind library allows to scan a directory for file an apply callbacks on file matches
How to install
pip install mfind
How to use
from mfind import MultiFinder
def internal_handler(filename: str):
return False # Just about all other handler checks
def html_handler(filename: str):
print(f"Processing HTML file {filename}")
def mardkown_handler(filename: str):
print(f"Processing markdown file {filename}")
file_processing_map = {
"_*" : internal_handler,
"*.html" : html_handler,
"*.md" : mardkown_handler
}
mf = MultiFinder(file_processing_map)
mf.scan("test_dir", filename_only_match=True)
Metadata
Release files for mfind 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mfind-0.0.2.tar.gz | 5.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mfind-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.0 kB
Release files / mfind-0.0.2.tar.gz
| Download URL | mfind-0.0.2.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
004a878b8c057235e0dcd4f9169be87857605ffe86f3a9f672a87f0c75bc2b49
|
|
BLAKE2b-256 checksum How to use checksums |
2342cb48878ac6447c772389e4c7f67a881131c1126e08ab4194c1e60383ce35
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.6
|
Release files / mfind-0.0.2-py3-none-any.whl
| Download URL | mfind-0.0.2-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bf2042abf6e11a470b030afc1e6afdbb69f67218e1f2818232f67beb99364223
|
|
BLAKE2b-256 checksum How to use checksums |
cdc4cf29416fc62a42f9022febf009c02e88b1e092cb2095e3a21a8ab9d1f104
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.52.0 CPython/3.8.6
|