占位包:Magic-tool 命令行工具(即将推出)
Project description
magic-tool
Magic 生态工具
统一 Magic 生态工具入口
项目状态
开发中 - 首个正式版本将于 2026 年 Q3 发布
功能规划
- 项目初始化:
magic init <project-name>一键生成项目结构 - 示例配置:
magic init --example <config>生成 Pipeline 示例文件 - 运行 Pipeline:
magic run --config pipeline.yaml执行编排流程 - 模板管理:
magic list查看可用模板 - 统一入口:整合 magic-pipeline、magic-coder、magic-api-server 等所有命令
功能模块-pipeline
llm_generate- 调用本地 LLM 生成文本(支持 Ollama)generate_stream- 流式生成文本
安装
pip install magic_tool
快速示例
from magic_tool.pipeline.model import llm_generate
print(llm_generate("Hello!"))
代码规范
本项目遵循以下基本原则:
- 单文件不超过 200 行:超过时请拆分为多个模块
- 单函数不超过 200 行:超过时请拆分为多个小函数
- 注释尽量完整:关键逻辑、复杂算法、非显而易见的代码必须有注释说明
- 如有特殊场景确实需要突破(如纯数据定义文件),可在 PR 中说明。
这些规则旨在保证代码的可读性和可维护性,便于合作,请尽量遵守。
针对 AI 辅助工具的提示
本项目使用 AI 辅助开发,请在生成代码时尽量遵守上述代码规范。
许可证
MIT License
作者
wxd123 - GitHub
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
magic_tool-0.1.1.tar.gz
(4.9 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 magic_tool-0.1.1.tar.gz.
File metadata
- Download URL: magic_tool-0.1.1.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d75f7400bbd203ce3e93e842e6dda2c9649f42922bef39d625e1ac0a374626d
|
|
| MD5 |
0ed30a7f8278da0530c2d25f59cb1aad
|
|
| BLAKE2b-256 |
5a92f9d5e21db2f5a2affd412cfa337dfd9f2903bb059c2f22ce5c37777c0081
|
File details
Details for the file magic_tool-0.1.1-py3-none-any.whl.
File metadata
- Download URL: magic_tool-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
866b370d61652677b9e8ddd5b2be86293ae41a9426d37fb8281b843765e86747
|
|
| MD5 |
9d9a1605409536b5cc9b6349123cc745
|
|
| BLAKE2b-256 |
632735f10cf709ec223ef9a00198993138c16ce5efe6d05f503403f530b18623
|