capawesome-cloud 0.1.0__tar.gz → 0.2.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 (63) hide show
  1. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/.github/workflows/ci.yml +7 -7
  2. capawesome_cloud-0.2.0/.github/workflows/release.yml +69 -0
  3. capawesome_cloud-0.2.0/.release-please-manifest.json +3 -0
  4. capawesome_cloud-0.2.0/BREAKING.md +28 -0
  5. capawesome_cloud-0.2.0/CHANGELOG.md +24 -0
  6. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/PKG-INFO +80 -29
  7. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/README.md +78 -26
  8. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/examples/trigger_native_build.py +2 -1
  9. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/pyproject.toml +0 -8
  10. capawesome_cloud-0.2.0/release-please-config.json +12 -0
  11. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/src/capawesome_cloud/__init__.py +30 -0
  12. capawesome_cloud-0.2.0/src/capawesome_cloud/_version.py +1 -0
  13. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/src/capawesome_cloud/client.py +5 -3
  14. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/src/capawesome_cloud/models.py +137 -2
  15. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/src/capawesome_cloud/resources/__init__.py +20 -0
  16. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/src/capawesome_cloud/resources/_base.py +34 -1
  17. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/src/capawesome_cloud/resources/apps.py +13 -3
  18. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/src/capawesome_cloud/resources/automations.py +14 -2
  19. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/src/capawesome_cloud/resources/builds.py +19 -3
  20. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/src/capawesome_cloud/resources/certificates.py +21 -3
  21. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/src/capawesome_cloud/resources/channels.py +5 -3
  22. capawesome_cloud-0.2.0/src/capawesome_cloud/resources/configurations.py +86 -0
  23. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/src/capawesome_cloud/resources/deployments.py +10 -2
  24. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/src/capawesome_cloud/resources/destinations.py +48 -11
  25. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/src/capawesome_cloud/resources/environments.py +18 -2
  26. capawesome_cloud-0.2.0/src/capawesome_cloud/resources/git_connections.py +175 -0
  27. capawesome_cloud-0.2.0/src/capawesome_cloud/resources/invitations.py +54 -0
  28. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/src/capawesome_cloud/resources/jobs.py +34 -10
  29. capawesome_cloud-0.2.0/src/capawesome_cloud/resources/license_keys.py +71 -0
  30. capawesome_cloud-0.2.0/src/capawesome_cloud/resources/members.py +52 -0
  31. capawesome_cloud-0.2.0/src/capawesome_cloud/resources/organizations.py +73 -0
  32. capawesome_cloud-0.2.0/src/capawesome_cloud/resources/repository.py +31 -0
  33. capawesome_cloud-0.2.0/src/capawesome_cloud/resources/teams.py +170 -0
  34. capawesome_cloud-0.2.0/src/capawesome_cloud/resources/users.py +14 -0
  35. capawesome_cloud-0.2.0/tests/test_jobs.py +75 -0
  36. capawesome_cloud-0.2.0/tests/test_organizations.py +110 -0
  37. capawesome_cloud-0.2.0/tests/test_resources.py +183 -0
  38. capawesome_cloud-0.1.0/.github/workflows/release.yml +0 -77
  39. capawesome_cloud-0.1.0/CHANGELOG.md +0 -5
  40. capawesome_cloud-0.1.0/src/capawesome_cloud/_version.py +0 -1
  41. capawesome_cloud-0.1.0/tests/test_jobs.py +0 -30
  42. capawesome_cloud-0.1.0/tests/test_resources.py +0 -92
  43. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  44. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  45. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  46. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/.gitignore +0 -0
  47. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/LICENSE +0 -0
  48. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/examples/README.md +0 -0
  49. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/examples/error_handling.py +0 -0
  50. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/examples/list_apps.py +0 -0
  51. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/examples/manage_live_updates.py +0 -0
  52. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/src/capawesome_cloud/_http.py +0 -0
  53. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/src/capawesome_cloud/_types.py +0 -0
  54. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/src/capawesome_cloud/exceptions.py +0 -0
  55. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/src/capawesome_cloud/pagination.py +0 -0
  56. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/src/capawesome_cloud/py.typed +0 -0
  57. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/src/capawesome_cloud/resources/build_sources.py +0 -0
  58. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/src/capawesome_cloud/resources/devices.py +0 -0
  59. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/src/capawesome_cloud/resources/webhooks.py +0 -0
  60. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/tests/conftest.py +0 -0
  61. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/tests/test_client.py +0 -0
  62. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/tests/test_errors_and_retries.py +0 -0
  63. {capawesome_cloud-0.1.0 → capawesome_cloud-0.2.0}/tests/test_pagination.py +0 -0
