Tagging Objects

Tags provide a flexible way to label and organise any Agora object across project and folder boundaries.

Get all tags

Returns every tag the authenticated user can see:

tags = agora.get_tags()
for t in tags:
    print(f'{t.id}  {t.name}')

Get a tag by ID or name

tag_by_id   = agora.get_tag(id=3)
tag_by_name = agora.get_tag(name='good')

Tag an object

You can tag exams, series, datasets, folders and patients:

exam    = agora.get_exam(12)
series  = agora.get_series(24)
dataset = agora.get_dataset(145)
folder  = agora.get_folder(15)
patient = agora.get_patient(2)

tag = agora.get_tag(name='reviewed')

exam.tag(tag)
series.tag(tag)
dataset.tag(tag)
folder.tag(tag)
patient.tag(tag)

The tag() method returns a tag instance object that represents the relationship between the object and the tag.

Get tags for an object

tags = exam.get_tags()
tags = series.get_tags()
tags = dataset.get_tags()
tags = folder.get_tags()

Remove a tag

Delete the tag instance (not the tag itself) to remove the label from an object:

tag_instance = exam.tag(tag)
tag_instance.delete()