Skip to content

SDK Generation

Wrapd can generate a typed client library for your endpoints in Python, TypeScript, or Go. The generated SDK includes a base client with auth and SSE handling, plus a function for each endpoint with typed parameters.

  1. Go to SDK in the dashboard sidebar
  2. Choose a language from the dropdown
  3. Preview the generated code
  4. Click Download or Copy

Regenerate after adding or editing endpoints — the SDK reflects your current endpoint configuration.

import { deploy } from "./wrapd_sdk";
const result = await deploy({ env: "staging", tag: "v1.2.3" });
console.log(result.output);

The generated file uses fetch with SSE parsing. No external dependencies required.

from wrapd_sdk import deploy
result = deploy(env="staging", tag="v1.2.3")
print(result)

Requires requests (pip install requests).

import "yourproject/wrapd"
result, err := wrapd.Deploy("staging", "v1.2.3")

Uses the standard library net/http — no external dependencies.

You can also generate SDKs programmatically:

Terminal window
# Preview
curl -H "Cookie: token=..." https://hub.wrapd.sh/api/sdk/generate?lang=python
# Download
curl -H "Cookie: token=..." -o wrapd_sdk.py \
"https://hub.wrapd.sh/api/sdk/generate?lang=python&download=true"

Endpoint arguments become function parameters:

Endpoint argPythonTypeScriptGo
Required argpositional strrequired propertystring param
Optional argOptional[str] = defaultoptional propertystring param

All parameters are strings since endpoint arguments are passed as string values.

The generated SDK includes:

  • A WrapdClient / run() base with API key auth and SSE handling
  • One function per endpoint with typed parameters
  • Environment variable support (WRAPD_API_KEY)
  • Proper error handling