从源文件中提取Python项目依赖项的CLI工具。
Project description
🔍 pyre_tools
pyre_tools 是一个轻量、高效的命令行工具,用于从 Python 脚本或项目目录中自动提取依赖并生成 requirements.txt 和 pyproject.toml 文件。
🚀 快速识别导入模块,匹配当前环境下已安装的包版本,自动输出兼容的依赖格式!
安装方式
从 PyPI 安装(推荐)
pip install pyre_tools
功能特性
✅ 支持 单个 Python 脚本 的依赖提取
✅ 支持 整个项目目录 的依赖扫描(自动递归查找 .py 文件)
✅ 自动过滤 .git, venv, __pycache__, .vscode 等无关目录
✅ 输出标准的 requirements.txt 和 pyproject.toml(兼容 pip / uv)
✅ 智能识别当前环境下实际安装的库及其版本
✅ 支持 Windows 和类 Unix 系统,零配置即可使用
使用方式
提取项目目录依赖
pyre -p /path/to/your/project
自动扫描该路径下所有 .py 文件
输出依赖到 /path/to/your/project/requirements.txt
生成 pyproject.toml 文件用于 uv / 构建工具
提取单个脚本依赖
pyre -s /path/to/your/script.py
输出依赖到脚本所在目录下的 requirements.txt
同时生成 pyproject.toml 文件(项目名即为脚本文件名)
📝 License
Copyright © 2025 yanghuaiyu
GitHub: [dawalishi122/SHZU](https://github.com/dawalishi122)
This project is licensed under the terms of the [MIT License](LICENSE).
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyre_tools-1.2.0.tar.gz
(4.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 pyre_tools-1.2.0.tar.gz.
File metadata
- Download URL: pyre_tools-1.2.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73789d6dfdefdf058339a517bfa69f8e467a95df11166952404c0193d18f972c
|
|
| MD5 |
aca1629f2c5c29ec2d25bfb4bdefc0f7
|
|
| BLAKE2b-256 |
0d651719cf4758601e8a5b59acc66436e2273e93c7095fbe70be95e0a47166aa
|
File details
Details for the file pyre_tools-1.2.0-py3-none-any.whl.
File metadata
- Download URL: pyre_tools-1.2.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be9f30f49250c6d0c8ea3581dde429f749cc9cfaf848d2e7d9dae4f64fd20f42
|
|
| MD5 |
fcf388e9ea25f25201ce8bacef8240d3
|
|
| BLAKE2b-256 |
8ebef85312befe9c103a9c4fea2c93504a52a32982f09766ba614b7ba785fdb3
|