coquibot/coqui-toolkit-python-env 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

coquibot/coqui-toolkit-python-env

Composer 安装命令:

composer require coquibot/coqui-toolkit-python-env

包简介

Python virtual environment and dependency management toolkit for Coqui — create, inspect, install, and remove venvs using pip, conda, or uv

README 文档

README

Manage Python virtual environments and dependencies through Coqui. Supports pip (venv), conda, and uv backends.

Installation

composer require coquibot/coqui-toolkit-python-env

Coqui discovers the toolkit automatically via composer.json metadata.

Requirements

  • PHP 8.4+
  • Python 3.8+ (system-installed)
  • One or more Python environment backends:
    • venv + pip — included with Python (default)
    • condaMiniconda or Anaconda
    • uvAstral's uv (fast alternative)

Tools

Tool Description
python_env_detect Scan a project directory for dependency files, existing environments, and system tools
python_env_create Create a new virtual environment (venv, conda, or uv)
python_env_status Check environment health: Python version, pip version, package count, CUDA support
python_env_install Install packages from names, requirements.txt, pyproject.toml extras, or conda env files
python_env_list List installed packages in table, freeze, or JSON format
python_env_run Execute inline Python code, scripts, or modules inside the environment
python_env_remove Delete an environment with safety confirmations

Typical Workflow

1. python_env_detect  → Scan the project, find dependency files
2. python_env_create  → Create a .venv in the project directory
3. python_env_install → Install dependencies from requirements.txt or pyproject.toml
4. python_env_status  → Verify everything is working
5. python_env_run     → Execute code or scripts

Backend Comparison

Feature venv + pip conda uv
Speed Moderate Slow Very fast
Python version management No Yes Yes
Non-Python packages (C libs) No Yes No
GPU/CUDA packages Via index URL Native Via index URL
Disk usage Low High Low
Best for General projects Scientific/ML Modern Python

Examples

Standard Python Project (requirements.txt)

python_env_detect(project_path: "/path/to/project")
python_env_create(project_path: "/path/to/project")
python_env_install(project_path: "/path/to/project", requirements_file: "requirements.txt")

Project with pyproject.toml and Extras

python_env_detect(project_path: "/path/to/jasper")
python_env_create(project_path: "/path/to/jasper")
python_env_install(project_path: "/path/to/jasper", requirements_file: "pyproject.toml")
python_env_install(project_path: "/path/to/jasper", requirements_file: "pyproject.toml[dev,test]")

GPU/CUDA Project (PyTorch)

python_env_create(project_path: "/path/to/project")
python_env_install(
    project_path: "/path/to/project",
    packages: ["torch", "torchvision"],
    index_url: "https://download.pytorch.org/whl/cu121"
)
python_env_install(project_path: "/path/to/project", requirements_file: "requirements.txt")

Conda Environment from environment.yml

python_env_create(project_path: "/path/to/project", backend: "conda")
python_env_install(project_path: "/path/to/project", requirements_file: "environment.yml", backend: "conda")

Using uv for Fast Installs

python_env_create(project_path: "/path/to/project", backend: "uv")
python_env_install(project_path: "/path/to/project", requirements_file: "requirements.txt", backend: "uv")

Parameters Reference

python_env_detect

Parameter Type Required Description
project_path string Yes Absolute path to the project directory

python_env_create

Parameter Type Required Default Description
project_path string Yes Absolute path to the project directory
backend enum No venv venv, conda, or uv
python_version string No Python version for conda/uv (e.g. 3.11)
env_name string No .venv Environment directory name

python_env_status

Parameter Type Required Default Description
project_path string Yes Absolute path to the project directory
env_name string No .venv Environment directory name

python_env_install

Parameter Type Required Default Description
project_path string Yes Absolute path to the project directory
packages array No List of package specifiers (e.g. ["numpy>=1.26", "pandas"])
requirements_file string No Path to requirements.txt, pyproject.toml, or environment.yml
backend enum No pip pip, conda, or uv
env_name string No .venv Environment directory name
index_url string No Custom package index (e.g. PyTorch CUDA wheels)

python_env_list

Parameter Type Required Default Description
project_path string Yes Absolute path to the project directory
format enum No table Output format: table, freeze, or json
outdated bool No false Show only packages with available updates
filter string No Filter packages by name substring
env_name string No .venv Environment directory name

python_env_run

Parameter Type Required Default Description
project_path string Yes Absolute path to the project directory
code string No Inline Python code to execute
script string No Path to a .py script (relative to project)
module string No Module to run (e.g. pytest, http.server)
args string No Additional CLI arguments
timeout number No 30 Execution timeout in seconds
env_name string No .venv Environment directory name

python_env_remove

Parameter Type Required Default Description
project_path string Yes Absolute path to the project directory
env_name string No .venv Environment directory name
confirm bool Yes Must be true to proceed

Development

composer install
composer test
./vendor/bin/phpstan analyse

License

MIT

coquibot/coqui-toolkit-python-env 适用场景与选型建议

coquibot/coqui-toolkit-python-env 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 04 月 08 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「toolkit」 「python」 「pip」 「uv」 「php-agents」 「coqui」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 coquibot/coqui-toolkit-python-env 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 coquibot/coqui-toolkit-python-env 我们能提供哪些服务?
定制开发 / 二次开发

基于 coquibot/coqui-toolkit-python-env 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 37
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-08