SDK and Client Libraries
Validated on 26 Mar 2026 • Last edited on 31 Mar 2026
DigitalOcean provides official SDK client libraries for TypeScript, Go, and Python. Community-maintained libraries are also available for additional languages and frameworks.
Official SDKs
These libraries are built and maintained by DigitalOcean. Each wraps the DigitalOcean API v2 and receives regular updates.
| Language | Library | Install |
|---|---|---|
| TypeScript | DoTs | npm i @digitalocean/dots |
| Go | Godo | go get github.com/digitalocean/godo |
| Python | PyDo | pip install pydo |
| TypeScript | Gradient AI TypeScript SDK | npm install @digitalocean/gradient |
| Python | Gradient AI Python SDK | See Gradient AI documentation |
Get Started
All official SDKs authenticate with a personal access token. Set your token as an environment variable before running the examples below.
export DIGITALOCEAN_TOKEN="your_api_token"Prerequisites: Node.js 18+, TypeScript 5+, and "type": "module" in your package.json.
Install the package:
npm i @digitalocean/dotsCreate a client and list your Droplets:
import {
createDigitalOceanClient,
DigitalOceanApiKeyAuthenticationProvider,
FetchRequestAdapter,
} from "@digitalocean/dots";
const token = process.env.DIGITALOCEAN_TOKEN;
const authProvider = new DigitalOceanApiKeyAuthenticationProvider(token!);
const adapter = new FetchRequestAdapter(authProvider);
const client = createDigitalOceanClient(adapter);
const resp = await client.v2.droplets.get();
if (resp?.droplets) {
for (const droplet of resp.droplets) {
console.log(`${droplet.id}: ${droplet.name}`);
}
}See the DoTs repository for more examples.
Install the module:
go get github.com/digitalocean/godoCreate a client and list your Droplets:
package main
import (
"context"
"fmt"
"github.com/digitalocean/godo"
)
func main() {
client := godo.NewFromToken("your_api_token")
droplets, _, err := client.Droplets.List(context.TODO(), &godo.ListOptions{})
if err != nil {
fmt.Printf("Error: %s\n", err)
return
}
for _, d := range droplets {
fmt.Printf("%d: %s\n", d.ID, d.Name)
}
}See the Godo documentation for the full API reference.
Prerequisite: Python 3.7.2+.
Install the package:
pip install pydoCreate a client and list your Droplets:
import os
from pydo import Client
client = Client(token=os.getenv("DIGITALOCEAN_TOKEN"))
resp = client.droplets.list()
for droplet in resp["droplets"]:
print(f"{droplet['id']}: {droplet['name']}")See the PyDo documentation for the full API reference.
Deprecated SDKs
The following SDK is no longer actively maintained.
| Language | Library | Status |
|---|---|---|
| Ruby | DropletKit | Deprecated. Use the DigitalOcean API directly or one of the supported SDKs above. |
Community Libraries
These libraries are created and maintained by community members. DigitalOcean does not provide official support for them. Consult each project’s repository for documentation, issue tracking, and maintenance status.
| Language | Library | Description |
|---|---|---|
| Ansible | digitalocean.cloud | Ansible collection for managing DigitalOcean resources. |
| .NET | DigitalOcean.API | .NET implementation for the DigitalOcean API. |
| PHP | DigitalOceanPHP | PHP wrapper for the DigitalOcean API. |
| PHP | Laravel DigitalOcean | DigitalOcean API client bridge for Laravel. |
| Python | python-digitalocean | Python module for managing DigitalOcean Droplets. |