An utils collection for python called MxBoxUtils
Project description
MxBoxUtils
MxBoxUtils 是一个Python工具库,提供了文件操作、TOML配置解析等实用功能。
目录结构
MxBoxUtils/
├── src/
│ └── mx/ # 核心功能模块
│ ├── __init__.py # 包初始化文件
│ ├── file.py # 文件操作工具
│ └── toml.py # TOML配置文件解析工具
├── LICENSE # 许可证文件
├── pyproject.toml # 项目配置文件
└── README.md # 项目说明文档
功能模块
1. 文件操作 (file.py)
提供文件和目录操作相关的功能。
files(f_path: str, f_ext: list[str]) -> list[str]
列出指定目录下的所有指定扩展名的文件名。
- 参数:
f_path- 目录路径f_ext- 要匹配的文件扩展名列表(不包含点号)
- 返回值: 包含所有匹配文件名的列表
其他函数(待实现)
file_paths()- 获取文件路径images()- 处理图像文件image_paths()- 获取图像文件路径file_hash()- 计算文件哈希值
2. TOML配置解析 (toml.py)
提供TOML配置文件解析功能。
load_toml(filepath)
加载TOML文件并返回解析后的数据。
- 参数:
filepath- TOML文件的路径
- 返回值: 解析后的TOML数据字典,如果文件不存在则返回None
安装说明
# 从源代码安装
git clone https://gitee.com/RyanLuDev/MxBoxUtils
cd MxBoxUtils
pip install -e .
版本信息
当前版本: 0.1.5
系统要求
- Python 3.14 或更高版本
依赖
- pillow (图像处理相关功能需要)
开发依赖
- pytest
- twine
- build
贡献
欢迎提交Issue和Pull Request来帮助改进这个项目。
许可证
MIT License
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
mxboxutils-0.1.5.tar.gz
(3.8 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 mxboxutils-0.1.5.tar.gz.
File metadata
- Download URL: mxboxutils-0.1.5.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad5adde5f9bc0add7a00bffb84c6ae2ddab863b1f2b798569b385517d0989f00
|
|
| MD5 |
07d31549730a53486315f92c35335410
|
|
| BLAKE2b-256 |
9a720ad0dc43dd93fc377fe616727929ccdd10c0dbda294460ce0da55c9001b5
|
File details
Details for the file mxboxutils-0.1.5-py3-none-any.whl.
File metadata
- Download URL: mxboxutils-0.1.5-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1245a68f3a85a184ff75a93af1121270a01517606b1fcc6465fb2d07ccc6e9b
|
|
| MD5 |
79c506c98aa0f9c520160597d94a9620
|
|
| BLAKE2b-256 |
b8a1210d20964bda4b2e188fd278d93661fac2666d792211123c2b91e724bcbb
|