Skip to content

Commit 8a668f0

Browse files
sionsmithclaude
andcommitted
feat: initial Keito Python SDK implementation
Typed, async-first Python SDK wrapping Keito API v2 with dual sync/async clients, Pydantic v2 models, auto-pagination, retry logic, typed error hierarchy, agent metadata builder, and outcome-based billing helpers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
0 parents  commit 8a668f0

52 files changed

Lines changed: 5499 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: ci
2+
on: [push, pull_request]
3+
jobs:
4+
lint:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v4
8+
- uses: actions/setup-python@v5
9+
with:
10+
python-version: "3.12"
11+
- run: pip install -e ".[dev]"
12+
- name: Lint
13+
run: ruff check .
14+
15+
test:
16+
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
20+
steps:
21+
- uses: actions/checkout@v4
22+
- uses: actions/setup-python@v5
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
- run: pip install -e ".[dev]"
26+
- name: Test
27+
run: pytest --cov=keito --cov-report=xml
28+
29+
publish:
30+
needs: [lint, test]
31+
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v4
35+
- uses: actions/setup-python@v5
36+
with:
37+
python-version: "3.12"
38+
- run: pip install build twine
39+
- name: Build
40+
run: python -m build
41+
- name: Publish to PyPI
42+
run: twine upload dist/*
43+
env:
44+
TWINE_USERNAME: __token__
45+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
__pycache__/
2+
*.py[cod]
3+
*$py.class
4+
*.egg-info/
5+
dist/
6+
build/
7+
.eggs/
8+
*.egg
9+
.venv/
10+
venv/
11+
.pytest_cache/
12+
.mypy_cache/
13+
.ruff_cache/
14+
htmlcov/
15+
.coverage
16+
*.so

0 commit comments

Comments
 (0)