hotcodepush 0.1.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 (118) hide show
  1. hotcodepush-0.1.0/.gitignore +16 -0
  2. hotcodepush-0.1.0/LICENSE +21 -0
  3. hotcodepush-0.1.0/PKG-INFO +98 -0
  4. hotcodepush-0.1.0/README.md +71 -0
  5. hotcodepush-0.1.0/openapi.json +33030 -0
  6. hotcodepush-0.1.0/pyproject.toml +83 -0
  7. hotcodepush-0.1.0/src/hotcodepush/__init__.py +183 -0
  8. hotcodepush-0.1.0/src/hotcodepush/_http.py +314 -0
  9. hotcodepush-0.1.0/src/hotcodepush/_types.py +15 -0
  10. hotcodepush-0.1.0/src/hotcodepush/_upload.py +51 -0
  11. hotcodepush-0.1.0/src/hotcodepush/_version.py +1 -0
  12. hotcodepush-0.1.0/src/hotcodepush/client.py +81 -0
  13. hotcodepush-0.1.0/src/hotcodepush/exceptions.py +45 -0
  14. hotcodepush-0.1.0/src/hotcodepush/models.py +899 -0
  15. hotcodepush-0.1.0/src/hotcodepush/py.typed +0 -0
  16. hotcodepush-0.1.0/src/hotcodepush/resources/__init__.py +0 -0
  17. hotcodepush-0.1.0/src/hotcodepush/resources/_base.py +10 -0
  18. hotcodepush-0.1.0/src/hotcodepush/resources/apps.py +78 -0
  19. hotcodepush-0.1.0/src/hotcodepush/resources/audit_logs.py +112 -0
  20. hotcodepush-0.1.0/src/hotcodepush/resources/binaries.py +84 -0
  21. hotcodepush-0.1.0/src/hotcodepush/resources/bundle_deltas.py +41 -0
  22. hotcodepush-0.1.0/src/hotcodepush/resources/bundle_files.py +44 -0
  23. hotcodepush-0.1.0/src/hotcodepush/resources/bundle_pack.py +54 -0
  24. hotcodepush-0.1.0/src/hotcodepush/resources/bundle_pack_upload_parts.py +36 -0
  25. hotcodepush-0.1.0/src/hotcodepush/resources/bundle_pack_uploads.py +65 -0
  26. hotcodepush-0.1.0/src/hotcodepush/resources/bundles.py +147 -0
  27. hotcodepush-0.1.0/src/hotcodepush/resources/channel_audience.py +43 -0
  28. hotcodepush-0.1.0/src/hotcodepush/resources/channel_qr.py +27 -0
  29. hotcodepush-0.1.0/src/hotcodepush/resources/channel_releases.py +119 -0
  30. hotcodepush-0.1.0/src/hotcodepush/resources/channels.py +169 -0
  31. hotcodepush-0.1.0/src/hotcodepush/resources/checkouts.py +26 -0
  32. hotcodepush-0.1.0/src/hotcodepush/resources/customer_portal_sessions.py +25 -0
  33. hotcodepush-0.1.0/src/hotcodepush/resources/device_events.py +44 -0
  34. hotcodepush-0.1.0/src/hotcodepush/resources/devices.py +116 -0
  35. hotcodepush-0.1.0/src/hotcodepush/resources/file_upload_parts.py +36 -0
  36. hotcodepush-0.1.0/src/hotcodepush/resources/file_uploads.py +63 -0
  37. hotcodepush-0.1.0/src/hotcodepush/resources/files.py +53 -0
  38. hotcodepush-0.1.0/src/hotcodepush/resources/health.py +11 -0
  39. hotcodepush-0.1.0/src/hotcodepush/resources/invitations.py +50 -0
  40. hotcodepush-0.1.0/src/hotcodepush/resources/limits.py +20 -0
  41. hotcodepush-0.1.0/src/hotcodepush/resources/members.py +121 -0
  42. hotcodepush-0.1.0/src/hotcodepush/resources/notification_preferences.py +51 -0
  43. hotcodepush-0.1.0/src/hotcodepush/resources/notifications.py +62 -0
  44. hotcodepush-0.1.0/src/hotcodepush/resources/organization_apps.py +51 -0
  45. hotcodepush-0.1.0/src/hotcodepush/resources/organization_invitations.py +112 -0
  46. hotcodepush-0.1.0/src/hotcodepush/resources/organizations.py +110 -0
  47. hotcodepush-0.1.0/src/hotcodepush/resources/release_audience.py +21 -0
  48. hotcodepush-0.1.0/src/hotcodepush/resources/releases.py +162 -0
  49. hotcodepush-0.1.0/src/hotcodepush/resources/rollbacks.py +31 -0
  50. hotcodepush-0.1.0/src/hotcodepush/resources/signing_keys.py +53 -0
  51. hotcodepush-0.1.0/src/hotcodepush/resources/sso_provider.py +61 -0
  52. hotcodepush-0.1.0/src/hotcodepush/resources/sso_provider_verifications.py +27 -0
  53. hotcodepush-0.1.0/src/hotcodepush/resources/statistics.py +15 -0
  54. hotcodepush-0.1.0/src/hotcodepush/resources/statistics_fleet.py +17 -0
  55. hotcodepush-0.1.0/src/hotcodepush/resources/statistics_updates.py +35 -0
  56. hotcodepush-0.1.0/src/hotcodepush/resources/statistics_usage.py +25 -0
  57. hotcodepush-0.1.0/src/hotcodepush/resources/subscription.py +53 -0
  58. hotcodepush-0.1.0/src/hotcodepush/resources/usage.py +66 -0
  59. hotcodepush-0.1.0/src/hotcodepush/resources/user_password.py +21 -0
  60. hotcodepush-0.1.0/src/hotcodepush/resources/user_sessions.py +18 -0
  61. hotcodepush-0.1.0/src/hotcodepush/resources/user_tokens.py +18 -0
  62. hotcodepush-0.1.0/src/hotcodepush/resources/users.py +46 -0
  63. hotcodepush-0.1.0/src/hotcodepush/resources/webhook_deliveries.py +91 -0
  64. hotcodepush-0.1.0/src/hotcodepush/resources/webhooks.py +158 -0
  65. hotcodepush-0.1.0/tests/__init__.py +0 -0
  66. hotcodepush-0.1.0/tests/conftest.py +15 -0
  67. hotcodepush-0.1.0/tests/openapi_document.py +96 -0
  68. hotcodepush-0.1.0/tests/stub_api.py +88 -0
  69. hotcodepush-0.1.0/tests/test_apps.py +63 -0
  70. hotcodepush-0.1.0/tests/test_audit_logs.py +48 -0
  71. hotcodepush-0.1.0/tests/test_binaries.py +69 -0
  72. hotcodepush-0.1.0/tests/test_bundle_deltas.py +31 -0
  73. hotcodepush-0.1.0/tests/test_bundle_files.py +31 -0
  74. hotcodepush-0.1.0/tests/test_bundle_pack.py +76 -0
  75. hotcodepush-0.1.0/tests/test_bundle_pack_upload_parts.py +19 -0
  76. hotcodepush-0.1.0/tests/test_bundle_pack_uploads.py +66 -0
  77. hotcodepush-0.1.0/tests/test_bundles.py +91 -0
  78. hotcodepush-0.1.0/tests/test_channel_audience.py +21 -0
  79. hotcodepush-0.1.0/tests/test_channel_qr.py +29 -0
  80. hotcodepush-0.1.0/tests/test_channel_releases.py +129 -0
  81. hotcodepush-0.1.0/tests/test_channels.py +128 -0
  82. hotcodepush-0.1.0/tests/test_checkouts.py +29 -0
  83. hotcodepush-0.1.0/tests/test_customer_portal_sessions.py +31 -0
  84. hotcodepush-0.1.0/tests/test_device_events.py +31 -0
  85. hotcodepush-0.1.0/tests/test_devices.py +58 -0
  86. hotcodepush-0.1.0/tests/test_exceptions.py +43 -0
  87. hotcodepush-0.1.0/tests/test_file_upload_parts.py +21 -0
  88. hotcodepush-0.1.0/tests/test_file_uploads.py +68 -0
  89. hotcodepush-0.1.0/tests/test_files.py +82 -0
  90. hotcodepush-0.1.0/tests/test_health.py +23 -0
  91. hotcodepush-0.1.0/tests/test_http.py +557 -0
  92. hotcodepush-0.1.0/tests/test_integration.py +352 -0
  93. hotcodepush-0.1.0/tests/test_invitations.py +57 -0
  94. hotcodepush-0.1.0/tests/test_limits.py +19 -0
  95. hotcodepush-0.1.0/tests/test_members.py +88 -0
  96. hotcodepush-0.1.0/tests/test_notification_preferences.py +42 -0
  97. hotcodepush-0.1.0/tests/test_notifications.py +58 -0
  98. hotcodepush-0.1.0/tests/test_openapi.py +888 -0
  99. hotcodepush-0.1.0/tests/test_organization_apps.py +41 -0
  100. hotcodepush-0.1.0/tests/test_organization_invitations.py +66 -0
  101. hotcodepush-0.1.0/tests/test_organizations.py +63 -0
  102. hotcodepush-0.1.0/tests/test_release_audience.py +18 -0
  103. hotcodepush-0.1.0/tests/test_releases.py +119 -0
  104. hotcodepush-0.1.0/tests/test_rollbacks.py +26 -0
  105. hotcodepush-0.1.0/tests/test_signing_keys.py +56 -0
  106. hotcodepush-0.1.0/tests/test_sso_provider.py +49 -0
  107. hotcodepush-0.1.0/tests/test_sso_provider_verifications.py +33 -0
  108. hotcodepush-0.1.0/tests/test_statistics_fleet.py +18 -0
  109. hotcodepush-0.1.0/tests/test_statistics_updates.py +27 -0
  110. hotcodepush-0.1.0/tests/test_statistics_usage.py +23 -0
  111. hotcodepush-0.1.0/tests/test_subscription.py +48 -0
  112. hotcodepush-0.1.0/tests/test_usage.py +64 -0
  113. hotcodepush-0.1.0/tests/test_user_password.py +23 -0
  114. hotcodepush-0.1.0/tests/test_user_sessions.py +13 -0
  115. hotcodepush-0.1.0/tests/test_user_tokens.py +13 -0
  116. hotcodepush-0.1.0/tests/test_users.py +39 -0
  117. hotcodepush-0.1.0/tests/test_webhook_deliveries.py +72 -0
  118. hotcodepush-0.1.0/tests/test_webhooks.py +136 -0
