Skip to content
Roboto
Esc
↑↓navigate↵open⌘Jpreview
On this page

roboto.domain.orgs

Submodules

Package Contents

BindEmailDomainRequest

class roboto.domain.orgs.BindEmailDomainRequest(/, **data)#View Source

Bases: pydantic.BaseModel

Request payload to bind an email domain to an organization.

Parameters

data Any

Attributes

BindEmailDomainRequest.email_domain

email_domain str #

Email domain to bind (e.g., “example.com”).

CreateOrgRequest

class roboto.domain.orgs.CreateOrgRequest(/, **data)#View Source

Bases: pydantic.BaseModel

Request payload to create an organization.

Parameters

data Any

Attributes

CreateOrgRequest.bind_email_domain

bind_email_domain bool = False #

Whether to automatically bind the creator’s email domain to this organization.

CreateOrgRequest.data_region

AWS region where the organization’s data will be stored.

CreateOrgRequest.name

name str #

Unique name for the organization.

InviteUserRequest

class roboto.domain.orgs.InviteUserRequest(/, **data)#View Source

Bases: pydantic.BaseModel

Request payload to invite a user to an organization.

Parameters

data Any

Attributes

InviteUserRequest.invited_user_id

invited_user_id str #

Unique identifier for the user to invite.

ModifyRoleForUserRequest

class roboto.domain.orgs.ModifyRoleForUserRequest(/, **data)#View Source

Bases: pydantic.BaseModel

Request payload to modify the role for a user in an organization.

Parameters

data Any

Attributes

ModifyRoleForUserRequest.role_name

Role to assign to the user.

ModifyRoleForUserRequest.user_id

user_id str #

Unique identifier for the user.

Org

class roboto.domain.orgs.Org(record, roboto_client=None)#View Source

A collaborative workspace for multiple Roboto users.

Organizations are the primary grouping mechanism in Roboto, allowing multiple users to collaborate on datasets, actions, and other resources. Each organization has its own isolated namespace for resources and can have different limits and functionality depending on its tier (free or premium).

Organization names are unique within the Roboto platform. Users can be members of multiple organizations with different roles (user, admin, owner). Organizations can also be configured with email domain binding to automatically add users with matching email domains.

Org.add_role_for_user()

add_role_for_user(user_id, role)#View Source

Add a role to a user in this organization.

Grants the specified role to a user who is already a member of the organization. Users can have multiple roles simultaneously.

Parameters

user_id str

Unique identifier for the user.

Role to add (user, admin, or owner).

Returns

This Org instance for method chaining.

Raises

The user is not a member of this organization.

The caller lacks permission to modify user roles.

Usage

Grant admin role to a user:

from roboto.domain.orgs import Org, OrgRoleName
org = Org.from_id("org_12345")
org.add_role_for_user("alice@example.com", OrgRoleName.admin)

Org.bind_email_domain()

bind_email_domain(email_domain)#View Source

Bind an email domain to this organization.

Users with email addresses from the bound domain will automatically be added to this organization when they sign up for Roboto.

Parameters

email_domain str

Email domain to bind (e.g., “example.com”).

Returns

This Org instance for method chaining.

Raises

The email domain is invalid or already bound.

The caller lacks permission to bind email domains.

Usage

Bind a company email domain:

from roboto.domain.orgs import Org
org = Org.from_id("org_12345")
org.bind_email_domain("acme.com")

Org.create()

classmethod create(name, bind_email_domain=False, data_region=RobotoRegion.US_WEST, roboto_client=None)#View Source

Create a new organization.

Creates a new organization with the specified name and configuration.

Parameters

name str

Name for the organization.

bind_email_domain bool

Whether to automatically bind the email domain from the creator’s email address to this organization.

Geographic region where the organization’s data will be stored.

roboto_client Optional[roboto.http.RobotoClient]

Optional Roboto client instance. If not provided, uses the default client.

Returns

A new Org instance representing the created organization.

Raises

The request contains invalid data.

The caller is not authorized to create organizations.

Usage

Create a basic organization:

from roboto.domain.orgs import Org
org = Org.create("my-company")
print(f"Created org: {org.name}")

Create an organization with email domain binding:

