Skip to content

[Feature] 评估提供 Python SDK / Python 调用示例 #701

Description

@FenjuFu

Problem

SkillHub already exposes a complete REST API, but the repository has no Python SDK or Python calling examples. Recent real stargazer samples skew strongly toward Python, so Python developers currently have no code-level onboarding path and must translate the API documentation themselves or shell out to the CLI.

Proposed solution

Land the low-cost first step in #702: a requests-only Python client and runnable examples for search, detail, resolve, download, publish, star, and rate. Treat a published pip install skillhub SDK as a separate maintainer decision because packaging, semantic versioning, release CI, and long-term API compatibility add ongoing maintenance cost; an OpenAPI-generated client is another option to evaluate.

背景 / 动机

近期一批真实新 Star 用户样本(60 人)的兴趣语言分布中,Python 遥遥领先(约 481)而 Java 仅约 77——与 SkillHub 自身 Java 后端的定位存在明显偏移。也就是说,被 SkillHub 吸引来的受众里,Python 开发者占绝对多数,但仓库当前没有面向 Python 的接入路径,容易造成「看了文档但不上手」的流量浪费。

现状核查(提交前已查)

  • ✅ REST API 已完整:公开 API(搜索/详情/版本/解析/下载)+ 认证 API(发布/收藏/评分/命名空间)+ ClawHub CLI 兼容层,见 document/docs/04-developer/api。
  • ✅ Web 端有 OpenAPI TypeScript 类型;CLI 走 ClawHub 兼容。
  • ❌ 仓库内没有任何 Python SDK 或 Python 调用示例(scanner/ 是 Python 写的安全扫描服务,不是集成 SDK)。
  • 🔎 已搜 open/closed issues(python/SDK/客户端/调用示例/pip)、已合并与在途 PR、以及 releases 到 v0.2.16 —— 均无 Python SDK/示例,也无重复提案。

建议(分两步)

第一步(低成本、马上可用):提供轻量 Python 调用示例,放在 examples/python/,仅依赖 requests,覆盖 search / detail / resolve / download / publish / star / rate,作为 Python 集成的起点,同时充当「参考 SDK 种子」。

第二步(需 maintainer 决策):评估是否投入正式发布的 pip SDK(pip install skillhub)。这涉及打包、语义版本、发布 CI、以及长期维护成本,建议由维护者权衡后再定;也可考虑用 OpenAPI 规范自动生成客户端以降低维护负担。

收益

  • 直接承接占多数的 Python 受众,降低「Java 定位 vs Python 受众」的错位带来的流量流失。
  • 让自动化 / Agent 编排场景(Python 生态最活跃)能直接以代码方式调用 SkillHub,而不必 shell out 到 CLI。

如果方向 OK,第一步的示例 PR 可以直接合入;第二步的 pip SDK 想听听维护者意见。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/l大改动或高风险改动,需要 maintainer 负责 / Large or risky change requiring maintainer ownership.priority/p1高优先级 / High priority triage bucket.risk/high涉及安全、鉴权、迁移或公共契约 / Touches security, auth, migrations, or public contracts.triage/core交由 core maintainer 结合 AI 协同处理 / Issue should be handled by a core maintainer with AI support.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions