Skip to main content

从源文件中提取Python项目依赖项的CLI工具。

Project description

🔍 pyre_tools

pyre_tools 是一个轻量、高效的命令行工具,用于从 Python 脚本或项目目录中自动提取依赖并生成 requirements.txtpyproject.toml 文件。

🚀 快速识别导入模块,匹配当前环境下已安装的包版本,自动输出兼容的依赖格式!


安装方式

从 PyPI 安装(推荐)

pip install pyre_tools

功能特性

    ✅ 支持 单个 Python 脚本 的依赖提取
    ✅ 支持 整个项目目录 的依赖扫描(自动递归查找 .py 文件)
    ✅ 自动过滤 .git, venv, __pycache__, .vscode 等无关目录
    ✅ 输出标准的 requirements.txt 和 pyproject.toml(兼容 pip / uv)
    ✅ 智能识别当前环境下实际安装的库及其版本
    ✅ 支持 Windows 和类 Unix 系统,零配置即可使用

使用方式

 提取项目目录依赖
    pyre /path/to/your/project or scripts.py
    支持.py, .pyw, .ipynb
    对于目录将自动扫描该路径下所有支持文件
    输出依赖到 /path/to/your/project/requirements.txt or /path/to/your/scripts.py同一目录
    生成 pyproject.toml 文件用于 uv / 构建工具

📝 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.5.0.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyre_tools-1.5.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file pyre_tools-1.5.0.tar.gz.

File metadata

  • Download URL: pyre_tools-1.5.0.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.5

File hashes

Hashes for pyre_tools-1.5.0.tar.gz
Algorithm Hash digest
SHA256 ac9cf2e2bc1292c7f9ae4091feab89fae79dad6d2d700107d81ff2a0b9144914
MD5 f1e35713919d6edcd8f68829085a5047
BLAKE2b-256 4a6a1d1c3f62da8920a94cb74b0768fbf46e2eefbe2660c51d1fb7fc9a6285c6

See more details on using hashes here.

File details

Details for the file pyre_tools-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: pyre_tools-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.5

File hashes

Hashes for pyre_tools-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d2ab9b09067fe7d21de759f7036dda7bd84d2e225918dd817fc682c88c23a097
MD5 d9ac968b35bf9c42c4eb472479fb7695
BLAKE2b-256 795c0f6037f2c647daa28663b77b19e963f3618a5a51fc1616667ab38871bc08

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page