mirror of
https://github.com/aljazceru/opencode.git
synced 2026-02-03 07:04:56 +01:00
ignore: python sdk (#2779)
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
This commit is contained in:
22
packages/sdk/python/docs/quickstart.md
Normal file
22
packages/sdk/python/docs/quickstart.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# Quickstart
|
||||
|
||||
Create a client and make your first calls.
|
||||
|
||||
```python
|
||||
from opencode_ai import OpenCodeClient
|
||||
|
||||
client = OpenCodeClient(base_url="http://localhost:4096")
|
||||
|
||||
# List projects
|
||||
for p in client.list_projects() or []:
|
||||
print(p.id, p.directory)
|
||||
|
||||
# Get path info
|
||||
path = client.get_path()
|
||||
print(path.directory)
|
||||
|
||||
# Stream events (sync)
|
||||
for event in client.subscribe_events():
|
||||
print(event)
|
||||
break
|
||||
```
|
||||
Reference in New Issue
Block a user