Skip to content

Latest commit

 

History

History
63 lines (51 loc) · 3.31 KB

File metadata and controls

63 lines (51 loc) · 3.31 KB

Changelog

All notable changes to tikhub will be documented in this file. The format is based on Keep a Changelog and the project follows Semantic Versioning.

[Unreleased]

Added — Phase 6 (docs, CLI, release tooling)

  • mkdocs-material site at mkdocs.yml + docs/. Hand-written guides for authentication, async, errors, pagination, retries, logging, CLI, naming rules, and a migration guide from tikhub_sdk_v2.
  • Auto-generated API reference (docs/reference.md, 1540 lines) listing all 1010 methods with their endpoint paths and signatures. Regenerated by scripts/generate_docs.py.
  • CLI (pip install "tikhub[cli]" -> tikhub console script):
    • tikhub health
    • tikhub fetch <url>
    • tikhub user info
    • tikhub user usage
    • tikhub --version Implemented in src/tikhub/cli/.
  • GitHub Actions docs workflow (.github/workflows/docs.yml) builds the mkdocs site and deploys to GitHub Pages on every push to main.
  • GitHub Actions release workflow (.github/workflows/release.yml) triggered by version tags (v3.x.y); builds sdist + wheel and publishes to PyPI via OIDC trusted publishing after running the full lint / typecheck / test / coverage gate.
  • Self-typed lifecycle methods on BaseClient / AsyncBaseClient so with TikHub() as client: correctly narrows to TikHub (not the parent base class) under mypy strict.
  • 8 new CLI tests - 110 total now passing.

Added — full endpoint coverage

  • Codegen pipeline under scripts/:
    • refresh_spec.py — pulls latest openapi.json, prints diff vs cached snapshot.
    • generate_resources.py — regenerates all resource modules + client.py + async_client.py from spec/openapi.json.
    • verify_coverage.py — CI gate that asserts every spec endpoint has a matching SDK method (and vice versa).
  • All 52 resources for TikHub OpenAPI V5.3.2 wired up — 1010 / 1010 endpoints.
  • Multipart support in _base_client._request (the one Sora2 image-upload endpoint).
  • GitHub Actions CI (.github/workflows/ci.yml): lint, mypy, pytest matrix on Python 3.9–3.13, plus the coverage gate.
  • docs/quickstart.md — runnable 5-minute tour.
  • 61 new tests (tests/unit/test_generated_resources.py) covering resource attribute presence, query/JSON/array body dispatch, async ↔ sync parity, and total endpoint count.

[2.1.0] — 2026-04-08

Complete rewrite of the TikHub Python SDK.

Added

  • New tikhub package built from scratch against TikHub OpenAPI spec V5.3.2.
  • TikHub (sync) and AsyncTikHub (async) clients backed by httpx.
  • Bearer-token authentication via constructor or $TIKHUB_API_KEY.
  • Exception hierarchy rooted at TikHubError with clear HTTP status mapping.
  • Automatic retry for transient failures (5xx, 429, network errors) with exponential backoff and Retry-After honouring.
  • Rate-limit-aware sleeping based on X-RateLimit-Reset headers.
  • Cursor / page / offset paginator scaffolding.
  • Pydantic v2 model layer (extra="allow" so the SDK survives upstream additions).
  • health_check resource demonstrating the foundation end-to-end.

Removed

  • Legacy auto-generated code (setup.py, tox.ini, old docs, old tests) replaced by the new hand-architected SDK.