hotcodepush 0.2.0__tar.gz → 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/PKG-INFO +11 -23
  2. hotcodepush-0.3.0/README.md +55 -0
  3. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/openapi.json +794 -1286
  4. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/__init__.py +4 -1
  5. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/_http.py +8 -45
  6. hotcodepush-0.3.0/src/hotcodepush/_types.py +12 -0
  7. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/_upload.py +4 -13
  8. hotcodepush-0.3.0/src/hotcodepush/_version.py +1 -0
  9. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/client.py +11 -13
  10. hotcodepush-0.3.0/src/hotcodepush/exceptions.py +100 -0
  11. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/models.py +123 -94
  12. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/_base.py +0 -2
  13. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/apps.py +6 -5
  14. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/audit_logs.py +6 -4
  15. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/binaries.py +5 -6
  16. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/bundle_deltas.py +5 -3
  17. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/bundle_files.py +4 -4
  18. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/bundle_pack.py +3 -3
  19. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/bundle_pack_upload_parts.py +3 -3
  20. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/bundle_pack_uploads.py +9 -9
  21. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/bundles.py +12 -9
  22. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/channel_audience.py +5 -5
  23. hotcodepush-0.2.0/src/hotcodepush/resources/channel_qr.py → hotcodepush-0.3.0/src/hotcodepush/resources/channel_qr_code.py +8 -4
  24. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/channel_releases.py +13 -55
  25. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/channels.py +24 -16
  26. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/checkouts.py +7 -6
  27. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/customer_portal_sessions.py +6 -4
  28. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/device_events.py +13 -5
  29. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/devices.py +9 -5
  30. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/file_upload_parts.py +3 -3
  31. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/file_uploads.py +8 -9
  32. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/files.py +6 -4
  33. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/health.py +4 -2
  34. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/invitations.py +6 -5
  35. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/limits.py +1 -1
  36. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/members.py +14 -9
  37. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/notification_preferences.py +11 -7
  38. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/notifications.py +7 -6
  39. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/organization_apps.py +6 -3
  40. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/organization_invitations.py +11 -7
  41. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/organizations.py +11 -7
  42. hotcodepush-0.3.0/src/hotcodepush/resources/qr_codes.py +27 -0
  43. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/release_audience.py +3 -2
  44. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/releases.py +28 -16
  45. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/rollbacks.py +3 -2
  46. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/signing_keys.py +5 -5
  47. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/sso_provider.py +13 -8
  48. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/sso_provider_verifications.py +6 -5
  49. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/statistics_fleet.py +4 -1
  50. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/statistics_updates.py +4 -3
  51. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/statistics_usage.py +1 -1
  52. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/subscription.py +6 -6
  53. hotcodepush-0.3.0/src/hotcodepush/resources/usage.py +27 -0
  54. hotcodepush-0.2.0/src/hotcodepush/resources/usage.py → hotcodepush-0.3.0/src/hotcodepush/resources/usage_apps.py +17 -24
  55. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/user_password.py +3 -4
  56. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/user_sessions.py +3 -2
  57. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/user_tokens.py +3 -2
  58. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/users.py +8 -8
  59. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/webhook_deliveries.py +9 -7
  60. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/webhooks.py +20 -15
  61. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/conftest.py +1 -2
  62. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/openapi_document.py +1 -10
  63. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/stub_api.py +1 -11
  64. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_channel_audience.py +2 -2
  65. hotcodepush-0.2.0/tests/test_channel_qr.py → hotcodepush-0.3.0/tests/test_channel_qr_code.py +6 -4
  66. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_channel_releases.py +5 -41
  67. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_device_events.py +12 -0
  68. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_exceptions.py +8 -0
  69. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_integration.py +3 -5
  70. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_openapi.py +39 -39
  71. hotcodepush-0.3.0/tests/test_qr_codes.py +38 -0
  72. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_releases.py +31 -2
  73. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_sso_provider.py +1 -1
  74. hotcodepush-0.3.0/tests/test_usage.py +19 -0
  75. hotcodepush-0.2.0/tests/test_usage.py → hotcodepush-0.3.0/tests/test_usage_apps.py +8 -20
  76. hotcodepush-0.2.0/README.md +0 -67
  77. hotcodepush-0.2.0/src/hotcodepush/_types.py +0 -15
  78. hotcodepush-0.2.0/src/hotcodepush/_version.py +0 -1
  79. hotcodepush-0.2.0/src/hotcodepush/exceptions.py +0 -45
  80. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/.gitignore +0 -0
  81. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/LICENSE +0 -0
  82. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/pyproject.toml +0 -0
  83. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/py.typed +0 -0
  84. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/__init__.py +0 -0
  85. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/src/hotcodepush/resources/statistics.py +0 -0
  86. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/__init__.py +0 -0
  87. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_apps.py +0 -0
  88. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_audit_logs.py +0 -0
  89. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_binaries.py +0 -0
  90. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_bundle_deltas.py +0 -0
  91. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_bundle_files.py +0 -0
  92. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_bundle_pack.py +0 -0
  93. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_bundle_pack_upload_parts.py +0 -0
  94. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_bundle_pack_uploads.py +0 -0
  95. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_bundles.py +0 -0
  96. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_channels.py +0 -0
  97. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_checkouts.py +0 -0
  98. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_customer_portal_sessions.py +0 -0
  99. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_devices.py +0 -0
  100. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_file_upload_parts.py +0 -0
  101. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_file_uploads.py +0 -0
  102. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_files.py +0 -0
  103. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_health.py +0 -0
  104. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_http.py +0 -0
  105. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_invitations.py +0 -0
  106. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_limits.py +0 -0
  107. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_members.py +0 -0
  108. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_notification_preferences.py +0 -0
  109. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_notifications.py +0 -0
  110. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_organization_apps.py +0 -0
  111. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_organization_invitations.py +0 -0
  112. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_organizations.py +0 -0
  113. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_release_audience.py +0 -0
  114. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_rollbacks.py +0 -0
  115. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_signing_keys.py +0 -0
  116. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_sso_provider_verifications.py +0 -0
  117. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_statistics_fleet.py +0 -0
  118. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_statistics_updates.py +0 -0
  119. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_statistics_usage.py +0 -0
  120. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_subscription.py +0 -0
  121. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_user_password.py +0 -0
  122. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_user_sessions.py +0 -0
  123. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_user_tokens.py +0 -0
  124. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_users.py +0 -0
  125. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_webhook_deliveries.py +0 -0
  126. {hotcodepush-0.2.0 → hotcodepush-0.3.0}/tests/test_webhooks.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: hotcodepush
