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.
Generating from the dashboard
Section titled “Generating from the dashboard”- Go to SDK in the dashboard sidebar
- Choose a language from the dropdown
- Preview the generated code
- Click Download or Copy
Regenerate after adding or editing endpoints — the SDK reflects your current endpoint configuration.
Supported languages
Section titled “Supported languages”TypeScript
Section titled “TypeScript”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.
Python
Section titled “Python”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.
API endpoint
Section titled “API endpoint”You can also generate SDKs programmatically:
# Previewcurl -H "Cookie: token=..." https://hub.wrapd.sh/api/sdk/generate?lang=python
# Downloadcurl -H "Cookie: token=..." -o wrapd_sdk.py \ "https://hub.wrapd.sh/api/sdk/generate?lang=python&download=true"How parameters map
Section titled “How parameters map”Endpoint arguments become function parameters:
| Endpoint arg | Python | TypeScript | Go |
|---|---|---|---|
| Required arg | positional str | required property | string param |
| Optional arg | Optional[str] = default | optional property | string param |
All parameters are strings since endpoint arguments are passed as string values.
What’s included
Section titled “What’s included”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