Files
OpenShell/python/openshell/__init__.py
T
Max Dubrinsky 66696eb1c8 feat(python): expose sandbox status conditions in the SDK (#4436)
* feat(python): expose sandbox status conditions in the SDK

Add SandboxConditionRef and surface status.conditions on SandboxStatusRef and SandboxRef. Callers need condition reasons and transition times to time terminal transitions and explain failures that happen before the main process starts, without reading the raw proto.

Signed-off-by: Max Dubrinsky <mdubrinsky@nvidia.com>

* test(python): use real gateway condition values in conditions fixtures

Signed-off-by: Max Dubrinsky <mdubrinsky@nvidia.com>

---------

Signed-off-by: Max Dubrinsky <mdubrinsky@nvidia.com>
2026-10-12 19:05:43 +00:00

70 lines
1.6 KiB
Python

# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
"""OpenShell - Agent execution and management SDK."""
from __future__ import annotations
from .errors import ErrorInfo, FieldViolation, GatewayError, from_grpc_error
from .mutations import DeletionOutcome, DeletionResult
from .providers import ProviderClient, ProviderCredentialValue
from .sandbox import (
ClientCredentialsAuth,
ExecChunk,
ExecResult,
Page,
Pager,
Sandbox,
SandboxClient,
SandboxConditionRef,
SandboxError,
SandboxRef,
SandboxSession,
SandboxStatusRef,
SandboxTemplateClient,
SandboxWorkloadTemplateProvenanceRef,
ServiceAuthorizationMode,
ServiceExposure,
TlsConfig,
WorkspaceClient,
WorkspaceRef,
)
try:
from importlib.metadata import version
__version__ = version("openshell")
except Exception:
__version__ = "0.0.0"
__all__ = [
"ClientCredentialsAuth",
"DeletionOutcome",
"DeletionResult",
"ErrorInfo",
"ExecChunk",
"ExecResult",
"FieldViolation",
"GatewayError",
"Page",
"Pager",
"ProviderClient",
"ProviderCredentialValue",
"Sandbox",
"SandboxClient",
"SandboxConditionRef",
"SandboxError",
"SandboxRef",
"SandboxSession",
"SandboxStatusRef",
"SandboxTemplateClient",
"SandboxWorkloadTemplateProvenanceRef",
"ServiceAuthorizationMode",
"ServiceExposure",
"TlsConfig",
"WorkspaceClient",
"WorkspaceRef",
"__version__",
"from_grpc_error",
]