from roboto import RobotoRegion
from roboto.domain.orgs import Org
org = Org.create(name="acme-corp", bind_email_domain=True, data_region=RobotoRegion.EU_CENTRAL)

Org.delete()

delete()#View Source

Delete this organization permanently.

Permanently removes the organization and all associated data including datasets, actions, and user memberships. This action cannot be undone.

Raises

The caller lacks permission to delete this organization.

The organization cannot be deleted due to active resources.

Return type

None

Usage

Delete an organization:

from roboto.domain.orgs import Org
org = Org.from_id("org_12345")
org.delete()  # Permanently removes the organization

Org.email_domains()

email_domains()#View Source

Retrieve all email domains bound to this organization.

Returns

collections.abc.Collection[str]

Collection of email domain strings bound to this organization.

Raises

The caller lacks permission to view email domains.

Usage

List bound email domains:

from roboto.domain.orgs import Org
org = Org.from_id("org_12345")
domains = org.email_domains()
for domain in domains:
    print(f"Bound domain: {domain}")

Properties

Org.files

The files associated with the org itself, rather than with one of its datasets or devices.

Shared URDFs, runbooks, and other files that belong to the org as a whole live here. Files associated with a dataset or a device are reached through that dataset’s or device’s files.

Org.for_self()

classmethod for_self(roboto_client=None)#View Source

Retrieve all organizations the current user is a member of.

Parameters

roboto_client Optional[roboto.http.RobotoClient]

Optional Roboto client instance. If not provided, uses the default client.

Returns

collections.abc.Sequence[Org]

Sequence of Org instances for organizations the user belongs to.

Raises

No valid authentication credentials provided.

Usage

List user’s organizations:

from roboto.domain.orgs import Org
orgs = Org.for_self()
for org in orgs:
    print(f"Member of: {org.name}")

Org.for_user()

classmethod for_user(user_id, roboto_client=None)#View Source

Retrieve all organizations a specific user is a member of.

Parameters

user_id str

Unique identifier for the user.

roboto_client Optional[roboto.http.RobotoClient]

Optional Roboto client instance. If not provided, uses the default client.

Returns

collections.abc.Sequence[Org]

Sequence of Org instances for organizations the user belongs to.

Raises

No user exists with the specified ID.

The caller is not authorized to view this user’s organizations.

Usage

List another user’s organizations:

from roboto.domain.orgs import Org
orgs = Org.for_user("alice@example.com")
print(f"Alice is in {len(orgs)} organizations")

Org.from_id()

classmethod from_id(org_id, roboto_client=None)#View Source

Load an existing organization by its unique ID.

Parameters

org_id str

Unique identifier for the organization to retrieve.

roboto_client Optional[roboto.http.RobotoClient]

Optional Roboto client instance. If not provided, uses the default client.

Returns

Org instance for the specified organization ID.

Raises

No organization exists with the specified ID.

The caller is not authorized to access this organization.

Usage

Load an organization by ID:

from roboto.domain.orgs import Org
org = Org.from_id("org_12345")
print(f"Organization: {org.name}")

Org.invite_user()

invite_user(user_id)#View Source

Invite a user to join this organization.

Creates an invitation that the specified user can accept to become a member of this organization.

Parameters

user_id str

Unique identifier for the user to invite.

Returns

OrgInvite instance representing the created invitation.

Raises

The specified user does not exist.

The user is already a member or has a pending invite.

The caller lacks permission to invite users.

Usage

Invite a user to the organization:

from roboto.domain.orgs import Org
org = Org.from_id("org_12345")
invite = org.invite_user("alice@example.com")
print(f"Invitation created: {invite.invite_id}")

Org.invites()

invites()#View Source

Retrieve all pending invitations for this organization.

Returns

collections.abc.Collection[roboto.domain.orgs.org_invite.OrgInvite]

Collection of OrgInvite instances for pending invitations.

Raises

The caller lacks permission to view invitations.

Usage

List pending invitations:

from roboto.domain.orgs import Org
org = Org.from_id("org_12345")
invites = org.invites()
for invite in invites:
    print(f"Pending invite for: {invite.invited_user_id}")

Properties

Org.name

name str #

Human-readable name of this organization.

Returns

str

The organization’s name.

