Metadata-Version: 2.4
Name: darwin-sdk
Version: 0.4.0
Summary: Official Python SDK for Darwin
Author: Darwin
License-Expression: MIT
Project-URL: Documentation, https://darwin.so/docs/surfaces/api
Project-URL: Issues, https://github.com/darwin-studios/darwin/issues
Project-URL: Repository, https://github.com/darwin-studios/darwin-python
Keywords: darwin,agent,sdk
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: anyio>=3.0.0
Requires-Dist: httpx>=0.23.0
Requires-Dist: pydantic<3,>=1.9.2
Requires-Dist: typing-extensions>=4.0.0
Dynamic: license-file

# Darwin Python SDK

The primary client covers the same eleven live operations exposed through Darwin MCP: Search, account context, Search history, and the complete Start/Get/List/Continue/Authenticate/Pay/Approve/End Action flow. It also includes the bounded developer account, application, and API-key endpoints documented in the public OpenAPI contract.

```bash
pip install darwin-sdk
```

```python
import os

from darwin_sdk import Darwin

darwin = Darwin(api_key=os.environ["DARWIN_API_KEY"])
found = darwin.search(query="OCR that handles handwriting and tables")
outcome = darwin.start_action(
    capability_id=found.results[0].capability_id,
    capability_revision=found.results[0].capability_revision,
    inputs={"file": "https://example.com/invoice.pdf"},
    request_id="req_123",
)
```

The client is generated from Darwin's public `/api/v2` OpenAPI contract and defaults to `https://api.darwin.so/api/v2`. Treat each Action's `available_actions` and typed interaction as the mutation authority. See [the API guide](https://darwin.so/docs/surfaces/api) for authentication, payment, approval, continuation, and closure examples.
