Skip to content

Documentation for Org and related classes

Org

The object model represents an org in the Engine

add_user(user_email, role=UserRoles.OrgViewer)

Add an existing user to the organization

Parameters:

Name Type Description Default
user_id str

ID of the user

required
role str

Role of the user in the org. Defaults to UserRoles.OrgViewer.

UserRoles.OrgViewer

create_project(name, description='')

Create a new project in the org

Parameters:

Name Type Description Default
name str

Name of the project

required
description str

Description of the project. Defaults to ''.

''

Returns:

Type Description
Project

The newly created Project resource

create_user(name, email, password=None, role=UserRoles.OrgViewer)

Create a new organization user

Parameters:

Name Type Description Default
name str

Name of the user

required
email str

User email address

required
password str

If password is None, password will be autogenrated

None

delete()

Delete the organization

Warning
  • Only organization which no active subscriptions can be deleted.
  • This action cannot be undone. All related data will be deleted.

description() property

Description of the organization

Returns:

Type Description
str

Description of the organization

get_project(id)

Get Project resource by ID

Parameters:

Name Type Description Default
id str

ID of the project

required

Returns:

Name Type Description
Project Project

the requested Project resource

list_projects()

List all projects of the organization

Returns:

Type Description
List[Project]

list of Project objects

list_user_orgs()

List all organizations of the current authenticated user

list_users()

Return all users of the organization

name() property

Name of the organization

Returns:

Type Description
str

Name of the organization

remove_user(user_email)

Remove a user from the organization

Parameters:

Name Type Description Default
user_id str

Unique identity of the user

required

update(name, description=None)

Update information of the organization

Parameters:

Name Type Description Default
name str

new name of the organization

required
description str

description of the organization. Defaults to None.

None

OrgUser dataclass

The object model represents a user in the organization

external: bool = False class-attribute

True if this user is an external user (invited to collaborate in the projects of the org)

role: str class-attribute

Role of user in the organization

user: User class-attribute

User information