Org.org_id

org_id #

Unique identifier for this organization.

Returns

The organization’s unique ID.

Org.refresh()

refresh()#View Source

Refresh this organization’s data from the server.

Fetches the latest organization data from Roboto and updates this instance’s internal state.

Returns

This Org instance with updated data.

Raises

The organization no longer exists.

The caller no longer has access to this organization.

Usage

Refresh organization data:

from roboto.domain.orgs import Org
org = Org.from_id("org_12345")
org.refresh()  # Updates with latest data from server

Org.remove_role_from_user()

remove_role_from_user(user_id, role)#View Source

Remove a role from a user in this organization.

Revokes the specified role from a user. The user remains a member of the organization unless all roles are removed.

Parameters

user_id str

Unique identifier for the user.

Role to remove (user, admin, or owner).

Returns

This Org instance for method chaining.

Raises

The user is not a member of this organization.

The caller lacks permission to modify user roles.

Usage

Remove admin role from a user:

from roboto.domain.orgs import Org, OrgRoleName
org = Org.from_id("org_12345")
org.remove_role_from_user("alice@example.com", OrgRoleName.admin)

Org.remove_user()

remove_user(user_id)#View Source

Remove a user from this organization.

Completely removes the user from the organization, revoking all roles and access to organization resources.

Parameters

user_id str

Unique identifier for the user to remove.

Returns

This Org instance for method chaining.

Raises

The user is not a member of this organization.

The caller lacks permission to remove users.

Usage

Remove a user from the organization:

from roboto.domain.orgs import Org
org = Org.from_id("org_12345")
org.remove_user("alice@example.com")

Properties

Org.status

Current status of this organization.

Returns

The organization’s status (provisioning, active, or de-provisioning).

Org.tier

Subscription tier of this organization.

Returns

The organization’s tier (free or premium).

Org.to_dict()

to_dict()#View Source

Convert this organization to a dictionary representation.

Returns a JSON-serializable dictionary containing all organization data.

Returns

dict[str, Any]

Dictionary representation of the organization.

Usage

Export organization data:

from roboto.domain.orgs import Org
org = Org.from_id("org_12345")
org_data = org.to_dict()
print(f"Org created: {org_data.get('created')}")

Org.unbind_email_domain()

unbind_email_domain(email_domain)#View Source

Remove an email domain binding from this organization.

Users with email addresses from this domain will no longer be automatically added to the organization.

Parameters

email_domain str

Email domain to unbind (e.g., “example.com”).

Returns

This Org instance for method chaining.

Raises

The email domain is not bound to this organization.

The caller lacks permission to unbind email domains.

Usage

Unbind an email domain:

from roboto.domain.orgs import Org
org = Org.from_id("org_12345")
org.unbind_email_domain("old-company.com")

Org.update()

update(update)#View Source

Update this organization’s properties.

Updates the organization with the provided changes and refreshes this instance with the updated data.

Parameters

Update request containing the changes to apply.

Returns

This Org instance with updated data.

Raises

The update contains invalid data.

The caller lacks permission to update this organization.

Usage

Update organization name:

from roboto.domain.orgs import Org, UpdateOrgRequest, OrgRecordUpdates
org = Org.from_id("org_12345")
request = UpdateOrgRequest(updates=OrgRecordUpdates(name="New Company Name"))
org.update(request)

Org.users()

users()#View Source

Retrieve all users who are members of this organization.

Returns

Collection of OrgUserRecord instances representing organization members.

Raises

The caller lacks permission to view organization members.

Usage

List organization members:

from roboto.domain.orgs import Org
org = Org.from_id("org_12345")
users = org.users()
for user_record in users:
    print(f"Member: {user_record.user.name} ({user_record.roles})")

OrgInvite

class roboto.domain.orgs.OrgInvite(record, roboto_client=None)#View Source

An invitation to join an organization from one user to another.

Organization invitations allow existing members to invite new users to join their organization. Invitations are created by calling Org.invite_user() and can be accepted or declined by the invited user.

Invitations cannot be created directly through the constructor - they must be created through the organization’s invite_user method.

OrgInvite.accept()

accept()#View Source

Accept this invitation and join the organization.

The invited user becomes a member of the organization with default user role permissions.

