from ndi_sdk import NdiClient
from ndi_sdk.models.common import AccessConfig, AccessLabel
with NdiClient() as client:
client.domains.create_access_label(
name="financial",
description="Financial statements, invoices, and extracts.",
)
client.domains.create_access_label(
name="audit_only",
description="Restricted to the audit team.",
)
workspace = client.workspaces.create(
name="q4-audit",
access=AccessConfig(
labels=[
AccessLabel(name="financial", description="Financial statements, invoices, and extracts."),
AccessLabel(name="audit_only", description="Restricted to the audit team."),
],
default_label="financial",
),
)
print(workspace.workspace_id)