Repository navigation
feat!: rewrite kickpython for the current Kick API (1.0.0) - #3
Merged
Merged
Conversation
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.
A rewrite of the package against Kick's current public API (https://docs.kick.com, https://api.kick.com/swagger/doc.yaml). It breaks compatibility with 0.x, so the version goes to 1.0.0. The upgrade guide is in
docs/migrating.md.Why
0.1.5 had several bugs:
post_chatprinted request headers, bearer token included.asyncio.run()inside a running event loop.logging.basicConfig()on import.asynciopackage.Noneor raw JSON instead of being raised.What's in it
KickClientcovers every non-deprecated endpoint: users, channels, chat (send, reply, delete), moderation, channel rewards and redemptions, livestreams v2, categories v2, event subscriptions, KICKs, ads and drops.as_user(user_id)refreshes them on use. Only one refresh runs per user at a time, and it survives a cancelled caller. A 401 on a valid token gets a missing-scope error instead of a pointless refresh.kick_tokens.dbfiles and restricts them to owner-only.Pagewith cursor support.Retry-After, and so are failed GET requests.WebhookHandler.LiveChat. The unofficial websocket reader, clearly marked as unofficial.pyproject.tomlbuilt with hatchling, asrc/layout,py.typed, strict mypy and ruff, and CI on Python 3.10 to 3.14 plus a lowest-dependency run.docs/, a CHANGELOG and an AGENTS.md.Testing
pytest -m live.users.meandchannels.meworked.LiveChat, then answered with a threaded reply./public/v2/categoriesonly accepts repeated keys, not the comma-separated lists the spec describes.user:read channel:read chat:write events:subscribe.Review
Two reviews ran independently: Gemini 4 Neon for correctness and Claude Fable 5.2 for security. A Fable re-review then checked the fixes. All findings were fixed except one. Rejecting webhook bodies that don't match their known event type would also reject real deliveries if Kick changes a payload, and Kick unsubscribes endpoints that keep failing. The docs cover that limitation instead.