samlab.dashboard.backend.favorites module

Warning

module ‘samlab.dashboard.backend.favorites’ undocumented

class samlab.dashboard.backend.favorites.Favorites[source]

Bases: ABC

Warning

class ‘samlab.dashboard.backend.favorites.Favorites’ undocumented

abstract create(service, name, label)[source]

Mark an item as a favorite.

Parameters
  • service (str, required) – Service type.

  • name (str, required.) – Service name of the item to be favorited.

  • label (str, required.) – Human-readable label for the favorite.

abstract delete(service, name)[source]

Un-favorite an item.

Parameters
  • service (str, required) – Service type.

  • name (str, required.) – Service name of the item to be un-favorited.

abstract get()[source]

Return a sequence of favorites.

property name

Return the name of this backend.

property service

Return the service type implemented by this backend.

class samlab.dashboard.backend.favorites.JSONFile(storage)[source]

Bases: Favorites

Warning

class ‘samlab.dashboard.backend.favorites.JSONFile’ undocumented

create(service, name, label)[source]

Mark an item as a favorite.

Parameters
  • service (str, required) – Service type.

  • name (str, required.) – Service name of the item to be favorited.

  • label (str, required.) – Human-readable label for the favorite.

delete(service, name)[source]

Un-favorite an item.

Parameters
  • service (str, required) – Service type.

  • name (str, required.) – Service name of the item to be un-favorited.

get()[source]

Return a sequence of favorites.