brellium-api-client 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 (104) hide show
  1. brellium_api_client-0.2.0/.claude/skills/brellium-api-python-sdk/SKILL.md +75 -0
  2. brellium_api_client-0.2.0/.github/workflows/release-please.yml +127 -0
  3. brellium_api_client-0.2.0/.github/workflows/release-title-edit.yml +93 -0
  4. brellium_api_client-0.2.0/.github/workflows/sdk-ci.yml +27 -0
  5. brellium_api_client-0.2.0/.github/workflows/sdk-release.yml +34 -0
  6. brellium_api_client-0.2.0/.gitignore +10 -0
  7. brellium_api_client-0.2.0/.release-please-manifest.json +3 -0
  8. brellium_api_client-0.2.0/CHANGELOG.md +8 -0
  9. brellium_api_client-0.2.0/LICENSE +201 -0
  10. brellium_api_client-0.2.0/PKG-INFO +183 -0
  11. brellium_api_client-0.2.0/README.md +162 -0
  12. brellium_api_client-0.2.0/SECURITY.md +19 -0
  13. brellium_api_client-0.2.0/SKILL.md +75 -0
  14. brellium_api_client-0.2.0/VERSIONING.md +101 -0
  15. brellium_api_client-0.2.0/api.md +563 -0
  16. brellium_api_client-0.2.0/pyproject.toml +35 -0
  17. brellium_api_client-0.2.0/release-please-config.json +46 -0
  18. brellium_api_client-0.2.0/scalar-sdk.manifest.json +10922 -0
  19. brellium_api_client-0.2.0/src/brellium_api_client/__init__.py +98 -0
  20. brellium_api_client-0.2.0/src/brellium_api_client/_base_client.py +2904 -0
  21. brellium_api_client-0.2.0/src/brellium_api_client/_client.py +721 -0
  22. brellium_api_client-0.2.0/src/brellium_api_client/_compat.py +195 -0
  23. brellium_api_client-0.2.0/src/brellium_api_client/_constants.py +14 -0
  24. brellium_api_client-0.2.0/src/brellium_api_client/_decoding.py +187 -0
  25. brellium_api_client-0.2.0/src/brellium_api_client/_event_handler.py +85 -0
  26. brellium_api_client-0.2.0/src/brellium_api_client/_exceptions.py +126 -0
  27. brellium_api_client-0.2.0/src/brellium_api_client/_files.py +173 -0
  28. brellium_api_client-0.2.0/src/brellium_api_client/_models.py +965 -0
  29. brellium_api_client-0.2.0/src/brellium_api_client/_qs.py +147 -0
  30. brellium_api_client-0.2.0/src/brellium_api_client/_resource.py +43 -0
  31. brellium_api_client-0.2.0/src/brellium_api_client/_response.py +842 -0
  32. brellium_api_client-0.2.0/src/brellium_api_client/_send_queue.py +90 -0
  33. brellium_api_client-0.2.0/src/brellium_api_client/_streaming.py +412 -0
  34. brellium_api_client-0.2.0/src/brellium_api_client/_types.py +279 -0
  35. brellium_api_client-0.2.0/src/brellium_api_client/_utils/__init__.py +64 -0
  36. brellium_api_client-0.2.0/src/brellium_api_client/_utils/_compat.py +45 -0
  37. brellium_api_client-0.2.0/src/brellium_api_client/_utils/_datetime_parse.py +156 -0
  38. brellium_api_client-0.2.0/src/brellium_api_client/_utils/_json.py +35 -0
  39. brellium_api_client-0.2.0/src/brellium_api_client/_utils/_logs.py +356 -0
  40. brellium_api_client-0.2.0/src/brellium_api_client/_utils/_path.py +127 -0
  41. brellium_api_client-0.2.0/src/brellium_api_client/_utils/_proxy.py +65 -0
  42. brellium_api_client-0.2.0/src/brellium_api_client/_utils/_reflection.py +42 -0
  43. brellium_api_client-0.2.0/src/brellium_api_client/_utils/_resources_proxy.py +24 -0
  44. brellium_api_client-0.2.0/src/brellium_api_client/_utils/_streams.py +12 -0
  45. brellium_api_client-0.2.0/src/brellium_api_client/_utils/_sync.py +58 -0
  46. brellium_api_client-0.2.0/src/brellium_api_client/_utils/_transform.py +472 -0
  47. brellium_api_client-0.2.0/src/brellium_api_client/_utils/_typing.py +156 -0
  48. brellium_api_client-0.2.0/src/brellium_api_client/_utils/_utils.py +428 -0
  49. brellium_api_client-0.2.0/src/brellium_api_client/_version.py +4 -0
  50. brellium_api_client-0.2.0/src/brellium_api_client/py.typed +0 -0
  51. brellium_api_client-0.2.0/src/brellium_api_client/resources/__init__.py +89 -0
  52. brellium_api_client-0.2.0/src/brellium_api_client/resources/audits.py +597 -0
  53. brellium_api_client-0.2.0/src/brellium_api_client/resources/coding_evaluations.py +354 -0
  54. brellium_api_client-0.2.0/src/brellium_api_client/resources/documents.py +654 -0
  55. brellium_api_client-0.2.0/src/brellium_api_client/resources/email_recipients.py +718 -0
  56. brellium_api_client-0.2.0/src/brellium_api_client/resources/question_sets.py +313 -0
  57. brellium_api_client-0.2.0/src/brellium_api_client/resources/users.py +852 -0
  58. brellium_api_client-0.2.0/src/brellium_api_client/types/__init__.py +49 -0
  59. brellium_api_client-0.2.0/src/brellium_api_client/types/audit.py +56 -0
  60. brellium_api_client-0.2.0/src/brellium_api_client/types/audit_batch_result.py +59 -0
  61. brellium_api_client-0.2.0/src/brellium_api_client/types/audit_batch_update_flags_params.py +22 -0
  62. brellium_api_client-0.2.0/src/brellium_api_client/types/audit_display_info_item.py +21 -0
  63. brellium_api_client-0.2.0/src/brellium_api_client/types/audit_list.py +26 -0
  64. brellium_api_client-0.2.0/src/brellium_api_client/types/audit_list_params.py +56 -0
  65. brellium_api_client-0.2.0/src/brellium_api_client/types/audit_person.py +23 -0
  66. brellium_api_client-0.2.0/src/brellium_api_client/types/audit_response.py +32 -0
  67. brellium_api_client-0.2.0/src/brellium_api_client/types/audit_update_params.py +13 -0
  68. brellium_api_client-0.2.0/src/brellium_api_client/types/coding_evaluation.py +54 -0
  69. brellium_api_client-0.2.0/src/brellium_api_client/types/coding_evaluation_list.py +26 -0
  70. brellium_api_client-0.2.0/src/brellium_api_client/types/coding_evaluation_list_params.py +50 -0
  71. brellium_api_client-0.2.0/src/brellium_api_client/types/created_user.py +13 -0
  72. brellium_api_client-0.2.0/src/brellium_api_client/types/document.py +64 -0
  73. brellium_api_client-0.2.0/src/brellium_api_client/types/document_create_params.py +32 -0
  74. brellium_api_client-0.2.0/src/brellium_api_client/types/document_list.py +26 -0
  75. brellium_api_client-0.2.0/src/brellium_api_client/types/document_list_params.py +50 -0
  76. brellium_api_client-0.2.0/src/brellium_api_client/types/document_update_params.py +16 -0
  77. brellium_api_client-0.2.0/src/brellium_api_client/types/document_upload_list.py +26 -0
  78. brellium_api_client-0.2.0/src/brellium_api_client/types/document_with_upload.py +15 -0
  79. brellium_api_client-0.2.0/src/brellium_api_client/types/em_evaluation.py +85 -0
  80. brellium_api_client-0.2.0/src/brellium_api_client/types/email_recipient.py +37 -0
  81. brellium_api_client-0.2.0/src/brellium_api_client/types/email_recipient_create_params.py +22 -0
  82. brellium_api_client-0.2.0/src/brellium_api_client/types/email_recipient_list.py +26 -0
  83. brellium_api_client-0.2.0/src/brellium_api_client/types/email_recipient_list_params.py +38 -0
  84. brellium_api_client-0.2.0/src/brellium_api_client/types/email_recipient_update_params.py +22 -0
  85. brellium_api_client-0.2.0/src/brellium_api_client/types/icd_code_finding.py +22 -0
  86. brellium_api_client-0.2.0/src/brellium_api_client/types/icd_criterion.py +21 -0
  87. brellium_api_client-0.2.0/src/brellium_api_client/types/icd_evaluation.py +32 -0
  88. brellium_api_client-0.2.0/src/brellium_api_client/types/mdm_data.py +18 -0
  89. brellium_api_client-0.2.0/src/brellium_api_client/types/mdm_problem.py +18 -0
  90. brellium_api_client-0.2.0/src/brellium_api_client/types/mdm_risk.py +18 -0
  91. brellium_api_client-0.2.0/src/brellium_api_client/types/presigned_upload.py +25 -0
  92. brellium_api_client-0.2.0/src/brellium_api_client/types/question.py +33 -0
  93. brellium_api_client-0.2.0/src/brellium_api_client/types/question_set.py +42 -0
  94. brellium_api_client-0.2.0/src/brellium_api_client/types/question_set_list.py +26 -0
  95. brellium_api_client-0.2.0/src/brellium_api_client/types/question_set_list_params.py +29 -0
  96. brellium_api_client-0.2.0/src/brellium_api_client/types/user.py +37 -0
  97. brellium_api_client-0.2.0/src/brellium_api_client/types/user_batch_result.py +59 -0
  98. brellium_api_client-0.2.0/src/brellium_api_client/types/user_batch_update_params.py +27 -0
  99. brellium_api_client-0.2.0/src/brellium_api_client/types/user_create_params.py +19 -0
  100. brellium_api_client-0.2.0/src/brellium_api_client/types/user_invitation.py +17 -0
  101. brellium_api_client-0.2.0/src/brellium_api_client/types/user_list.py +26 -0
  102. brellium_api_client-0.2.0/src/brellium_api_client/types/user_list_params.py +38 -0
  103. brellium_api_client-0.2.0/src/brellium_api_client/types/user_update_params.py +19 -0
  104. brellium_api_client-0.2.0/tests/smoke-test.py +592 -0
