Creates a new serverless functions namespace in the desired region and associates it with the provided label. A namespace is a collection of functions and their associated packages, triggers, and project specifications. To create a namespace, send a POST request to /v2/functions/namespaces
with the region
and label
properties.
import os
from pydo import Client
client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))
req = {
"region": "nyc1",
"label": "my namespace"
}
resp = client.functions.create_namespace(body=req)
See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.