Skip to main content

Python SDK for Uno — the ClawdChat agent tool gateway (2000+ tools). Sync & async clients, OpenAI/Anthropic adapters.

Project description

Uno SDK for Python

Search and call 2000+ real-world tools from Python in two lines. Powered by ClawdChat.

PyPI Python License

Install

pip install uno-sdk                    # core
pip install uno-sdk[openai]            # + OpenAI adapter
pip install uno-sdk[anthropic]         # + Anthropic adapter
pip install uno-sdk[all]               # everything

Note on naming: the PyPI distribution is uno-sdk and the import name is uno_sdk. The bare uno PyPI slot is held by an unrelated Python 2-era package (2014, no longer installable) — uno_sdk keeps our namespace clean.

Quick Start

from uno_sdk import Uno

uno = Uno(api_key="uk-xxx")

# Search tools
tools = uno.search("send email")
print(tools[0].name, tools[0].description)

# Call a tool
result = uno.call("email.send_email", {
    "to": "alice@example.com",
    "subject": "Hello",
    "body": "Hi from Uno!"
})
print(result.data)

OpenAI Integration

from uno_sdk import Uno
from uno_sdk.adapters import OpenAIAdapter
from openai import OpenAI

uno = Uno(api_key="uk-xxx")
openai_client = OpenAI()

# Get tools in OpenAI format
tools = uno.search("weather", adapter=OpenAIAdapter())

# Use with chat completions
response = openai_client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "What's the weather in Beijing?"}],
    tools=tools,
)

# Execute the tool call
if response.choices[0].message.tool_calls:
    tc = response.choices[0].message.tool_calls[0]
    import json
    slug = OpenAIAdapter.slug_from_function_name(tc.function.name)
    result = uno.call(slug, json.loads(tc.function.arguments))
    print(result.data)

Anthropic Integration

from uno_sdk import Uno
from uno_sdk.adapters import AnthropicAdapter
import anthropic

uno = Uno(api_key="uk-xxx")
client = anthropic.Anthropic()

tools = uno.search("search", adapter=AnthropicAdapter())
response = client.messages.create(
    model="claude-sonnet-4-20250514",
    messages=[{"role": "user", "content": "Search for AI news"}],
    tools=tools,
    max_tokens=1024,
)

Async

from uno_sdk import AsyncUno

async with AsyncUno(api_key="uk-xxx") as uno:
    tools = await uno.search("translate")
    result = await uno.call("translate.text", {"text": "hello", "to": "zh"})

MCP (Claude Desktop / Cursor)

No SDK needed — connect directly:

{
  "mcpServers": {
    "uno": {
      "url": "https://clawdtools.uno/mcp"
    }
  }
}

OAuth login opens automatically in your browser.

Error Handling

from uno_sdk.exceptions import AuthRequiredError, QuotaError, ToolNotFoundError

try:
    result = uno.call("github.list_repos", {})
except AuthRequiredError as e:
    print(f"Please authorize: {e.auth_url}")
except QuotaError:
    print("Out of credits — visit https://clawdtools.uno/pricing")
except ToolNotFoundError:
    print("Tool not found — search first")

API

Uno(api_key, base_url="https://clawdtools.uno", timeout=180)

Method Returns Description
search(query, limit=10, adapter=None) list[Tool] or list[dict] Search tools
call(tool, arguments={}) CallResult Call a tool
me() dict Current user info

AsyncUno has the same methods, all async.

Tool

Field Type Description
slug str Tool identifier (e.g. weather.get_current)
name str Display name
description str What the tool does
input_schema dict JSON Schema for arguments
auth_required bool Needs OAuth?
pricing_mode str free / per_call / per_token
credit_cost float Credits per call

CallResult

Field Type Description
data Any Tool response data
error str | None Error message if failed
meta dict Latency, credits used
ok bool True if no error

Companion: Uno CLI

Prefer a command-line flow? pip install uno-cli ships the uno command (search, call, multi-account OAuth, scope enforcement) — same credentials file, same gateway. See uno-cli.

Get an API Key

  1. Visit clawdtools.uno/login
  2. Log in with ClawdChat / Google / Phone
  3. Copy your API key from the Dashboard

License

MIT © ClawdChat.

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

uno_sdk-1.0.0.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

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

uno_sdk-1.0.0-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file uno_sdk-1.0.0.tar.gz.

File metadata

  • Download URL: uno_sdk-1.0.0.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for uno_sdk-1.0.0.tar.gz
Algorithm Hash digest
SHA256 63f614307e3c9858d7b05d5ca72520b76532723b5032728c2ee76260fc6f05d1
MD5 8097fda232e0d9a9a7d8452a02b4ad46
BLAKE2b-256 b7b1ac1f8b42fc6112d2d83a66fc826b27e046455b9654d5304e9821c009bc5b

See more details on using hashes here.

File details

Details for the file uno_sdk-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: uno_sdk-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for uno_sdk-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fdcd6cfdf39ad85850addbfb82c4ec3a240f89fe3801b4739edfc508ce774a91
MD5 d884cb357e6c5916a5f78c80b0be1ffa
BLAKE2b-256 961f0dfebd2fe653009b54d57906c7a05ffcaf5908aeb8a0449d1fc50fdd172a

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