@@ -20,9 +20,9 @@ jobs:
20
20
  runs-on: ubuntu-latest
21
21
  steps:
22
22
  - name: Checkout
23
- uses: actions/checkout@v4
23
+ uses: actions/checkout@v6
24
24
  - name: Set up Python ${{ env.DEFAULT_PYTHON_VERSION }}
25
- uses: actions/setup-python@v5
25
+ uses: actions/setup-python@v6
26
26
  with:
27
27
  python-version: ${{ env.DEFAULT_PYTHON_VERSION }}
28
28
  cache: pip
@@ -32,7 +32,7 @@ jobs:
32
32
  - name: Build
33
33
  run: python -m build
34
34
  - name: Upload artifacts
35
- uses: actions/upload-artifact@v4
35
+ uses: actions/upload-artifact@v7
36
36
  with:
37
37
  name: dist
38
38
  path: dist
@@ -46,9 +46,9 @@ jobs:
46
46
  python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
47
47
  steps:
48
48
  - name: Checkout
49
- uses: actions/checkout@v4
49
+ uses: actions/checkout@v6
50
50
  - name: Set up Python ${{ matrix.python-version }}
51
- uses: actions/setup-python@v5
51
+ uses: actions/setup-python@v6
52
52
  with:
53
53
  python-version: ${{ matrix.python-version }}
54
54
  cache: pip
@@ -65,9 +65,9 @@ jobs:
65
65
  runs-on: ubuntu-latest
66
66
  steps:
67
67
  - name: Checkout
68
- uses: actions/checkout@v4
68
+ uses: actions/checkout@v6
69
69
  - name: Set up Python ${{ env.DEFAULT_PYTHON_VERSION }}
70
- uses: actions/setup-python@v5
70
+ uses: actions/setup-python@v6
71
71
  with:
72
72
  python-version: ${{ env.DEFAULT_PYTHON_VERSION }}
73
73
  cache: pip
