Organizations
Access organizations through client.organizations in the Datature Vi SDK.
The organizations resource gives you programmatic access to your Datature Vi organization. You can retrieve billing tier, user lists, enabled features, lock status, and the full list of dataset IDs that belong to your organization. All data is read-only through the SDK. Changes to organization settings happen in the platform UI.
Before You Start
- Vi SDK installed with authentication configured
- A secret key with organization access permissions
- Familiarity with Vi SDK basics
Methods
info()
Print a formatted summary of the current organization to the console. Use get() instead when you need the Organization object for programmatic access.
client.organizations.info() # Prints formatted organization summaryReturns: None (prints to console)
get()
Get the current organization object.
org = client.organizations.get()
print(f"Organization: {org.name}")
print(f"ID: {org.organization_id}")
print(f"Datasets: {len(org.datasets)}")org = client.organizations.get()
print(f"Organization: {org.name}")
print(f"ID: {org.organization_id}")
print(f"Plan: {org.billing.tier}")
print(f"Datasets: {len(org.datasets)}")
print(f"Users: {len(org.users)}")org = client.organizations.get()
print("Organization Users:")
for user_id, user in org.users.items():
print(f" {user_id}: {user.workspace_role}")
if user.datasets:
print(f" Datasets: {len(user.datasets)}")org = client.organizations.get()
print("Enabled Features:")
for feature, enabled in org.features.items():
status = "enabled" if enabled else "disabled"
print(f" {feature}: {status}")org = client.organizations.get()
if org.lock_status.is_locked:
print("Organization is locked")
if org.lock_status.lockDate:
from datetime import datetime
lock_date = datetime.fromtimestamp(org.lock_status.lockDate / 1000)
print(f" Locked on: {lock_date}")
else:
print("Organization is active")
print(f"Billing Tier: {org.billing.tier}")
print(f"Billing Email: {org.billing.email}")org = client.organizations.get()
print(f"Datasets in {org.name}:")
for dataset_id in org.datasets:
dataset = client.datasets.get(dataset_id)
print(f" {dataset.name} ({dataset_id})")
print(f" Assets: {dataset.statistic.asset_total}")
print(f" Annotations: {dataset.statistic.annotation_total}")from datetime import datetime
org = client.organizations.get()
print("Organization Metadata:")
if org.metadata.create_date:
created = datetime.fromtimestamp(org.metadata.create_date / 1000)
print(f" Created: {created}")
print(f" Public: {org.metadata.is_public}")
if org.metadata.account_manager:
print(f" Account Manager: {org.metadata.account_manager}")Returns: Organization
Response types
Organization
from vi.api.resources.organizations.responses import OrganizationMethods: info() → prints a formatted organization summary.
OrganizationBilling
from vi.api.resources.organizations.responses import OrganizationBillingOrganizationMetadata
from vi.api.resources.organizations.responses import OrganizationMetadataOrganizationLockStatus
from vi.api.resources.organizations.responses import OrganizationLockStatusRelated resources
Updated 30 days ago
