Find your files easily!
Project description
Find it is easy!
这是一个快速寻找文件的Python库,帮助开发者寻找文件
快速开始
添加到你的项目中
pip install easyfind
或者正在使用uv?
uv add easyfind
立刻找到你的文件!
from easyfind import find
path = find("foo.bar")
if path:
print(path.absolute())
/path/to/foo.bar
当然不止于此
from easyfind import find, findall, finditer
from pathlib import Path
# 名字不确定?
tuple_name = find(("foo", "bar"))
list_name = find(["foo", "bar"])
set_name = find({"foo", "bar"})
# 可能有多个同名文件?
more_file = findall("foo.bar")
# 想要复杂的匹配规则?
end_with_py = find(lambda name: name.endswith("py"))
# 当然也支持从别的目录开始找!
# 别忘了符号链接
my_lib = find("libexample.so", root_dir=Path("/lib"), followlinks=True)
# 附赠生成器支持
for file in finditer("example"):
print(file)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
easyfind-0.1.1.tar.gz
(3.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file easyfind-0.1.1.tar.gz.
File metadata
- Download URL: easyfind-0.1.1.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8328bd9ab7270aa97070b93ce7684f04495348e969461ebd8c14df57b5300141
|
|
| MD5 |
0ffc1a854b6309eaa391584a86e11e43
|
|
| BLAKE2b-256 |
69760ccd3dfc111bf4f9d0480e0de956c1245cd9386a54b5d751ea044419b39a
|
File details
Details for the file easyfind-0.1.1-py3-none-any.whl.
File metadata
- Download URL: easyfind-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07f715ebafac9390a025f1c18fb5c795b506f4472e1aa6cc2bf0948f27a9c830
|
|
| MD5 |
680ec21a4d145017bf273b61c5e20018
|
|
| BLAKE2b-256 |
36fbf940f458ce381ceeb44a181c542378e7538bf25a7e4970fc816d236d0c42
|