Skip to content

Commit ed85f26

Browse files
Knowledge Stackclaude
andcommitted
chore: initial commit — seed from ks-backend codegen output (ksapi v1.67.0)
Populated from ks-backend/codegen/ks-backend-python/ at the time of the v1.67.0 PyPI release. Future regenerations should push to this repo from the ks-backend codegen pipeline. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 parents  commit ed85f26

691 files changed

Lines changed: 101682 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.

.github/CODEOWNERS

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Every PR auto-requests review from @knowledgestack/ks-admins.
2+
# Branch protection on `main` requires approval from a code owner.
3+
#
4+
# This repo is populated by the codegen pipeline in ks-backend. Regenerated
5+
# commits should still go through CI and a maintainer-level review before
6+
# merging to main.
7+
8+
* @knowledgestack/ks-admins
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: 🐛 Bug report
2+
description: Bug in the generated `ksapi` Python client.
3+
title: "[bug] "
4+
labels: ["bug", "needs-triage"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
This package is generated from the Knowledge Stack OpenAPI spec. If the bug is in an endpoint's behavior, file it upstream in ks-backend; if it's in how this client code wraps an endpoint, file it here.
10+
11+
- type: input
12+
id: version
13+
attributes:
14+
label: ksapi version
15+
placeholder: "pip show ksapi | grep Version"
16+
validations:
17+
required: true
18+
19+
- type: textarea
20+
id: what-happened
21+
attributes:
22+
label: What happened
23+
description: Expected vs. actual. Include the request/response if you captured them.
24+
validations:
25+
required: true
26+
27+
- type: textarea
28+
id: reproduction
29+
attributes:
30+
label: Reproduction
31+
render: python
32+
validations:
33+
required: true
34+
35+
- type: checkboxes
36+
id: checks
37+
attributes:
38+
label: Before submitting
39+
options:
40+
- label: I've verified this isn't an API-level issue that belongs in ks-backend.
41+
required: true
42+
- label: I've redacted API keys from logs / snippets.
43+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: 🎮 Discord — fastest help
4+
url: https://discord.gg/McHmxUeS
5+
about: Live architecture + implementation questions.
6+
- name: 💬 ks-cookbook Discussions
7+
url: https://github.com/knowledgestack/ks-cookbook/discussions
8+
about: Long-form questions, ideas, and showcase posts.
9+
- name: 🔒 Report a security vulnerability
10+
url: https://github.com/knowledgestack/ks-sdk/security/advisories/new
11+
about: Found a security issue? Report privately instead of opening a public issue.
12+
- name: 🔧 API changes — file in ks-backend
13+
url: https://github.com/knowledgestack/ks-cookbook/discussions
14+
about: This SDK is generated from the OpenAPI spec. API-shape issues should be raised upstream.

.github/pull_request_template.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!-- Most content in this repo is regenerated from the OpenAPI spec upstream.
2+
Only edit generated files if you know what you're doing. -->
3+
4+
## Summary
5+
6+
<!-- 1–3 sentences. What changed and why? -->
7+
8+
## Type of change
9+
10+
- [ ] 🤖 Regeneration from OpenAPI spec (automated bot PR)
11+
- [ ] 🐛 Bug fix in generated code (manual override)
12+
- [ ] 🧰 Tooling / CI / release pipeline
13+
- [ ] 📖 Docs
14+
- [ ] 🧹 Refactor
15+
- [ ] 💥 Breaking change
16+
17+
## Upstream spec version
18+
19+
<!-- If this is a regeneration, what upstream ks-backend commit/tag produced the spec? -->
20+
21+
## Test plan
22+
23+
- [ ] `uv run pytest test/` (if applicable)
24+
- [ ] Smoke test against a live or mocked Knowledge Stack endpoint
25+
- [ ] Diff reviewed — no unexpected breakages in public API surface
26+
27+
## Checklist
28+
29+
- [ ] No API keys in the diff
30+
- [ ] `pyproject.toml` version bump aligned with upstream OpenAPI spec version
31+
- [ ] Changelog entry added if behavior-visible to SDK consumers
32+
33+
## Notes

.github/workflows/ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.11", "3.12"]
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Install uv
19+
uses: astral-sh/setup-uv@v3
20+
with:
21+
enable-cache: true
22+
23+
- name: Set up Python
24+
run: uv python install ${{ matrix.python-version }}
25+
26+
- name: Install (build-only — generated client has no unit tests that require a live backend)
27+
run: |
28+
uv venv
29+
uv pip install -e .
30+
31+
- name: Import smoke test
32+
run: |
33+
uv run python -c "import ksapi; print('ksapi OK, version', ksapi.__version__ if hasattr(ksapi, '__version__') else 'unknown')"

.github/workflows/python.yml

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: ksapi 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.9", "3.10", "3.11", "3.12", "3.13"]
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=ksapi

.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

.gitlab-ci.yml

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=ksapi
16+
17+
pytest-3.9:
18+
extends: .pytest
19+
image: python:3.9-alpine
20+
pytest-3.10:
21+
extends: .pytest
22+
image: python:3.10-alpine
23+
pytest-3.11:
24+
extends: .pytest
25+
image: python:3.11-alpine
26+
pytest-3.12:
27+
extends: .pytest
28+
image: python:3.12-alpine
29+
pytest-3.13:
30+
extends: .pytest
31+
image: python:3.13-alpine

.openapi-generator-ignore

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

0 commit comments

Comments
 (0)