@@ -0,0 +1,75 @@
1
+ ---
2
+ name: brellium-api-python-sdk
3
+ description: "Python SDK for Brellium API. Use when writing Python code that calls Brellium API with the brellium-api-client package: installing it, constructing and authenticating the client, and calling API operations."
4
+ ---
5
+
6
+ # Brellium API Python SDK
7
+
8
+ Generated Python client for Brellium API, published as `brellium-api-client`. Use the generated client instead of hand-writing HTTP requests.
9
+
10
+ ## Install
11
+
12
+ ```sh
13
+ pip install brellium-api-client
14
+ ```
15
+
16
+ ## Client setup and authentication
17
+
18
+ ```python
19
+ import os
20
+
21
+ from brellium_api_client import BrelliumClient
22
+
23
+ client = BrelliumClient(
24
+ o_auth2=os.environ.get("BRELLIUM_ACCESS_TOKEN"),
25
+ )
26
+ ```
27
+
28
+ Provide credentials using the options below. Environment variables are read automatically when the target runtime supports them:
29
+
30
+ - `o_auth2` (env: `BRELLIUM_ACCESS_TOKEN`) — Exchange your client ID and secret for an access token at `POST /oauth/token` and send it as `Authorization: Bearer <token>`. A token lasts the `expires_in` seconds of the token response (about a day); reuse it until it is about to expire. A key is bound to your organization, so the token carries your `org_id`. A sandbox key requests tokens with the audience `https://api.brellium.dev/sandbox` instead of `https://api.brellium.dev`.
31
+
32
+ ## Calling operations
33
+
34
+ ```python
35
+ import os
36
+
37
+ from brellium_api_client import BrelliumClient
38
+
39
+ client = BrelliumClient(
40
+ o_auth2=os.environ.get("BRELLIUM_ACCESS_TOKEN"),
41
+ )
42
+
43
+ documents = client.documents.list(
44
+ limit=20,
45
+ )
46
+
47
+ print(documents)
48
+ ```
49
+
50
+ Method names, parameter shapes, and response types are generated from the API description — do not guess them. Look up the exact call signature in [api.md](../../../api.md) before writing a call.
51
+
52
+ ## Error handling
53
+
54
+ Non-success responses throw generated API errors. Error objects expose status, headers, response body, and request metadata where the target runtime supports it.
55
+
56
+ ```python
57
+ from brellium_api_client import APIStatusError
58
+
59
+ try:
60
+ documents = client.documents.list(
61
+ limit=20,
62
+ )
63
+ except APIStatusError as err:
64
+ print(err.status_code, err.message)
65
+ raise
66
+ ```
67
+
68
+ ## Requirements
69
+
70
+ - Python 3.9 or newer
71
+
72
+ ## Reference files
73
+
74
+ - [README.md](../../../README.md) — full feature tour: client options, retries and timeouts, logging.
75
+ - [api.md](../../../api.md) — complete catalogue of every operation with request and response types.
@@ -0,0 +1,127 @@
1
+ name: Release Please
2
+
3
+ on:
4
+ # A release is cut when a human merges the platform-managed release PR into
5
+ # main (the PR's base, so its diff shows the full pending release).
6
+ # Every other push here runs release-please as well — commits written straight to
7
+ # this branch included — and cuts nothing, there being no release commit at the tip.
8
+ push:
9
+ branches:
10
+ - main
11
+ # The Scalar platform pushes these workflow files straight to main to keep them
12
+ # current between releases; that is bookkeeping, never a release. Running anyway is worse
13
+ # than pointless on a branch that has not been handed a .release-please-manifest.json yet —
14
+ # release-please fails the run outright when it cannot read one. A release commit always
15
+ # rewrites the manifest and the changelog, so this filter can never swallow one.
16
+ paths-ignore:
17
+ - '.github/workflows/**'
18
+ # Manual fallback only; nothing in the automated chain depends on dispatch.
19
+ workflow_dispatch:
20
+
21
+ permissions:
22
+ contents: write
23
+ # Required to update the merged release PR's autorelease labels after tagging.
24
+ pull-requests: write
25
+
26
+ jobs:
27
+ release-please:
28
+ runs-on: ubuntu-latest
29
+ outputs:
30
+ release_created: ${{ steps.release.outputs.release_created }}
31
+ # Consumed by the publish job's checkout: without this mapping the checkout ref would be
32
+ # empty and the publish would build the triggering branch head instead of the released
33
+ # tag's exact commit.
34
+ tag_name: ${{ steps.release.outputs.tag_name }}
35
+ steps:
36
+ - uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0
37
+ id: release
38
+ with:
39
+ target-branch: main
40
+ config-file: release-please-config.json
41
+ manifest-file: .release-please-manifest.json
42
+ # Release PRs are opened and updated by the Scalar platform with its own
43
+ # credential (so their CI runs without manual approval); this workflow only
44
+ # cuts the tag + GitHub Release once a release PR is merged.
45
+ skip-github-pull-request: true
46
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
47
+ if: ${{ steps.release.outputs.release_created == 'true' }}
48
+ with:
49
+ fetch-depth: 0
50
+ # Merging the release PR into main is itself the promotion, but the
51
+ # version bump and changelog must also land back on scalar-next, or the next
52
+ # release PR would propose this release again. A real merge (never a plain
53
+ # commit push) so a squash- or rebase-merged release PR syncs just as well; the
54
+ # non-conventional message keeps the sync commit out of future changelogs.
55
+ #
56
+ # The Scalar platform merges main into scalar-next itself when the release
57
+ # PR merges, so this step routinely races it. The sync is done once the release commit
58
+ # is an ancestor of scalar-next, whoever merged it, so that is checked before every
59
+ # attempt. A rejected push retries from a fresh fetch rather than failing the release
60
+ # run. Plain (non-force) push on purpose: a concurrent regeneration push is never
61
+ # discarded, and a sync that still cannot land after the retries fails loudly.
62
+ - name: Sync release back to scalar-next
63
+ if: ${{ steps.release.outputs.release_created == 'true' }}
64
+ env:
65
+ RELEASE_SHA: ${{ steps.release.outputs.sha }}
66
+ RELEASE_TAG: ${{ steps.release.outputs.tag_name }}
67
+ run: |
68
+ git config user.name "github-actions[bot]"
69
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
70
+ # Explicit `|| return 1`s because `set -e` does not apply inside a function called
71
+ # as a condition, and a failed merge must never fall through to a no-op push.
72
+ sync_release() {
73
+ git fetch origin scalar-next || return 1
74
+ if git merge-base --is-ancestor "$RELEASE_SHA" origin/scalar-next; then
75
+ echo "$RELEASE_TAG is already on scalar-next."
76
+ return 0
77
+ fi
78
+ git checkout -B scalar-next origin/scalar-next || return 1
79
+ if ! git merge --no-edit -m "Sync release $RELEASE_TAG back to scalar-next" "$RELEASE_SHA"; then
80
+ git merge --abort
81
+ return 1
82
+ fi
83
+ git push origin scalar-next
84
+ }
85
+ for attempt in 1 2 3; do
86
+ if sync_release; then exit 0; fi
87
+ echo "Attempt $attempt of 3 to sync $RELEASE_TAG back to scalar-next failed."
88
+ if [ "$attempt" -lt 3 ]; then sleep $((attempt * 5)); fi
89
+ done
90
+ echo "::error::Could not sync $RELEASE_TAG back to scalar-next after 3 attempts."
91
+ exit 1
92
+ publish:
93
+ needs: release-please
94
+ # `!cancelled()` keeps publishing even when the back-sync to the integration branch
95
+ # failed: a raced integration branch must not block the release from reaching its
96
+ # registry.
97
+ if: ${{ !cancelled() && needs.release-please.outputs.release_created == 'true' }}
98
+ runs-on: ubuntu-latest
99
+ # Job-level permissions replace the workflow's release-cutting grants with the publish
100
+ # floor. OIDC trusted publishing verifies this run's claims, which name this workflow
101
+ # file — register release-please.yml as the trusted publisher on the registry.
102
+ permissions:
103
+ contents: read
104
+ id-token: write
105
+ packages: write
106
+ env:
107
+ VERSIONING_POLICY: manual
108
+ steps:
109
+ # Publishing runs inline — a top-level job of this same run — rather than dispatching
110
+ # sdk-release.yml: workflow_dispatch resolves the target workflow on the repository's
111
+ # default branch only, so a dispatch would 404 whenever the release line is any other
112
+ # branch, while OIDC trusted publishing accepts this job because it stays top-level
113
+ # (never a reusable-workflow call). The release-please job cut the tag earlier in this
114
+ # run; checking it out publishes exactly the released commit, not the branch head that
115
+ # triggered the workflow.
116
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
117
+ with:
118
+ ref: ${{ needs.release-please.outputs.tag_name }}
119
+ - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
120
+ with:
121
+ python-version: "3.11"
122
+ - run: python -m pip install --upgrade build
123
+ - run: python -m build
124
+ - name: Publish to PyPI
125
+ uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
126
+ with:
127
+ skip-existing: true
@@ -0,0 +1,93 @@
1
+ name: Release PR Version
2
+
3
+ on:
4
+ # `edited` is not one of the default pull_request types, but it is the point of this
5
+ # workflow: retitling the release PR is how a maintainer picks an exact version, and the
6
+ # check has to re-run on the new title. The other types keep the consistency check attached
7
+ # to the PR as it evolves.
8
+ pull_request:
9
+ types: [opened, reopened, edited, synchronize]
10
+
11
+ # Read-only: the check reads the committed version, and polls the pull request while it waits
12
+ # for a re-render.
13
+ permissions:
14
+ contents: read
15
+ pull-requests: read
16
+
17
+ jobs:
18
+ version-consistency:
19
+ # Also the check name the release PR's footer tells maintainers to wait for.
20
+ name: Release PR version
21
+ # A release-shaped title against the release branch is the whole test here, with no clause
22
+ # on who opened the pull request or what branch it is rendered onto. This job only reads,
23
+ # and a pull request claiming to be a release is worth checking against the committed
24
+ # version whoever opened it. Every other pull request skips this job, which GitHub reports
25
+ # as neutral.
26
+ #
27
+ # Loose on purpose: the prefix, not the full semver pattern the script matches. A version
28
+ # typo'd into the title still reaches the script and fails there, rather than falling out
29
+ # of the guard and leaving no check at all — a missing check is not a failing one, and this
30
+ # is the check the release PR's footer tells maintainers to wait for before merging.
31
+ if: >-
32
+ ${{ github.event.pull_request.base.ref == 'main'
33
+ && startsWith(github.event.pull_request.title, 'release: ') }}
34
+ runs-on: ubuntu-latest
35
+ # Bounds the wait below with room to spare; a re-render normally lands within a minute.
36
+ timeout-minutes: 15
37
+ steps:
38
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
39
+ with:
40
+ # The version committed on the PR head is what merging would actually release.
41
+ ref: ${{ github.event.pull_request.head.sha }}
42
+ # A retitle is applied by the Scalar platform, which pushes a Release-As commit to the
43
+ # integration branch and re-renders the release PR at that version. Until it lands, the
44
+ # title and the committed version disagree, and a merge in that window would tag a release
45
+ # whose own files self-report the old version.
46
+ #
47
+ # So this waits rather than failing: the check stays pending, which blocks a merge just as
48
+ # a failure would where the check is required, but does not flash red on every retitle. It
49
+ # passes once the title and the committed version agree, and hands over once the head
50
+ # moves, since the re-render's push starts a run of its own on the new head. It never
51
+ # passes while the title still disagrees, even a newer title: the run started for that
52
+ # edit judges it, and a pass here would sit beside it on the same head. Only a re-render
53
+ # that never arrives, or a title that is not a version at all, fails it.
54
+ - name: Compare the title version with the committed version
55
+ env:
56
+ # The title is human input, so it is bound through the environment (never
57
+ # interpolated into the script) and matched against a strict semver pattern
58
+ # before it is read.
59
+ PR_TITLE: ${{ github.event.pull_request.title }}
60
+ HEAD_SHA: ${{ github.event.pull_request.head.sha }}
61
+ PR_NUMBER: ${{ github.event.pull_request.number }}
62
+ REPOSITORY: ${{ github.repository }}
63
+ GH_TOKEN: ${{ github.token }}
64
+ run: |
65
+ pattern='^release: ((0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?)$'
66
+ if [[ ! "$PR_TITLE" =~ $pattern ]]; then
67
+ echo "::error::Release PR title must be \"release: X.Y.Z\" with a full semver version, got: $PR_TITLE"
68
+ exit 1
69
+ fi
70
+ title_version="${BASH_REMATCH[1]}"
71
+ manifest_version="$(jq -r '.["."]' .release-please-manifest.json)"
72
+ if [[ "$title_version" == "$manifest_version" ]]; then
73
+ echo "Release PR title and committed version agree on $title_version."
74
+ exit 0
75
+ fi
76
+ echo "Release PR title says $title_version but the pull request is versioned $manifest_version. Waiting for it to be re-rendered at $title_version."
77
+ # Up to ten minutes: 60 polls, 10 seconds apart.
78
+ for _ in $(seq 60); do
79
+ sleep 10
80
+ # A failed read is retried on the next poll rather than failing the check.
81
+ current="$(gh api "repos/$REPOSITORY/pulls/$PR_NUMBER" --jq '[.head.sha, .title] | @tsv')" || continue
82
+ IFS=$'\t' read -r current_sha current_title <<< "$current"
83
+ if [[ "$current_sha" != "$HEAD_SHA" ]]; then
84
+ echo "The release PR has a new head; the run for that push checks it."
85
+ exit 0
86
+ fi
87
+ if [[ "$current_title" =~ $pattern && "${BASH_REMATCH[1]}" == "$manifest_version" ]]; then
88
+ echo "Release PR title and committed version agree on $manifest_version."
89
+ exit 0
90
+ fi
91
+ done
92
+ echo "::error::Release PR title says $title_version but the pull request is still versioned $manifest_version after 10 minutes. Rebuild the SDK from the Scalar dashboard to re-render it."
93
+ exit 1
@@ -0,0 +1,27 @@
1
+ name: Python SDK CI
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+
7
+ # Least privilege for a verification-only workflow: every job below only reads the checked-out
8
+ # tree, so the run's GITHUB_TOKEN is narrowed to that regardless of the repository's default
9
+ # grants. Declared at the workflow level so a job added later inherits the floor.
10
+ permissions:
11
+ contents: read
12
+
13
+ jobs:
14
+ verify:
15
+ runs-on: ubuntu-latest
16
+ steps:
17
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
18
+ - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
19
+ with:
20
+ python-version: "3.11"
21
+ - run: python -m pip install --upgrade build
22
+ - run: python -m build
23
+ # Verification only, never auto-fix: the SDK is generated formatted, so a diff here means
24
+ # either hand-edited custom code or a regenerate that was not committed. ruff is pinned to
25
+ # the release that produced these bytes, since a formatter minor can change them.
26
+ - run: python -m pip install "ruff==0.16.8"
27
+ - run: ruff format --check .
@@ -0,0 +1,34 @@
1
+ name: Python SDK Release
2
+
3
+ on:
4
+ # Manual re-publish only: the automated publish for each release runs as the `publish` job
5
+ # inside release-please.yml, in the same run that cuts the tag (dispatching a workflow here
6
+ # instead would resolve it on the repository's default branch only, which breaks releasing
7
+ # from any other release line). Dispatch this workflow at an existing release tag to re-run
8
+ # a failed or skipped publish. A dispatched run is top-level, so OIDC trusted-publisher
9
+ # claims name this file; register it as an additional trusted publisher only when manual
10
+ # re-publishes are used. Never add a workflow_call trigger here — registries reject
11
+ # publishes from called (reusable) workflows.
12
+ workflow_dispatch:
13
+
14
+ permissions:
15
+ contents: read
16
+ id-token: write
17
+ packages: write
18
+
19
+ jobs:
20
+ release:
21
+ runs-on: ubuntu-latest
22
+ env:
23
+ VERSIONING_POLICY: manual
24
+ steps:
25
+ - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
26
+ - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
27
+ with:
28
+ python-version: "3.11"
29
+ - run: python -m pip install --upgrade build
30
+ - run: python -m build
31
+ - name: Publish to PyPI
32
+ uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
33
+ with:
34
+ skip-existing: true
@@ -0,0 +1,10 @@
1
+ # Generated by Scalar SDK Generator.
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.egg-info/
5
+ .venv/
6
+ /dist/
7
+ /build/
8
+ .mypy_cache/
9
+ .pytest_cache/
10
+ .ruff_cache/
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.2.0"
3
+ }
@@ -0,0 +1,8 @@
1
+ # Changelog
2
+
3
+ ## [0.2.0](https://github.com/brellium-ai/api-client-python/compare/v0.1.0...v0.2.0) (2026-11-05)
4
+
5
+
6
+ ### Features
7
+
8
+ * **api:** initial SDK generation ([7e7dafb](https://github.com/brellium-ai/api-client-python/commit/7e7dafb7ad18c0a6ad8738fa3c8974ed17e68e1b))
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 Brellium API
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.