Raises

The caller is not the invited user.

The invitation has already been accepted or declined.

Return type

None

Usage

Accept an invitation:

from roboto import OrgInvite
invite = OrgInvite.from_id("invite_12345")
invite.accept()  # Join the organization

OrgInvite.create()

classmethod create(invited_user_id, org_id, roboto_client=None)#View Source

Create a new organization invitation.

Creates an invitation for the specified user to join the organization. This method is typically called internally by Org.invite_user().

Parameters

invited_user_id str

Unique identifier for the user to invite.

org_id str

Unique identifier for the organization.

roboto_client Optional[roboto.http.RobotoClient]

Optional Roboto client instance. If not provided, uses the default client.

Returns

A new OrgInvite instance representing the created invitation.

Raises

The user or organization does not exist.

The user is already a member or has a pending invite.

The caller lacks permission to invite users.

Usage

Create an invitation (typically done via Org.invite_user):

from roboto import OrgInvite
invite = OrgInvite.create("alice@example.com", "org_12345")

OrgInvite.decline()

decline()#View Source

Decline this invitation and do not join the organization.

The invitation is marked as declined and cannot be accepted later.

Raises

The caller is not the invited user.

The invitation has already been accepted or declined.

Return type

None

Usage

Decline an invitation:

from roboto import OrgInvite
invite = OrgInvite.from_id("invite_12345")
invite.decline()  # Do not join the organization

OrgInvite.for_org()

classmethod for_org(org_id, roboto_client=None)#View Source

Retrieve all pending invitations for an organization.

Parameters

org_id str

Unique identifier for the organization.

roboto_client Optional[roboto.http.RobotoClient]

Optional Roboto client instance. If not provided, uses the default client.

Returns

collections.abc.Collection[OrgInvite]

Collection of OrgInvite instances for pending invitations.

Raises

The organization does not exist.

The caller lacks permission to view invitations.

Usage

List all invitations for an organization:

from roboto import OrgInvite
invites = OrgInvite.for_org("org_12345")
for invite in invites:
    print(f"Pending invite for: {invite.invited_user_id}")

OrgInvite.from_id()

classmethod from_id(invite_id, roboto_client=None)#View Source

Load an existing invitation by its unique ID.

Parameters

invite_id str

Unique identifier for the invitation to retrieve.

roboto_client Optional[roboto.http.RobotoClient]

Optional Roboto client instance. If not provided, uses the default client.

Returns

OrgInvite instance for the specified invitation ID.

Raises

No invitation exists with the specified ID.

The caller is not authorized to access this invitation.

Usage

Load an invitation by ID:

from roboto import OrgInvite
invite = OrgInvite.from_id("invite_12345")
print(f"Invited user: {invite.invited_user_id}")

Properties

OrgInvite.invite_id

invite_id str #

Unique identifier for this invitation.

Returns

str

The invitation’s unique ID.

OrgInvite.invited_by_user_id

invited_by_user_id str #

User ID of the person who created this invitation.

Returns

str

The unique identifier of the user who sent the invitation.

OrgInvite.invited_user_id

invited_user_id str #

User ID of the person who was invited.

Returns

str

The unique identifier of the invited user.

OrgInvite.org_id

org_id str #

Organization ID for the organization this invitation is for.

Returns

str

The unique identifier of the organization.

OrgInvite.to_dict()

to_dict()#View Source

Convert this invitation to a dictionary representation.

Returns a JSON-serializable dictionary containing all invitation data.

Returns

dict[str, Any]

Dictionary representation of the invitation.

Usage

Export invitation data:

from roboto import OrgInvite
invite = OrgInvite.from_id("invite_12345")
invite_data = invite.to_dict()
print(f"Invited user: {invite_data.get('user_id')}")

OrgInviteRecord

class roboto.domain.orgs.OrgInviteRecord(/, **data)#View Source

Bases: pydantic.BaseModel

A wire-transmissible representation of an organization invite.

Parameters

data Any

Attributes

OrgInviteRecord.invite_id

invite_id str #

Unique identifier for the invitation.

OrgInviteRecord.invited_by

User information for the person who created the invitation.

OrgInviteRecord.org

Organization information for the organization being invited to.

