文件和目录操作工具包
Project description
liwancai-DirsFile
文件和目录操作工具包
安装
pip install liwancai-DirsFile
使用方法
from DirsFile import Save_Toml, Read_Toml, Mkdir
# 或者导入所有功能
from DirsFile import *
功能列表
基础文件操作
GetthisPyPath()- 获取当前脚本路径SplitDiv()- 分离盘符与路径SplitDir()- 文件路径和文件分离DirName()- 取路径中文件夹路径FileName()- 取路径中文件FileEND()- 分离后缀名Mkdir()- 创建文件夹FileSize()- 获取文件尺寸MoveTO()- 移动文件CopyTo()- 复制文件ReName()- 文件重命名Del_P()- 删除文件夹Del_F()- 删除文件
目录操作
Pathsdirs()- 路径下文件夹Pathsname()- 路径下文件夹名称Del_NanP()- 删除空文件夹Scan_File()- 查找目录下所有文件EndWithPath()- 获取指定后缀名的文件路径
文件读写
SavePickle()- 保存状态LoadPickle()- 加载状态WriteFile()- 写入文件ReadFile()- 读取文件ReadLine()- 按行读取文件Save_Json()- 保存json文件Read_Json()- 读取json文件Read_Csv()- 读取csv文件Read_Xls()- 读取xls文件Save_Csv()- 保存csv文件TodoCsv- CSV文件操作类
哈希计算
File_Hash_MD5()- 文件MD5哈希File_Hash_SHA_256()- 文件SHA-256哈希Str_Hash_MD5()- 字符串MD5哈希Str_Hash_SHA_256()- 字符串SHA-256哈希
图像处理
ImgToBase64()- 图片转base64Base64_img()- base64编码Base64ImgSave()- base64转图片
网络传输
FTP_Link()- FTP连接FTP_DWload()- FTP下载FTP_UPload()- FTP上传
压缩解压
un_zip()- 解压zip文件un_gz()- 解压gz文件un_tar()- 解压tar文件In_tar()- 压缩tar.gz文件In_zip()- 压缩zip文件
配置管理
Save_Toml()- 保存Toml配置文件Read_Toml()- 读取Toml配置文件
系统命令
Run_Cmd()- 执行cmd命令
目录树
DirectionTree- 目录树生成类Path_Tree()- 文件目录树
依赖
- liwancai-PyLog
- toml
可选依赖
- pandas (用于CSV/Excel操作)
- Pillow (用于图像处理)
许可证
MIT License
作者
liwancai (QQ: 248411282)
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
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 liwancai_dirsfile-1.0.3.tar.gz.
File metadata
- Download URL: liwancai_dirsfile-1.0.3.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf78698cb3fdd368ae4c4216a6788f59675655d4723ee0d1be845e186a0a9e6f
|
|
| MD5 |
041e8c6176936a0710ec0805b04b07d1
|
|
| BLAKE2b-256 |
3c429622dc9b708986cc72a09f3fffa51a664ab95eae1146d763bb0ceb307ece
|
File details
Details for the file liwancai_dirsfile-1.0.3-py3-none-any.whl.
File metadata
- Download URL: liwancai_dirsfile-1.0.3-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dccfa25ca28d9c0aa18adbf345c3092b079d492cda2c5975ffe599b8481c4904
|
|
| MD5 |
0b83c9e3e07e5ab1f79caedb966265f1
|
|
| BLAKE2b-256 |
50a4467db78e054d816105190919c0c584c99ef797c2f23f3b37eb1820280bf3
|