3
- Version: 0.2.0
3
+ Version: 0.3.0
4
4
  Summary: The typed Python client for the HotCodePush REST API
5
5
  Project-URL: Homepage, https://hotcodepush.com
6
6
  Project-URL: Documentation, https://hotcodepush.com/docs/api/python
@@ -34,13 +34,7 @@ The typed Python client for the [HotCodePush](https://hotcodepush.com) REST API,
34
34
  ## Installation
35
35
 
36
36
  ```sh
37
- pip install hotcodepush
38
- ```
39
-
40
- Or with uv:
41
-
42
- ```sh
43
- uv add hotcodepush
37
+ pip install hotcodepush # or: uv add hotcodepush
44
38
  ```
45
39
 
46
40
  It requires Python 3.11 or later.
@@ -61,33 +55,27 @@ hot_code_push.apps.channels.pause(app_id=app.id, channel_id=channel.id)
61
55
  ```
62
56
 
63
57
  The resources mirror the API's paths, `/v1/apps/{appId}/channels` being `apps.channels`.
64
- Every method takes keyword arguments and returns pydantic models with snake_case fields.
65
- An optional argument you leave out stays out of the request; `None` sends `null`, which clears a field such as a channel's `expires_at`.
66
- `users.get(user_id="me")` answers the caller behind the token, as `me` addresses the caller wherever the API takes a `{userId}`.
67
-
68
- An upload takes `bytes` or a file object with its `content_length`, and streams it.
69
- Bytes above 64 MiB go up in parts, and a retry sends them again; a file object is read once, so a failed upload of one is not retried.
70
-
71
- Creating an organization, an invitation, an app, a channel, a release, a rollback, a bundle or a binary sends an `Idempotency-Key`, a UUID per call kept across the client's own retries; pass `idempotency_key` to reuse one when you retry the call yourself, and the API answers the first result again for 24 hours.
72
-
73
- A failed request raises a `HotCodePushError` with the API's `code`, `message` and `details` and the HTTP `status`.
58
+ 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`.
59
+ Uploads take `bytes` or a file object with its `content_length` and stream it.
60
+ Creating calls send an `Idempotency-Key` and are retried; pass `idempotency_key` to reuse one across your own retries.
61
+ A failed request raises a `HotCodePushError` with the API's `code`, `message`, `details` and the HTTP `status`; `code` is typed as `ErrorCode`, the error catalog, so a misspelled code fails the type check.
74
62
 
75
63
  ## Documentation
76
64
 
77
- The documentation lives at [hotcodepush.com/docs/api/python](https://hotcodepush.com/docs/api/python).
65
+ See [hotcodepush.com/docs/api/python](https://hotcodepush.com/docs/api/python).
78
66
 
79
67
  ## Development
80
68
 
81
69
  ```sh
82
70
  uv sync
83
- uv run ruff format --check .
84
- uv run ruff check .
85
- uv run mypy
86
71
  uv run pytest
72
+ uv run ruff check . && uv run mypy
73
+ uv run ruff format . # run before every commit
87
74
  uv build
88
75
  ```
89
76
 
90
- `uv run ruff format .` formats the code.
77
+ `uv run scripts/sync_openapi.py` fetches the API's OpenAPI document into `openapi.json`, which the contract test checks the client against.
78
+ `CLAUDE.md` holds the layout and the rules.
91
79
 
92
80
  ## License
93
81
 
@@ -0,0 +1,55 @@
1
+ # hotcodepush
2
+
3
+ [![PyPI](https://img.shields.io/pypi/v/hotcodepush)](https://pypi.org/project/hotcodepush/)
4
+
5
+ The typed Python client for the [HotCodePush](https://hotcodepush.com) REST API, the over-the-air (OTA) update platform for React Native, Expo, Capacitor and Cordova.
6
+
7
+ ## Installation
8
+
9
+ ```sh
10
+ pip install hotcodepush # or: uv add hotcodepush
11
+ ```
12
+
13
+ It requires Python 3.11 or later.
14
+
15
+ ## Usage
16
+
17
+ ```python
18
+ from hotcodepush import HotCodePush
19
+
20
+ hot_code_push = HotCodePush() # reads the API token from HOTCODEPUSH_TOKEN
21
+
22
+ organization, *_ = hot_code_push.organizations.list()
23
+ app = hot_code_push.organizations.apps.create(
24
+ framework="capacitor", name="Demo", organization_id=organization.id
25
+ )
26
+ channel = hot_code_push.apps.channels.create(app_id=app.id, name="staging")
27
+ hot_code_push.apps.channels.pause(app_id=app.id, channel_id=channel.id)
28
+ ```
29
+
30
+ The resources mirror the API's paths, `/v1/apps/{appId}/channels` being `apps.channels`.
31
+ 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`.
32
+ Uploads take `bytes` or a file object with its `content_length` and stream it.
33
+ Creating calls send an `Idempotency-Key` and are retried; pass `idempotency_key` to reuse one across your own retries.
34
+ A failed request raises a `HotCodePushError` with the API's `code`, `message`, `details` and the HTTP `status`; `code` is typed as `ErrorCode`, the error catalog, so a misspelled code fails the type check.
35
+
36
+ ## Documentation
37
+
38
+ See [hotcodepush.com/docs/api/python](https://hotcodepush.com/docs/api/python).
39
+
40
+ ## Development
41
+
42
+ ```sh
43
+ uv sync
44
+ uv run pytest
45
+ uv run ruff check . && uv run mypy
46
+ uv run ruff format . # run before every commit
47
+ uv build
48
+ ```
49
+
50
+ `uv run scripts/sync_openapi.py` fetches the API's OpenAPI document into `openapi.json`, which the contract test checks the client against.
51
+ `CLAUDE.md` holds the layout and the rules.
52
+
53
+ ## License
54
+
55
+ See [LICENSE](./LICENSE).