Lightweight multi-provider LLM SDK with streaming and tools
Project description
Dobby SDK
Lightweight multi-provider LLM SDK with streaming and tool support.
Installation
pip install dobby-sdk
# Or from GitHub
pip install git+https://github.com/TYNYBAY/dobby-sdk.git
# With uv
uv add dobby-sdk
Quick Start
from dobby import AgentExecutor, OpenAIProvider
from dobby.types import UserMessagePart, TextPart, TextDeltaEvent
provider = OpenAIProvider(model="gpt-4o", api_key="sk-...")
executor = AgentExecutor(provider="openai", llm=provider)
messages = [UserMessagePart(parts=[TextPart(text="Hello!")])]
async for event in executor.run_stream(messages):
match event:
case TextDeltaEvent(delta=delta):
print(delta, end="")
Features
- Multi-provider: OpenAI, Azure OpenAI, Anthropic
- Streaming: Real-time token streaming with typed events
- Tools: Dataclass-based tools with auto-generated schemas
- Context injection: Pass runtime context to tools via
Injected[T] - Structured output: Pydantic model validation for agent responses
Documentation
See docs/ for detailed documentation:
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dobby_sdk-0.2.4.tar.gz
(105.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
dobby_sdk-0.2.4-py3-none-any.whl
(41.3 kB
view details)
File details
Details for the file dobby_sdk-0.2.4.tar.gz.
File metadata
- Download URL: dobby_sdk-0.2.4.tar.gz
- Upload date:
- Size: 105.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ddebc99520d513b3290426e303c13e1a1ca554283164cfec052e44af8182fd2b
|
|
| MD5 |
0d6a22a5e3212a11e14ce5373e4e27b3
|
|
| BLAKE2b-256 |
2ba54cd2b880430542c963b0a55d1afaa47ef16a636271c778a6d34bc45f8289
|
File details
Details for the file dobby_sdk-0.2.4-py3-none-any.whl.
File metadata
- Download URL: dobby_sdk-0.2.4-py3-none-any.whl
- Upload date:
- Size: 41.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6bac6ba581255acc5735d15ed01a704c3807ce18a33315bfc039b51338544c0
|
|
| MD5 |
2091702e4f129c93219060c034442ff1
|
|
| BLAKE2b-256 |
82f59ae2f740beb42ccc11b32d0b98c6de5fc6f1d33aabe2d184abf052ebd49a
|