-
Notifications
You must be signed in to change notification settings - Fork 3k
Feat/python sdk #2779
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/python sdk #2779
Conversation
…; add generation script and docs; verified by running generator and importing generated client
…v dev-dependencies
…erver or CLI; add flags and docs; verified generation via CLI path
…rts CLI/server sources and verified OpenAPI 3.1.1 compatibility
…wrapper (OpenCodeClient) with SSE and helpers; format post-generation; update docs and TODO
… and convenience methods (agents, projects, files, tools); mark Phase 4 progress in TODO
…rsing test, retry behavior; docs: update README examples; TODO: check off Phase 5 items
…), error-handling docs; extend tests incl. generated API call; mark Phase 5 items in TODO; format/lint
…d validate endpoints (path, project, SSE); mark Phase 5 fully complete in TODO.md
…nerate; add CI job to generate and test Python SDK; remove Stainless python target; update TODO
…ement publish script (build+twine), add dev deps (build, twine), add PyPI badge; update TODO
…e (config/sessions/files/streaming), generation, testing, publishing; wire mkdocs deps; update README with docs preview
…, ignore site/; verify no secrets; update TODO; tests passing
f16de3d to
cc0d460
Compare
|
@Kking112 sorry for such a delay, when you started this i wasn't sure what would be accepted but now Im responsible for reviewing prs and things, I would love to merge this can you outline the next steps we would need to get this shipped and can you make a brief summary of the changes? |
Hey, No Problem at all! I will write up a summary of the changes plus any other information necessary for merging this in the next few days! I'll also resolve the package.json conflict that was auto detected. Looking forward to seeing this merged once I'm done! Thanks. |
|
amazing thanks! |
|
Hey @rekram1-node , so here are the changes I made, along with what's (potentially) left to do before merging: Summary of changes (feat/python_sdk)• New Python SDK package: packages/sdk/python with uv-based dev setup (pyproject.toml), openapi-python-client.yaml, generator (scripts/generate.py), publish helper (scripts/publish.py), examples/, tests/, and full MkDocs docs (docs/, mkdocs.yml). What’s left before mergeThere shouldn't be much left before merging, at least not as far as I can tell. The main two: |
|
I just resolved the conflict in package.json, so it should be good to merge when you are ready @rekram1-node . Again, if you want me to change anything, let me know. Thanks! |
|
There is an issue with the "publish-python-sdk.yml" file which caused the workflow to fail. I'm working on fixing it now, although I'm still pretty unexperienced with github actions/workflows so it may take a few tries, apologies in advance. Will continue trying until it's fixed. |
…v python and handle missing GITHUB_REF_NAME; strip leading 'v' from tag
…k to @opencode-ai/sdk; add pre-push install; add temporary workarounds in console-function/slack to unblock push
|
I'm going to keep trying to fix the workflows that are failing, but if someone who has more experience with github actions/workflows (or just CI/CD in general) wants to try to fix these final issue themselves, please feel free to do so, I would greatly appreciate it. |
|
im gonna disable / remove some of the actions for now, we will figure out how to publish it next once we have a pypi account setup |
|
Thanks @Kking112 |


Created a Python SDK for OpenCode. I used openapi-python-client instead of stainless, as requested in #2266 .
I know that OpenCode normally does not take PR's for core features, but I wanted to do this for a few reasons and I figured I'd see what you guys think.
I expect there will be many changes to be made before merging is considered, so any feedback and constructive criticism is encouraged. I have done basic testing of the SDK but will likely do more in the coming days.