Organization

class labelbox.schema.organization.Organization(*args, **kwargs)[source]

Bases: DbObject

An Organization is a group of Users.

It is associated with data created by Users within that Organization. Typically all Users within an Organization have access to data created by any User in the same Organization.

updated_at
Type:

datetime

created_at
Type:

datetime

name
Type:

str

users

ToMany relationship to User

Type:

Relationship

projects

ToMany relationship to Project

Type:

Relationship

webhooks

ToMany relationship to Webhook

Type:

Relationship

create_resource_tag(tag: Dict[str, str]) ResourceTag[source]
Creates a resource tag.
>>> tag = {'text': 'tag-1',  'color': 'ffffff'}
Parameters:

tag (dict) – A resource tag {‘text’: ‘tag-1’, ‘color’: ‘fffff’}

Returns:

The created resource tag.

get_default_iam_integration() IAMIntegration | None[source]

Returns the default IAM integration for the organization. Will return None if there are no default integrations for the org.

get_iam_integrations() List[IAMIntegration][source]

Returns all IAM Integrations for an organization

get_resource_tags() List[ResourceTag][source]

Returns all resource tags for an organization

invite_limit() InviteLimit[source]

Retrieve invite limits for the org This already accounts for users currently in the org Meaining that used = users + invites, remaining = limit - (users + invites)

Returns:

InviteLimit

invite_user(email: str, role: Role, project_roles: List[ProjectRole] | None = None) Invite[source]

Invite a new member to the org. This will send the user an email invite

Parameters:
  • email (str) – email address of the user to invite

  • role (Role) – Role to assign to the user

  • project_roles (Optional[List[ProjectRoles]]) – List of project roles to assign to the User (if they have a project based org role).

Returns:

Invite for the user

Notes

  1. Multiple invites can be sent for the same email. This can only be resolved in the UI for now.
    • Future releases of the SDK will support the ability to query and revoke invites to solve this problem (and/or checking on the backend)

  2. Some server side response are unclear (e.g. if the user invites themself None is returned which the SDK raises as a LabelboxError )

remove_user(user: User) None[source]

Deletes a user from the organization. This cannot be undone without sending another invite.

Parameters:

user (User) – The user to delete from the org