Skip to content
View as Markdown
class SecretService()

Project secret namespace.

def __init__(impl: AsyncSecretService, bridge: SyncBridge) -> None
def delete(name: str) -> None

Delete a secret.

def get(name: str) -> SecretMeta

Fetch one secret’s metadata (never its value).

def iter(*,
cursor: Optional[str] = None,
limit: Optional[int] = None) -> Iterator[SecretDto]
def list(*,
cursor: Optional[str] = None,
limit: Optional[int] = None) -> ListResult[SecretDto]

List secret metadata.

def set(name: str,
value: str,
*,
allowed_domains: Sequence[str],
description: Optional[str] = None,
if_not_exists: bool = False) -> SecretMeta

Create or update a write-only secret.

class AsyncSecretService()

Project secret namespace.

Project-scoped secrets (PLAN-SECRETS.md): named key/value pairs stored encrypted in the project. Attach one or more to a sandbox at creation via the secrets create parameter (a list of names); the sandbox receives an opaque per-VM PLACEHOLDER as an environment variable, and the platform’s egress proxy substitutes the real value into outbound HTTPS requests (a plain http:// request carries the placeholder unchanged). The real value NEVER enters the sandbox and is never returned by the API (write-only).

def __init__(transport: AsyncTransport) -> None
async def list(*,
cursor: Optional[str] = None,
limit: Optional[int] = None) -> ListResult[SecretDto]

List secret metadata.

async def iter(*,
cursor: Optional[str] = None,
limit: Optional[int] = None) -> AsyncIterator[SecretDto]
async def get(name: str) -> SecretMeta

Fetch one secret’s metadata (never its value).

async def set(name: str,
value: str,
*,
allowed_domains: Sequence[str],
description: Optional[str] = None,
if_not_exists: bool = False) -> SecretMeta

Create or update a write-only secret.

allowed_domains: The hosts where this secret’s value may be sent (exact or *. wildcard), or ["*"] for any verified host. "*" lets the value reach any HTTPS host, including one a compromised sandbox controls.

async def delete(name: str) -> None

Delete a secret.

SecretDto = _gen.api.Secret
SecretMeta = _gen.api.Secret