docs(examples): add Python client and usage examples - #702
Open
FenjuFu wants to merge 1 commit into
Open
Conversation
Add examples/python: a dependency-light (requests-only) SkillHubClient plus runnable examples covering search, resolve, download and publish against the REST API, and link them from the README Documentation sections. Serves the large Python-leaning audience and doubles as a reference SDK seed (see iflytek#701). Signed-off-by: FenjuFu <fufenjupku@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
examples/python/— a dependency-light (requests-only)SkillHubClientplus runnable examples covering search → resolve → download → publish (and star/rate) against the REST API — and links it from the README Documentation sections (EN + ZH).Addresses #701 (which also proposes evaluating a full published pip SDK as a follow-up).
What's included
skillhub_client.py—SkillHubClientwrapping public + authenticated + CLI-compat endpoints; unwraps the{code,msg,data}envelope and raisesSkillHubErroron non-zero codes.example_usage.py— runnable:python example_usage.py(search/inspect/download) andpython example_usage.py publish <zip> <namespace>.README.md— setup, quick start, endpoint coverage table.requirements.txt— justrequests.Endpoints are taken from
document/docs/04-developer/api(public.md / authenticated.md / cli-compat.md).Validation
Examples/docs only — no backend, API, or build surface changed. Locally verified
python -m py_compileon both modules and an offline smoke test (client construction, Bearer/X-Request-Idheaders,SKILLHUB_URLenv resolution,rate()score validation) all pass. Live end-to-end calls were not run here (no running instance), but every endpoint maps to the documented API.Risk
examples/directory + two README bullets; nothing existing changed.Notes