@@ -0,0 +1,16 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+
5
+ # uv and the build
6
+ .venv/
7
+ build/
8
+ dist/
9
+
10
+ # Tooling caches
11
+ .mypy_cache/
12
+ .pytest_cache/
13
+ .ruff_cache/
14
+
15
+ # OS
16
+ .DS_Store
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Genz IT Solutions GmbH
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,98 @@
1
+ Metadata-Version: 2.5
2
+ Name: hotcodepush
3
+ Version: 0.1.0
4
+ Summary: The typed Python client for the HotCodePush REST API
5
+ Project-URL: Homepage, https://hotcodepush.com
6
+ Project-URL: Documentation, https://hotcodepush.com/docs/api/python
7
+ Project-URL: Repository, https://github.com/hotcodepush-team/hotcodepush-python
8
+ Project-URL: API Reference, https://api.hotcodepush.com/openapi
9
+ Author-email: HotCodePush <support@hotcodepush.com>
10
+ License-Expression: MIT
11
+ License-File: LICENSE
12
+ Keywords: api,capacitor,cordova,expo,hotcodepush,ota,over-the-air,react-native,sdk
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Programming Language :: Python :: 3.14
22
+ Classifier: Typing :: Typed
23
+ Requires-Python: >=3.11
24
+ Requires-Dist: httpx<1,>=0.28
25
+ Requires-Dist: pydantic<3,>=2.6
26
+ Description-Content-Type: text/markdown
27
+
28
+ # hotcodepush
29
+
30
+ [![PyPI](https://img.shields.io/pypi/v/hotcodepush)](https://pypi.org/project/hotcodepush/)
31
+
32
+ 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.
33
+
34
+ ## Installation
35
+
36
+ The package is not on PyPI yet, so install a commit of `main` by its SHA:
37
+
38
+ ```sh
39
+ pip install git+https://github.com/hotcodepush-team/hotcodepush-python@<sha>
40
+ ```
41
+
42
+ Or with uv:
43
+
44
+ ```sh
45
+ uv add git+https://github.com/hotcodepush-team/hotcodepush-python@<sha>
46
+ ```
47
+
48
+ Pin a commit and bump it on purpose, never `@main`.
49
+
50
+ It requires Python 3.11 or later.
51
+
52
+ ## Usage
53
+
54
+ ```python
55
+ from hotcodepush import HotCodePush
56
+
57
+ hot_code_push = HotCodePush() # reads the API token from HOTCODEPUSH_TOKEN
58
+
59
+ organization, *_ = hot_code_push.organizations.list()
60
+ app = hot_code_push.organizations.apps.create(
61
+ framework="capacitor", name="Demo", organization_id=organization.id
62
+ )
63
+ channel = hot_code_push.apps.channels.create(app_id=app.id, name="staging")
64
+ hot_code_push.apps.channels.pause(app_id=app.id, channel_id=channel.id)
65
+ ```
66
+
67
+ The resources mirror the API's paths, `/v1/apps/{appId}/channels` being `apps.channels`.
68
+ Every method takes keyword arguments and returns pydantic models with snake_case fields.
69
+ 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`.
70
+ `users.get(user_id="me")` answers the caller behind the token, as `me` addresses the caller wherever the API takes a `{userId}`.
71
+
72
+ An upload takes `bytes` or a file object with its `content_length`, and streams it.
73
+ 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.
74
+
75
+ 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.
76
+
77
+ A failed request raises a `HotCodePushError` with the API's `code`, `message` and `details` and the HTTP `status`.
78
+
79
+ ## Documentation
80
+
81
+ The documentation lives at [hotcodepush.com/docs/api/python](https://hotcodepush.com/docs/api/python).
82
+
83
+ ## Development
84
+
85
+ ```sh
86
+ uv sync
87
+ uv run ruff format --check .
88
+ uv run ruff check .
89
+ uv run mypy
90
+ uv run pytest
91
+ uv build
92
+ ```
93
+
94
+ `uv run ruff format .` formats the code.
95
+
96
+ ## License
97
+
98
+ See [LICENSE](./LICENSE).
@@ -0,0 +1,71 @@
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
+ The package is not on PyPI yet, so install a commit of `main` by its SHA:
10
+
11
+ ```sh
12
+ pip install git+https://github.com/hotcodepush-team/hotcodepush-python@<sha>
13
+ ```
14
+
15
+ Or with uv:
16
+
17
+ ```sh
18
+ uv add git+https://github.com/hotcodepush-team/hotcodepush-python@<sha>
19
+ ```
20
+
21
+ Pin a commit and bump it on purpose, never `@main`.
22
+
23
+ It requires Python 3.11 or later.
24
+
25
+ ## Usage
26
+
27
+ ```python
28
+ from hotcodepush import HotCodePush
29
+
30
+ hot_code_push = HotCodePush() # reads the API token from HOTCODEPUSH_TOKEN
31
+
32
+ organization, *_ = hot_code_push.organizations.list()
33
+ app = hot_code_push.organizations.apps.create(
34
+ framework="capacitor", name="Demo", organization_id=organization.id
35
+ )
36
+ channel = hot_code_push.apps.channels.create(app_id=app.id, name="staging")
37
+ hot_code_push.apps.channels.pause(app_id=app.id, channel_id=channel.id)
38
+ ```
39
+
40
+ The resources mirror the API's paths, `/v1/apps/{appId}/channels` being `apps.channels`.
41
+ Every method takes keyword arguments and returns pydantic models with snake_case fields.
42
+ 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`.
43
+ `users.get(user_id="me")` answers the caller behind the token, as `me` addresses the caller wherever the API takes a `{userId}`.
44
+
45
+ An upload takes `bytes` or a file object with its `content_length`, and streams it.
46
+ 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.
47
+
48
+ 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.
49
+
50
+ A failed request raises a `HotCodePushError` with the API's `code`, `message` and `details` and the HTTP `status`.
51
+
52
+ ## Documentation
53
+
54
+ The documentation lives at [hotcodepush.com/docs/api/python](https://hotcodepush.com/docs/api/python).
55
+
56
+ ## Development
57
+
58
+ ```sh
59
+ uv sync
60
+ uv run ruff format --check .
61
+ uv run ruff check .
62
+ uv run mypy
63
+ uv run pytest
64
+ uv build
65
+ ```
66
+
67
+ `uv run ruff format .` formats the code.
68
+
69
+ ## License
70
+
71
+ See [LICENSE](./LICENSE).