Skip to content

Commit c2b42c7

Browse files
committed
added public api endpoint: get/set project tags
1 parent cd2b20d commit c2b42c7

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

dataikuapi/dss/project.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,3 +516,22 @@ def list_running_notebooks(self, as_objects=True):
516516
else:
517517
return list
518518

519+
########################################################
520+
# Tags
521+
########################################################
522+
523+
def get_tags(self):
524+
"""
525+
List the tags of this project.
526+
527+
Returns:
528+
a dictionary containing the tags with a color
529+
"""
530+
return self.client._perform_json("GET", "/projects/%s/tags" % self.project_key)
531+
532+
def set_tags(self, tags={}):
533+
"""
534+
Set the tags of this project.
535+
@param obj: must be a modified version of the object returned by list_tags
536+
"""
537+
return self.client._perform_empty("PUT", "/projects/%s/tags" % self.project_key, body = tags)

0 commit comments

Comments
 (0)