Skip to content

Commit a566252

Browse files
njbrakeclaude
andcommitted
Add generated control-plane client (preview)
Generated control-plane client (keys, users, budgets, pricing, usage) from the otari gateway OpenAPI spec via OpenAPI Generator. Preview for review and integration design; not yet wired into the public client. Part of mozilla-ai/otari#96 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 2a76998 commit a566252

91 files changed

Lines changed: 14540 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# NOTE: This file is auto generated by OpenAPI Generator.
2+
# URL: https://openapi-generator.tech
3+
#
4+
# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
5+
6+
name: otari_control_plane Python package
7+
8+
on: [push, pull_request]
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
build:
15+
16+
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v4
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install -r requirements.txt
31+
pip install -r test-requirements.txt
32+
- name: Test with pytest
33+
run: |
34+
pytest --cov=otari_control_plane

src/otari/_generated/.gitignore

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
env/
12+
build/
13+
develop-eggs/
14+
dist/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
lib/
19+
lib64/
20+
parts/
21+
sdist/
22+
var/
23+
*.egg-info/
24+
.installed.cfg
25+
*.egg
26+
27+
# PyInstaller
28+
# Usually these files are written by a python script from a template
29+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
30+
*.manifest
31+
*.spec
32+
33+
# Installer logs
34+
pip-log.txt
35+
pip-delete-this-directory.txt
36+
37+
# Unit test / coverage reports
38+
htmlcov/
39+
.tox/
40+
.coverage
41+
.coverage.*
42+
.cache
43+
nosetests.xml
44+
coverage.xml
45+
*,cover
46+
.hypothesis/
47+
venv/
48+
.venv/
49+
.python-version
50+
.pytest_cache
51+
52+
# Translations
53+
*.mo
54+
*.pot
55+
56+
# Django stuff:
57+
*.log
58+
59+
# Sphinx documentation
60+
docs/_build/
61+
62+
# PyBuilder
63+
target/
64+
65+
# Ipython Notebook
66+
.ipynb_checkpoints
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# NOTE: This file is auto generated by OpenAPI Generator.
2+
# URL: https://openapi-generator.tech
3+
#
4+
# ref: https://docs.gitlab.com/ee/ci/README.html
5+
# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml
6+
7+
stages:
8+
- test
9+
10+
.pytest:
11+
stage: test
12+
script:
13+
- pip install -r requirements.txt
14+
- pip install -r test-requirements.txt
15+
- pytest --cov=otari_control_plane
16+
17+
pytest-3.10:
18+
extends: .pytest
19+
image: python:3.10-alpine
20+
pytest-3.11:
21+
extends: .pytest
22+
image: python:3.11-alpine
23+
pytest-3.12:
24+
extends: .pytest
25+
image: python:3.12-alpine
26+
pytest-3.13:
27+
extends: .pytest
28+
image: python:3.13-alpine
29+
pytest-3.14:
30+
extends: .pytest
31+
image: python:3.14-alpine
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# OpenAPI Generator Ignore
2+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
3+
4+
# Use this file to prevent files from being overwritten by the generator.
5+
# The patterns follow closely to .gitignore or .dockerignore.
6+
7+
# As an example, the C# client generator defines ApiClient.cs.
8+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9+
#ApiClient.cs
10+
11+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
12+
#foo/*/qux
13+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14+
15+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16+
#foo/**/qux
17+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18+
19+
# You can also negate patterns with an exclamation (!).
20+
# For example, you can ignore all files in a docs folder with the file extension .md:
21+
#docs/*.md
22+
# Then explicitly reverse the ignore rule for a single file:
23+
#!docs/README.md
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
.github/workflows/python.yml
2+
.gitignore
3+
.gitlab-ci.yml
4+
.openapi-generator-ignore
5+
.travis.yml
6+
README.md
7+
docs/BudgetResponse.md
8+
docs/BudgetsApi.md
9+
docs/CreateBudgetRequest.md
10+
docs/CreateKeyRequest.md
11+
docs/CreateKeyResponse.md
12+
docs/CreateUserRequest.md
13+
docs/HTTPValidationError.md
14+
docs/KeyInfo.md
15+
docs/KeysApi.md
16+
docs/LocationInner.md
17+
docs/PricingApi.md
18+
docs/PricingResponse.md
19+
docs/SetPricingRequest.md
20+
docs/UpdateBudgetRequest.md
21+
docs/UpdateKeyRequest.md
22+
docs/UpdateUserRequest.md
23+
docs/UsageApi.md
24+
docs/UsageEntry.md
25+
docs/UsageLogResponse.md
26+
docs/UserResponse.md
27+
docs/UsersApi.md
28+
docs/ValidationError.md
29+
git_push.sh
30+
otari_control_plane/__init__.py
31+
otari_control_plane/api/__init__.py
32+
otari_control_plane/api/budgets_api.py
33+
otari_control_plane/api/keys_api.py
34+
otari_control_plane/api/pricing_api.py
35+
otari_control_plane/api/usage_api.py
36+
otari_control_plane/api/users_api.py
37+
otari_control_plane/api_client.py
38+
otari_control_plane/api_response.py
39+
otari_control_plane/configuration.py
40+
otari_control_plane/exceptions.py
41+
otari_control_plane/models/__init__.py
42+
otari_control_plane/models/budget_response.py
43+
otari_control_plane/models/create_budget_request.py
44+
otari_control_plane/models/create_key_request.py
45+
otari_control_plane/models/create_key_response.py
46+
otari_control_plane/models/create_user_request.py
47+
otari_control_plane/models/http_validation_error.py
48+
otari_control_plane/models/key_info.py
49+
otari_control_plane/models/location_inner.py
50+
otari_control_plane/models/pricing_response.py
51+
otari_control_plane/models/set_pricing_request.py
52+
otari_control_plane/models/update_budget_request.py
53+
otari_control_plane/models/update_key_request.py
54+
otari_control_plane/models/update_user_request.py
55+
otari_control_plane/models/usage_entry.py
56+
otari_control_plane/models/usage_log_response.py
57+
otari_control_plane/models/user_response.py
58+
otari_control_plane/models/validation_error.py
59+
otari_control_plane/py.typed
60+
otari_control_plane/rest.py
61+
pyproject.toml
62+
requirements.txt
63+
setup.cfg
64+
setup.py
65+
test-requirements.txt
66+
test/__init__.py
67+
test/test_budget_response.py
68+
test/test_budgets_api.py
69+
test/test_create_budget_request.py
70+
test/test_create_key_request.py
71+
test/test_create_key_response.py
72+
test/test_create_user_request.py
73+
test/test_http_validation_error.py
74+
test/test_key_info.py
75+
test/test_keys_api.py
76+
test/test_location_inner.py
77+
test/test_pricing_api.py
78+
test/test_pricing_response.py
79+
test/test_set_pricing_request.py
80+
test/test_update_budget_request.py
81+
test/test_update_key_request.py
82+
test/test_update_user_request.py
83+
test/test_usage_api.py
84+
test/test_usage_entry.py
85+
test/test_usage_log_response.py
86+
test/test_user_response.py
87+
test/test_users_api.py
88+
test/test_validation_error.py
89+
tox.ini
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
7.22.0

src/otari/_generated/.travis.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# ref: https://docs.travis-ci.com/user/languages/python
2+
language: python
3+
python:
4+
- "3.10"
5+
- "3.11"
6+
- "3.12"
7+
- "3.13"
8+
- "3.14"
9+
# uncomment the following if needed
10+
#- "3.14-dev" # 3.14 development branch
11+
#- "nightly" # nightly build
12+
# command to install dependencies
13+
install:
14+
- "pip install -r requirements.txt"
15+
- "pip install -r test-requirements.txt"
16+
# command to run tests
17+
script: pytest --cov=otari_control_plane

0 commit comments

Comments
 (0)