The typed Python client for the HotCodePush REST API, the over-the-air (OTA) update platform for React Native, Expo, Capacitor and Cordova.
pip install hotcodepush # or: uv add hotcodepushIt requires Python 3.11 or later.
import os
from hotcodepush import HotCodePush
hot_code_push = HotCodePush(token=os.environ["HOTCODEPUSH_TOKEN"])
organization, *_ = hot_code_push.organizations.list()
app = hot_code_push.organizations.apps.create(
framework="capacitor", name="Demo", organization_id=organization.id
)
channel = hot_code_push.apps.channels.create(app_id=app.id, name="staging")token is an API token from the console's API tokens page. Left out, the client reads HOTCODEPUSH_TOKEN.
The resources mirror the API's paths, /v1/apps/{appId}/channels being apps.channels.
Every method takes keyword arguments and returns pydantic models with snake_case fields. An argument left out stays out of the request, and None sends null.
Uploads take bytes or a file object with its content_length and stream it.
Creating calls send an Idempotency-Key and are retried. Pass idempotency_key to reuse one across your own retries.
A failed request raises a HotCodePushError with the API's code, message, details and the HTTP status. code is a str, so a code newer than your client passes through, and ErrorCode lists the codes this version knows.
A catalog field of a model, such as App.framework, is typed Framework | str for the same reason.
A release condition your client cannot read, such as one of a type newer than your client, is an UnknownCondition.
See hotcodepush.com/docs/api/python.
uv sync
uv run pytest
uv run ruff check . && uv run mypy
uv run ruff format . # run before every commit
uv builduv run scripts/sync_openapi.py fetches the API's OpenAPI document into openapi.json, which the contract test checks the client against.
CLAUDE.md holds the layout and the rules.
See LICENSE.