OrgInviteRecord.user_id

user_id str #

User ID of the person who was invited.

OrgRecord

class roboto.domain.orgs.OrgRecord(/, **data)#View Source

Bases: pydantic.BaseModel

A wire-transmissible representation of an organization.

Parameters

data Any

Attributes

OrgRecord.created

created datetime.datetime #

Timestamp when the organization was created.

OrgRecord.created_by

created_by str | None = None #

User ID of the organization creator.

OrgRecord.name

name str #

Human-readable name of the organization.

OrgRecord.org_id

org_id str #

Unique identifier for the organization.

OrgRecord.status

status OrgStatus #

Current operational status of the organization.

OrgRecord.tier

tier OrgTier #

Subscription tier of the organization.

OrgRecordUpdates

class roboto.domain.orgs.OrgRecordUpdates(/, **data)#View Source

Bases: pydantic.BaseModel

Payload containing organization field updates.

Parameters

data Any

Attributes

OrgRecordUpdates.name

name str | None = None #

Updated name for the organization.

OrgRecordUpdates.status

Updated status for the organization.

OrgRoleName

class roboto.domain.orgs.OrgRoleName#View Source

Bases: roboto.compat.StrEnum

Organization role enumeration.

Defines the different permission levels users can have within an organization.

Attributes

OrgRoleName.admin

admin = 'admin' #

Administrative role with management permissions for organization resources.

OrgRoleName.owner

owner = 'owner' #

Owner role with full control over the organization including billing and deletion.

OrgRoleName.user

user = 'user' #

Basic user role with read access to organization resources.

OrgStatus

class roboto.domain.orgs.OrgStatus#View Source

Bases: roboto.compat.StrEnum

Organization status enumeration.

Represents the current operational state of an organization.

Attributes

OrgStatus.Active

Active = 'active' #

Organization is fully operational and ready for use.

OrgStatus.Deprovisioning

Deprovisioning = 'de-provisioning' #

Organization is being deleted and resources are being cleaned up.

OrgStatus.Provisioning

Provisioning = 'provisioning' #

Organization is being set up and is not yet ready for use.

OrgTier

class roboto.domain.orgs.OrgTier#View Source

Bases: roboto.compat.StrEnum

Organization tier enumeration.

See our pricing page for details on different organization tiers and their associated features and limits.

Attributes

OrgTier.free

free = 'free' #

Free tier with basic features and usage limits.

OrgTier.premium

premium = 'premium' #

Premium tier with advanced features and higher usage limits.

OrgUserRecord

class roboto.domain.orgs.OrgUserRecord(/, **data)#View Source

Bases: pydantic.BaseModel

A wire-transmissible representation of an organization user.

Parameters

data Any

Attributes

OrgUserRecord.org

Organization information.

OrgUserRecord.roles

roles list[OrgRoleName] #

List of roles the user has within the organization.

OrgUserRecord.user

User information for the organization member.

RemoveUserFromOrgRequest

class roboto.domain.orgs.RemoveUserFromOrgRequest(/, **data)#View Source

Bases: pydantic.BaseModel

Request payload to remove a user from an organization.

Parameters

data Any

Attributes

RemoveUserFromOrgRequest.user_id

user_id str #

Unique identifier for the user to remove.

UpdateOrgRequest

class roboto.domain.orgs.UpdateOrgRequest(/, **data)#View Source

Bases: pydantic.BaseModel

Request payload to update an organization.

Parameters

data Any

Attributes

UpdateOrgRequest.updates

Organization field updates to apply.

UpdateOrgUserRequest

class roboto.domain.orgs.UpdateOrgUserRequest(/, **data)#View Source

Bases: pydantic.BaseModel

Request payload to update an organization user’s roles.

Parameters

data Any

Attributes

UpdateOrgUserRequest.add_roles

add_roles list[roboto.domain.orgs.org_records.OrgRoleName] | None = None #

Roles to add to the user.

UpdateOrgUserRequest.check_some_updates_present()

check_some_updates_present()#View Source

Attributes

UpdateOrgUserRequest.remove_roles

remove_roles list[roboto.domain.orgs.org_records.OrgRoleName] | None = None #

Roles to remove from the user.

Was this page helpful?