sasctl.services.projects#

class sasctl._services.projects.Projects[source]#

Bases: Service

classmethod create_project(name, description=None, image=None)[source]#
Parameters:
  • name (str)

  • description (str)

  • image (str) – URI of an image to use as the project avatar

Returns:

RestObj

classmethod delete_project(item)#

Delete a project instance.

Parameters:

item

Returns:

None

classmethod get_project(item, refresh=False)#

Return a project instance.

Parameters:
  • item (str or dict) – Name, ID, or dictionary representation of the project.

  • refresh (bool, optional) – Obtain an updated copy of the project.

Returns:

RestObj or None – A dictionary containing the project attributes or None.

Notes

If item is a complete representation of the project it will be returned unless refresh is set. This prevents unnecessary REST calls when data is already available on the client.

classmethod list_projects(filter=None, start=None, limit=None, **kwargs)#

List all projects available in the environment.

Parameters:
  • filter (str, optional)

  • start (int, optional) – Zero-based index of the first item to return. Defaults to 0.

  • limit (int, optional) – The maximum number of items to return. Defaults to 20.

Returns:

list – A list of dictionaries containing the projects.

Notes

See the filtering reference for details on the filter parameter.

classmethod update_project(item)#

Update a project instance.

Parameters:

item (dict)

Returns:

None