Skip to main content

Python client for opencode server API

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

opencode-client

Python client for opencode server API.

Installation

pip install opencode-client

Usage

from opencode_client import OpencodeClient

# Create client (defaults to http://localhost:36000)
client = OpencodeClient()

# Or specify custom URL
client = OpencodeClient(base_url="http://localhost:8000")

# List sessions
sessions = client.list_sessions()

# Send message to session (by ID or title)
response = client.send_message("headless-1", "hello world")

# Get session info
session = client.get_session("ses_abc123")

# Create new session
new_session = client.create_session(title="My Session")

# List messages
messages = client.list_messages("headless-1")

Environment Variables

  • OPENCODE_SERVER - Override default server URL (default: http://localhost:36000)

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

opencode_sdk-0.2.0.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

opencode_sdk-0.2.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file opencode_sdk-0.2.0.tar.gz.

File metadata

  • Download URL: opencode_sdk-0.2.0.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.3

File hashes

Hashes for opencode_sdk-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f804b525f33e0d45eca7dc3734ad2f77fa186a986edcdd608654338f5facf4d8
MD5 e629a6d29b02d6a91dde069f3af4b0a3
BLAKE2b-256 dfa1a798783ce33c93a4c440200146678082de82ec142742c2ee7c03c1e63fb4

See more details on using hashes here.

File details

Details for the file opencode_sdk-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for opencode_sdk-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d64b6c735560487c6d58f4a8c20c99a19aa9859789f32db8bece8ca07dbeeb15
MD5 02d45a9b48cb4f2342beee5af0db9b69
BLAKE2b-256 ee2c88f75771cde9a94972429a9fb58e5dee8729202ad6dc1bd17b9886cf28e5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page