Source code for labelbox.schema.organization

from labelbox.orm.db_object import DbObject
from labelbox.orm.model import Field, Relationship


[docs]class Organization(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. Attributes: updated_at (datetime) created_at (datetime) name (str) users (Relationship): `ToMany` relationship to User projects (Relationship): `ToMany` relationship to Project webhooks (Relationship): `ToMany` relationship to Webhook """ # RelationshipManagers in Organization use the type in Query (and # not the source object) because the server-side does not support # filtering on ID in the query for getting a single organization. def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) for relationship in self.relationships(): getattr(self, relationship.name).filter_on_id = False updated_at = Field.DateTime("updated_at") created_at = Field.DateTime("created_at") name = Field.String("name") # Relationships users = Relationship.ToMany("User", False) projects = Relationship.ToMany("Project", True) webhooks = Relationship.ToMany("Webhook", False)