Create a new app by submitting an app specification. For documentation on app specifications (AppSpec
objects), please refer to the product documentation.
import os
from pydo import Client
client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))
create_resp = client.apps.create(
{
"spec": {
"name": "web-app",
"region": "nyc",
"services": [
{
"name": "api",
"github": {},
"run_command": "bin/api",
"environment_slug": "node-js",
"instance_count": 2,
"instance_size_slug": "apps-s-1vcpu-0.5gb",
"routes": [],
}
],
}
}
)
See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.