Ontology
Ontology Objects
class Ontology()
Access ontology related data and manipulate the ontology. Instantiate this class via
:meth:encord.user_client.EncordUserClient.get_ontology()
ontology_hash
@property
def ontology_hash() -> str
Get the ontology hash (i.e. the Ontology ID).
title
@property
def title() -> str
Get the title of the ontology.
description
@property
def description() -> str
Get the description of the ontology.
created_at
@property
def created_at() -> datetime.datetime
Get the time the ontology was created at.
last_edited_at
@property
def last_edited_at() -> datetime.datetime
Get the time the ontology was last edited at.
structure
@property
def structure() -> OntologyStructure
Get the structure of the ontology.
refetch_data
def refetch_data() -> None
The Ontology class will only fetch its properties once. Use this function if you suspect the state of those properties to be dirty.
save
def save() -> None
Sync local state to the server, if updates are made to structure, title or description fields
list_groups
def list_groups() -> Iterable[OntologyGroup]
List all groups that have access to a particular ontology.
add_group
def add_group(group_hash: Union[List[UUID], UUID],
user_role: OntologyUserRole)
Add group to an ontology.
Arguments:
group_hash
- List of group hashes to be added.user_role
- User role that the group will be given.
Returns:
None
remove_group
def remove_group(group_hash: Union[List[UUID], UUID])
Remove group from ontology.
Arguments:
group_hash
- List of group hashes to be removed.
Returns:
None
Was this page helpful?