@@ -0,0 +1,69 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ workflow_dispatch:
8
+
9
+ concurrency: ${{ github.workflow }}-${{ github.ref }}
10
+
11
+ env:
12
+ PYTHON_VERSION: '3.12'
13
+
14
+ jobs:
15
+ release-please:
16
+ name: Release Please
17
+ if: github.repository == 'capawesome-team/cloud-python'
18
+ runs-on: ubuntu-latest
19
+ permissions:
20
+ contents: write
21
+ issues: write
22
+ pull-requests: write
23
+ outputs:
24
+ release_created: ${{ steps.release-please.outputs.release_created }}
25
+ steps:
26
+ - name: Create release pull request or GitHub release
27
+ id: release-please
28
+ uses: googleapis/release-please-action@v4
29
+
30
+ build:
31
+ name: Build
32
+ needs: release-please
33
+ if: ${{ needs.release-please.outputs.release_created }}
34
+ runs-on: ubuntu-latest
35
+ permissions:
36
+ contents: read
37
+ steps:
38
+ - name: Checkout
39
+ uses: actions/checkout@v6
40
+ - name: Set up Python ${{ env.PYTHON_VERSION }}
41
+ uses: actions/setup-python@v6
42
+ with:
43
+ python-version: ${{ env.PYTHON_VERSION }}
44
+ - name: Build distributions
45
+ run: |
46
+ python -m pip install --upgrade pip build twine
47
+ python -m build
48
+ python -m twine check dist/*
49
+ - name: Upload distributions
50
+ uses: actions/upload-artifact@v7
51
+ with:
52
+ name: dist
53
+ path: dist/
54
+
55
+ publish:
56
+ name: Publish to PyPI
57
+ needs: build
58
+ runs-on: ubuntu-latest
59
+ environment: pypi
60
+ permissions:
61
+ id-token: write # Required for PyPI trusted publishing
62
+ steps:
63
+ - name: Download distributions
64
+ uses: actions/download-artifact@v8
65
+ with:
66
+ name: dist
67
+ path: dist/
68
+ - name: Publish
69
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.2.0"
3
+ }
@@ -0,0 +1,28 @@
1
+ # Breaking Changes
2
+
3
+ This is a comprehensive list of the breaking changes introduced in the major version releases. Until version 1.0.0, breaking changes are introduced in minor version releases.
4
+
5
+ ## Versions
6
+
7
+ - [Version 0.2.x](#version-02x)
8
+
9
+ ## Version 0.2.x
10
+
11
+ ### Job Logs
12
+
13
+ `jobs.logs()` now returns a list of `JobLog` models (with `number`, `payload` and `timestamp`) instead of the raw response text.
14
+
15
+ ```diff
16
+ - print(client.jobs.logs(job_id))
17
+ + for log in client.jobs.logs(job_id):
18
+ + print(log.payload)
19
+ ```
20
+
21
+ ### Removed `git_repository_url` Parameter
22
+
23
+ The `git_repository_url` parameter has been removed from `apps.update()` as the API no longer supports it and ignored the value. Use `apps.repository.set()` to link an app to a Git repository instead.
24
+
25
+ ```diff
26
+ - client.apps.update(app_id, git_repository_url="https://github.com/owner/name")
27
+ + client.apps.repository.set(app_id, git_connection_id=git_connection_id, path="owner/name")
28
+ ```
@@ -0,0 +1,24 @@
1
+ # Changelog
2
+
3
+ ## [0.2.0](https://github.com/capawesome-team/cloud-python/compare/v0.1.0...v0.2.0) (2026-10-01)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * `jobs.logs()` returns `List[JobLog]` instead of `str`, and `apps.update()` no longer accepts `git_repository_url`.
9
+
10
+ ### Features
11
+
12
+ * add organization resources ([#4](https://github.com/capawesome-team/cloud-python/issues/4)) ([17e0e7f](https://github.com/capawesome-team/cloud-python/commit/17e0e7fc3634fe7a6102e49ac3e52dab3be66ee2))
13
+ * sync app, job and user resources with the Node SDK ([#3](https://github.com/capawesome-team/cloud-python/issues/3)) ([11dcf07](https://github.com/capawesome-team/cloud-python/commit/11dcf07877c1631e0287b7a7152a52c176b7aa8c))
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * return parsed job logs and remove `git_repository_url` ([#5](https://github.com/capawesome-team/cloud-python/issues/5)) ([7306c46](https://github.com/capawesome-team/cloud-python/commit/7306c461e490a006a6fe0c15ee8d6f896b58686b))
19
+
20
+ ## 0.1.0 (2026-06-02)
21
+
22
+ ### Features
23
+
24
+ - add Capawesome Cloud Python SDK ([#1](https://github.com/capawesome-team/cloud-python/issues/1)) ([80d28ba](https://github.com/capawesome-team/cloud-python/commit/80d28ba519e5fcd98274410c3c76493768a581d3))
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: capawesome-cloud
3
- Version: 0.1.0
3
+ Version: 0.2.0
4
4
  Summary: Python SDK for the Capawesome Cloud API
5
5
  Project-URL: Homepage, https://capawesome.io/cloud
6
6
  Project-URL: Documentation, https://cloud.capawesome.io/docs
@@ -26,7 +26,6 @@ Requires-Python: >=3.9
26
26
  Requires-Dist: httpx<1,>=0.27
27
27
  Requires-Dist: pydantic<3,>=2.7
28
28
  Provides-Extra: dev
29
- Requires-Dist: commitizen>=3.29; extra == 'dev'
30
29
  Requires-Dist: mypy>=1.11; extra == 'dev'
31
30
  Requires-Dist: pytest-cov>=5; extra == 'dev'
32
31
  Requires-Dist: pytest>=8; extra == 'dev'
@@ -42,7 +41,7 @@ Description-Content-Type: text/markdown
42
41
 
43
42
  Python SDK for the [Capawesome Cloud](https://capawesome.io/cloud/) API.
44
43
 
45
- It provides a fully typed, synchronous interface for managing apps, live update channels and deployments, native builds, app store destinations, and more.
44
+ It provides a fully typed, synchronous interface for managing organizations, apps, live update channels and deployments, native builds, app store destinations, and more.
46
45
 
47
46
  > **Note:** The Capawesome Cloud API is still in development and may change without notice. Response types intentionally expose only the most relevant properties to minimize breaking changes.
48
47
 
@@ -96,7 +95,24 @@ with CapawesomeCloud(token="cap_...") as client:
96
95
 
97
96
  ## Usage
98
97
 
99
- Resources mirror the API's path hierarchy. App-scoped resources are nested under `client.apps.*`; organization-scoped resources are on the client directly (e.g. `client.jobs`). Every app-scoped method takes `app_id` as its first argument.
98
+ Resources mirror the API's path hierarchy. App-scoped resources are nested under `client.apps.*`, organization-scoped resources under `client.organizations.*`; top-level resources are on the client directly (e.g. `client.jobs`). Every app-scoped method takes `app_id` as its first argument, every organization-scoped method `organization_id`.
99
+
100
+ ### Organizations
101
+
102
+ ```python
103
+ organizations = client.organizations.list()
104
+ organization = client.organizations.get(organization_id)
105
+ members = client.organizations.members.list(organization_id)
106
+
107
+ # Invite a new member
108
+ client.organizations.invitations.create(
109
+ organization_id, email="jane@example.com", role="member"
110
+ )
111
+
112
+ # Group apps and members in a team
113
+ team = client.organizations.teams.create(organization_id, name="Mobile")
114
+ client.organizations.teams.apps.create(organization_id, team.id, app_id=app_id)
115
+ ```
100
116
 
101
117
  ### Apps
102
118
 
@@ -124,12 +140,37 @@ client.apps.channels.resume(app_id, channel.id)
124
140
  Promote a build to a channel (live updates) or a destination (app store publishing):
125
141
 
126
142
  ```python
127
- deployment = client.apps.deployments.create(
143
+ # Roll out a live update to half of the devices on a channel
144
+ client.apps.deployments.create(
128
145
  app_id,
129
146
  app_build_id=app_build_id,
130
147
  app_channel_name="production",
131
148
  rollout_percentage=0.5,
132
149
  )
150
+
151
+ # Publish a native build to an app store with localized release notes
152
+ client.apps.deployments.create(
153
+ app_id,
154
+ app_build_id=app_build_id,
155
+ app_destination_name="Google Play",
156
+ release_notes={
157
+ "default": "Bug fixes and performance improvements.",
158
+ "de-DE": "Fehlerbehebungen und Leistungsverbesserungen.",
159
+ },
160
+ )
161
+ ```
162
+
163
+ ### Git repositories
164
+
165
+ Native builds are created from the repository an app is linked to:
166
+
167
+ ```python
168
+ connection = client.organizations.git_connections.list_page(organization_id, limit=1)[0]
169
+ repositories = client.organizations.git_connections.list_repositories(
170
+ organization_id, connection.id
171
+ )
172
+
173
+ client.apps.repository.set(app_id, git_connection_id=connection.id, path=repositories[0].path)
133
174
  ```
134
175
 
135
176
  ### Native builds
@@ -141,7 +182,12 @@ build = client.apps.builds.create(app_id, platform="ios", git_ref="main")
141
182
  job = client.jobs.wait(build.job_id)
142
183
  print(job.status)
143
184
 
144
- logs = client.jobs.logs(job.id)
185
+ for log in client.jobs.logs(job.id):
186
+ print(log.payload)
187
+
188
+ # Explain a failure
189
+ if job.status == "failed":
190
+ print(client.jobs.get_failure_summary(job.id).summary)
145
191
  ```
146
192
 
147
193
  #### Build artifacts
@@ -240,21 +286,30 @@ client.apps.devices.update(app_id, device_id, forced_app_channel_id=None)
240
286
 
241
287
  ## Available resources
242
288
 
243
- | Resource | Description |
244
- | ----------------------------------- | --------------------------------------------------- |
245
- | `client.apps` | Create, read, update, delete and transfer apps. |
246
- | `client.apps.channels` | Manage live update channels (incl. pause/resume). |
247
- | `client.apps.deployments` | Promote builds to channels or destinations. |
248
- | `client.apps.builds` | Trigger and manage native builds. |
249
- | `client.apps.builds.artifacts` | List and download build artifacts. |
250
- | `client.apps.build_sources` | Register and download native build sources. |
251
- | `client.apps.certificates` | Manage signing certificates. |
252
- | `client.apps.destinations` | Manage app store publishing destinations. |
253
- | `client.apps.environments` | Manage environments, secrets and variables. |
254
- | `client.apps.automations` | Manage build automations. |
255
- | `client.apps.devices` | Manage registered devices. |
256
- | `client.apps.webhooks` | Manage app webhooks. |
257
- | `client.jobs` | Inspect background jobs and their logs. |
289
+ | Resource | Description |
290
+ | -------------------------------------- | ------------------------------------------------- |
291
+ | `client.apps` | Create, read, update, delete and transfer apps. |
292
+ | `client.apps.channels` | Manage live update channels (incl. pause/resume). |
293
+ | `client.apps.deployments` | Promote builds to channels or destinations. |
294
+ | `client.apps.builds` | Trigger and manage native builds. |
295
+ | `client.apps.builds.artifacts` | List and download build artifacts. |
296
+ | `client.apps.build_sources` | Register and download native build sources. |
297
+ | `client.apps.certificates` | Manage signing certificates. |
298
+ | `client.apps.destinations` | Manage app store publishing destinations. |
299
+ | `client.apps.environments` | Manage environments, secrets and variables. |
300
+ | `client.apps.automations` | Manage build automations. |
301
+ | `client.apps.devices` | Manage registered devices. |
302
+ | `client.apps.webhooks` | Manage app webhooks. |
303
+ | `client.apps.configurations` | Manage native app configurations. |
304
+ | `client.apps.repository` | Link an app to a Git repository. |
305
+ | `client.organizations` | Create, read and update organizations. |
306
+ | `client.organizations.members` | Manage organization members. |
307
+ | `client.organizations.invitations` | Invite users to an organization. |
308
+ | `client.organizations.teams` | Manage teams and their apps and members. |
309
+ | `client.organizations.license_keys` | Manage license keys for Insiders packages. |
310
+ | `client.organizations.git_connections` | Manage Git connections and browse repositories. |
311
+ | `client.jobs` | Inspect background jobs and their logs. |
312
+ | `client.users` | Access the authenticated user. |
258
313
 
259
314
  ## Error handling
260
315
 
@@ -287,7 +342,7 @@ python -m venv .venv && source .venv/bin/activate
287
342
  pip install -e ".[dev]"
288
343
  ```
289
344
 
290
- Commit messages follow [Conventional Commits](https://www.conventionalcommits.org), enforced by [Commitizen](https://commitizen-tools.github.io/commitizen/) — run `cz commit` for a guided prompt. Common commands during development:
345
+ Common commands during development:
291
346
 
292
347
  | Command | Description |
293
348
  | ------------------------------------------ | -------------------------------------- |
@@ -296,7 +351,6 @@ Commit messages follow [Conventional Commits](https://www.conventionalcommits.or
296
351
  | `ruff format src tests examples` | Auto-format the code. |
297
352
  | `ruff format --check src tests examples` | Check formatting without writing. |
298
353
  | `mypy` | Type-check the package. |
299
- | `cz commit` | Create a Conventional Commit. |
300
354
 
301
355
  ### Testing
302
356
 
@@ -309,12 +363,9 @@ pytest --cov=capawesome_cloud # run with a coverage report
309
363
 
310
364
  ### Publishing
311
365
 
312
- Releases are driven by [Commitizen](https://commitizen-tools.github.io/commitizen/), which derives the next version and changelog entries from [Conventional Commits](https://www.conventionalcommits.org).
366
+ Releases are automated with [Release Please](https://github.com/googleapis/release-please), which derives the next version and changelog entries from [Conventional Commits](https://www.conventionalcommits.org).
313
367
 
314
- 1. Make sure `main` is up to date and CI is green.
315
- 2. Run `cz bump`. This bumps the version (in `[tool.commitizen]` and `src/capawesome_cloud/_version.py`), regenerates `CHANGELOG.md`, and creates a release commit plus a matching `vX.Y.Z` tag — all locally, nothing is pushed yet. Pass `--dry-run` first if you want to preview the result.
316
- 3. Review the generated commit and changelog, then push everything: `git push --follow-tags origin main`.
317
- 4. Build the distributions with `python -m build`, then publish to PyPI with `python -m twine upload dist/*` (requires `pip install build twine`).
368
+ On every push to `main`, the [Release workflow](./.github/workflows/release.yml) creates or updates a release pull request that bumps the version and updates `CHANGELOG.md`. Merging that pull request creates the git tag and GitHub release, and publishes the package to PyPI.
318
369
 
319
370
  ## License
320
371
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  Python SDK for the [Capawesome Cloud](https://capawesome.io/cloud/) API.
8
8
 
9
- It provides a fully typed, synchronous interface for managing apps, live update channels and deployments, native builds, app store destinations, and more.
9
+ It provides a fully typed, synchronous interface for managing organizations, apps, live update channels and deployments, native builds, app store destinations, and more.
10
10
 
11
11
  > **Note:** The Capawesome Cloud API is still in development and may change without notice. Response types intentionally expose only the most relevant properties to minimize breaking changes.
12
12
 
@@ -60,7 +60,24 @@ with CapawesomeCloud(token="cap_...") as client:
60
60
 
61
61
  ## Usage
62
62
 
63
- Resources mirror the API's path hierarchy. App-scoped resources are nested under `client.apps.*`; organization-scoped resources are on the client directly (e.g. `client.jobs`). Every app-scoped method takes `app_id` as its first argument.
63
+ Resources mirror the API's path hierarchy. App-scoped resources are nested under `client.apps.*`, organization-scoped resources under `client.organizations.*`; top-level resources are on the client directly (e.g. `client.jobs`). Every app-scoped method takes `app_id` as its first argument, every organization-scoped method `organization_id`.
64
+
65
+ ### Organizations
66
+
67
+ ```python
68
+ organizations = client.organizations.list()
69
+ organization = client.organizations.get(organization_id)
70
+ members = client.organizations.members.list(organization_id)
71
+
72
+ # Invite a new member
73
+ client.organizations.invitations.create(
74
+ organization_id, email="jane@example.com", role="member"
75
+ )
76
+
77
+ # Group apps and members in a team
78
+ team = client.organizations.teams.create(organization_id, name="Mobile")
79
+ client.organizations.teams.apps.create(organization_id, team.id, app_id=app_id)
80
+ ```
64
81
 
65
82
  ### Apps
66
83
 
@@ -88,12 +105,37 @@ client.apps.channels.resume(app_id, channel.id)
88
105
  Promote a build to a channel (live updates) or a destination (app store publishing):
89
106
 
90
107
  ```python
91
- deployment = client.apps.deployments.create(
108
+ # Roll out a live update to half of the devices on a channel
109
+ client.apps.deployments.create(
92
110
  app_id,
93
111
  app_build_id=app_build_id,
94
112
  app_channel_name="production",
95
113
  rollout_percentage=0.5,
96
114
  )
115
+
116
+ # Publish a native build to an app store with localized release notes
117
+ client.apps.deployments.create(
118
+ app_id,
119
+ app_build_id=app_build_id,
120
+ app_destination_name="Google Play",
121
+ release_notes={
122
+ "default": "Bug fixes and performance improvements.",
123
+ "de-DE": "Fehlerbehebungen und Leistungsverbesserungen.",
124
+ },
125
+ )
126
+ ```
127
+
128
+ ### Git repositories
129
+
130
+ Native builds are created from the repository an app is linked to:
131
+
132
+ ```python
133
+ connection = client.organizations.git_connections.list_page(organization_id, limit=1)[0]
134
+ repositories = client.organizations.git_connections.list_repositories(
135
+ organization_id, connection.id
136
+ )
137
+
138
+ client.apps.repository.set(app_id, git_connection_id=connection.id, path=repositories[0].path)
97
139
  ```
98
140
 
99
141
  ### Native builds
@@ -105,7 +147,12 @@ build = client.apps.builds.create(app_id, platform="ios", git_ref="main")
105
147
  job = client.jobs.wait(build.job_id)
106
148
  print(job.status)
107
149
 
108
- logs = client.jobs.logs(job.id)
150
+ for log in client.jobs.logs(job.id):
151
+ print(log.payload)
152
+
153
+ # Explain a failure
154
+ if job.status == "failed":
155
+ print(client.jobs.get_failure_summary(job.id).summary)
109
156
  ```
110
157
 
111
158
  #### Build artifacts
@@ -204,21 +251,30 @@ client.apps.devices.update(app_id, device_id, forced_app_channel_id=None)
204
251
 
205
252
  ## Available resources
206
253
 
207
- | Resource | Description |
208
- | ----------------------------------- | --------------------------------------------------- |
209
- | `client.apps` | Create, read, update, delete and transfer apps. |
210
- | `client.apps.channels` | Manage live update channels (incl. pause/resume). |
211
- | `client.apps.deployments` | Promote builds to channels or destinations. |
212
- | `client.apps.builds` | Trigger and manage native builds. |
213
- | `client.apps.builds.artifacts` | List and download build artifacts. |
214
- | `client.apps.build_sources` | Register and download native build sources. |
215
- | `client.apps.certificates` | Manage signing certificates. |
216
- | `client.apps.destinations` | Manage app store publishing destinations. |
217
- | `client.apps.environments` | Manage environments, secrets and variables. |
218
- | `client.apps.automations` | Manage build automations. |
219
- | `client.apps.devices` | Manage registered devices. |
220
- | `client.apps.webhooks` | Manage app webhooks. |
221
- | `client.jobs` | Inspect background jobs and their logs. |
254
+ | Resource | Description |
255
+ | -------------------------------------- | ------------------------------------------------- |
256
+ | `client.apps` | Create, read, update, delete and transfer apps. |
257
+ | `client.apps.channels` | Manage live update channels (incl. pause/resume). |
258
+ | `client.apps.deployments` | Promote builds to channels or destinations. |
259
+ | `client.apps.builds` | Trigger and manage native builds. |
260
+ | `client.apps.builds.artifacts` | List and download build artifacts. |
261
+ | `client.apps.build_sources` | Register and download native build sources. |
262
+ | `client.apps.certificates` | Manage signing certificates. |
263
+ | `client.apps.destinations` | Manage app store publishing destinations. |
264
+ | `client.apps.environments` | Manage environments, secrets and variables. |
265
+ | `client.apps.automations` | Manage build automations. |
266
+ | `client.apps.devices` | Manage registered devices. |
267
+ | `client.apps.webhooks` | Manage app webhooks. |
268
+ | `client.apps.configurations` | Manage native app configurations. |
269
+ | `client.apps.repository` | Link an app to a Git repository. |
270
+ | `client.organizations` | Create, read and update organizations. |
271
+ | `client.organizations.members` | Manage organization members. |
272
+ | `client.organizations.invitations` | Invite users to an organization. |
273
+ | `client.organizations.teams` | Manage teams and their apps and members. |
274
+ | `client.organizations.license_keys` | Manage license keys for Insiders packages. |
275
+ | `client.organizations.git_connections` | Manage Git connections and browse repositories. |
276
+ | `client.jobs` | Inspect background jobs and their logs. |
277
+ | `client.users` | Access the authenticated user. |
222
278
 
223
279
  ## Error handling
224
280
 
@@ -251,7 +307,7 @@ python -m venv .venv && source .venv/bin/activate
251
307
  pip install -e ".[dev]"
252
308
  ```
253
309
 
254
- Commit messages follow [Conventional Commits](https://www.conventionalcommits.org), enforced by [Commitizen](https://commitizen-tools.github.io/commitizen/) — run `cz commit` for a guided prompt. Common commands during development:
310
+ Common commands during development:
255
311
 
256
312
  | Command | Description |
257
313
  | ------------------------------------------ | -------------------------------------- |
@@ -260,7 +316,6 @@ Commit messages follow [Conventional Commits](https://www.conventionalcommits.or
260
316
  | `ruff format src tests examples` | Auto-format the code. |
261
317
  | `ruff format --check src tests examples` | Check formatting without writing. |
262
318
  | `mypy` | Type-check the package. |
263
- | `cz commit` | Create a Conventional Commit. |
264
319
 
265
320
  ### Testing
266
321
 
@@ -273,12 +328,9 @@ pytest --cov=capawesome_cloud # run with a coverage report
273
328
 
274
329
  ### Publishing
275
330
 
276
- Releases are driven by [Commitizen](https://commitizen-tools.github.io/commitizen/), which derives the next version and changelog entries from [Conventional Commits](https://www.conventionalcommits.org).
331
+ Releases are automated with [Release Please](https://github.com/googleapis/release-please), which derives the next version and changelog entries from [Conventional Commits](https://www.conventionalcommits.org).
277
332
 
278
- 1. Make sure `main` is up to date and CI is green.
279
- 2. Run `cz bump`. This bumps the version (in `[tool.commitizen]` and `src/capawesome_cloud/_version.py`), regenerates `CHANGELOG.md`, and creates a release commit plus a matching `vX.Y.Z` tag — all locally, nothing is pushed yet. Pass `--dry-run` first if you want to preview the result.
280
- 3. Review the generated commit and changelog, then push everything: `git push --follow-tags origin main`.
281
- 4. Build the distributions with `python -m build`, then publish to PyPI with `python -m twine upload dist/*` (requires `pip install build twine`).
333
+ On every push to `main`, the [Release workflow](./.github/workflows/release.yml) creates or updates a release pull request that bumps the version and updates `CHANGELOG.md`. Merging that pull request creates the git tag and GitHub release, and publishes the package to PyPI.
282
334
 
283
335
  ## License
284
336
 
@@ -29,7 +29,8 @@ def main(app_id: str) -> None:
29
29
 
30
30
  print(f"Build finished with status: {job.status}")
31
31
  if job.status != "succeeded":
32
- print(client.jobs.logs(build.job_id))
32
+ for log in client.jobs.logs(build.job_id):
33
+ print(log.payload)
33
34
  return
34
35
 
35
36
  for artifact in client.apps.builds.artifacts.list(app_id, build.id):
@@ -43,7 +43,6 @@ dev = [
43
43
  "respx>=0.21",
44
44
  "ruff>=0.6",
45
45
  "mypy>=1.11",
46
- "commitizen>=3.29",
47
46
  ]
48
47
 
49
48
  [tool.hatch.version]
@@ -77,10 +76,3 @@ files = ["src"]
77
76
  [tool.pytest.ini_options]
78
77
  testpaths = ["tests"]
79
78
  addopts = "-ra"
80
-
81
- [tool.commitizen]
82
- version = "0.1.0"
83
- version_files = ["src/capawesome_cloud/_version.py:__version__"]
84
- tag_format = "v$version"
85
- update_changelog_on_bump = true
86
- major_version_zero = true
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3
+ "release-type": "python",
4
+ "bump-minor-pre-major": true,
5
+ "bump-patch-for-minor-pre-major": true,
6
+ "include-component-in-tag": false,
7
+ "packages": {
8
+ ".": {
9
+ "extra-files": ["src/capawesome_cloud/_version.py"]
10
+ }
11
+ }
12
+ }
@@ -18,15 +18,30 @@ from .models import (
18
18
  AppBuildSource,
19
19
  AppCertificate,
20
20
  AppChannel,
21
+ AppConfiguration,
21
22
  AppDeployment,
22
23
  AppDestination,
23
24
  AppDevice,
24
25
  AppEnvironment,
25
26
  AppEnvironmentSecret,
26
27
  AppEnvironmentVariable,
28
+ AppGitRepository,
27
29
  AppWebhook,
28
30
  CapawesomeModel,
31
+ GitConnection,
32
+ GitNamespace,
33
+ GitRepository,
29
34
  Job,
35
+ JobFailureSummary,
36
+ JobLog,
37
+ LicenseKey,
38
+ Organization,
39
+ OrganizationInvitation,
40
+ OrganizationMember,
41
+ Team,
42
+ TeamApp,
43
+ TeamMember,
44
+ User,
30
45
  )
31
46
  from .resources.jobs import JobTimeoutError
32
47
 
@@ -47,12 +62,27 @@ __all__ = [
47
62
  "AppBuildSource",
48
63
  "AppCertificate",
49
64
  "AppChannel",
65
+ "AppConfiguration",
50
66
  "AppDeployment",
51
67
  "AppDestination",
52
68
  "AppDevice",
53
69
  "AppEnvironment",
54
70
  "AppEnvironmentSecret",
55
71
  "AppEnvironmentVariable",
72
+ "AppGitRepository",
56
73
  "AppWebhook",
74
+ "GitConnection",
75
+ "GitNamespace",
76
+ "GitRepository",
57
77
  "Job",
78
+ "JobFailureSummary",
79
+ "JobLog",
80
+ "LicenseKey",
81
+ "Organization",
82
+ "OrganizationInvitation",
83
+ "OrganizationMember",
84
+ "Team",
85
+ "TeamApp",
86
+ "TeamMember",
87
+ "User",
58
88
  ]
@@ -0,0 +1 @@
1
+ __version__ = "0.2.0" # x-release-please-version
@@ -15,7 +15,7 @@ from ._http import (
15
15
  HttpClient,
16
16
  )
17
17
  from .exceptions import CapawesomeCloudError
18
- from .resources import AppsResource, JobsResource
18
+ from .resources import AppsResource, JobsResource, OrganizationsResource, UsersResource
19
19
 
20
20
  # Token environment variables, in order of precedence. CAPAWESOME_TOKEN is
21
21
  # accepted for consistency with the Capawesome CLI.
@@ -72,10 +72,12 @@ class CapawesomeCloud:
72
72
  http_client=http_client,
73
73
  )
74
74
 
75
- # App-scoped resources are nested under ``apps`` (e.g.
76
- # ``client.apps.channels``); ``jobs`` is organization-scoped.
75
+ # Resources mirror the API paths: ``/v1/apps/{appId}/...`` is nested under
76
+ # ``apps``, ``/v1/organizations/{organizationId}/...`` under ``organizations``.
77
77
  self.apps = AppsResource(self._http)
78
+ self.organizations = OrganizationsResource(self._http)
78
79
  self.jobs = JobsResource(self._http)
80
+ self.users = UsersResource(self._http)
79
81
 
80
82
  def close(self) -> None:
81
83
  """Close the underlying HTTP connection pool."""