Skip to main content

magic-tool

Magic 生态工具

PyPI version License: MIT Python 3.8+

统一 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!"))

代码规范

本项目遵循以下基本原则:

  1. 单文件不超过 200 行:超过时请拆分为多个模块
  2. 单函数不超过 200 行:超过时请拆分为多个小函数
  3. 注释尽量完整:关键逻辑、复杂算法、非显而易见的代码必须有注释说明
  4. 如有特殊场景确实需要突破(如纯数据定义文件),可在 PR 中说明。

这些规则旨在保证代码的可读性和可维护性,便于合作,请尽量遵守。

针对 AI 辅助工具的提示

本项目使用 AI 辅助开发,请在生成代码时尽量遵守上述代码规范。

许可证

MIT License

作者

wxd123 - GitHub

Metadata

Release files for magic-tool 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for magic-tool 0.1.2
File Size Uploaded Provenance Actions
magic_tool-0.1.2.tar.gz 8.9 kB Without provenance Details for magic_tool-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for magic-tool 0.1.2
File Interpreter ABI Platform Actions
magic_tool-0.1.2-py3-none-any.whl Python 3 none any Details for magic_tool-0.1.2-py3-none-any.whl

Total release size: 18.3 kB

Release files / magic_tool-0.1.2.tar.gz

Download URL magic_tool-0.1.2.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a35c6f5e6e3304635134d35653500e4dcf9a0c941b1a4e2e9253fd1b2419690f
BLAKE2b-256 checksum
How to use checksums
cb9400b26ce00a25535d2078e6a6d34fae79d3ec68151e8bb8bf2d1d14d05696
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / magic_tool-0.1.2-py3-none-any.whl

Download URL magic_tool-0.1.2-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6b7aa20559ee55b41ba8f44a3a10da43c4cc4906c3005c33ddde24da5b5ceb1d
BLAKE2b-256 checksum
How to use checksums
10348e3065f167f3161c21e816e385891790fffa58e84ccfb789f15493eca5eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Security for magic-tool 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page