To assign resources to your default project, send a POST request to /v2/projects/default/resources
.
import os
from pydo import Client
client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))
req = {
"resources": [
"do:droplet:13457723",
"do:domain:example.com"
]
}
resp = client.projects.assign_resources_default(body=req)
See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.