=============== BackgroundGroup =============== .. py:class:: BackgroundGroup .. py:method:: id :property: The id of the group. :type: str, read-only .. py:method:: name :property: The name of the group. :type: str :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: list_backgrounds() List the backgrounds of this group. :returns: The list of backgrounds in the group. :rtype: list(Background) .. py:method:: duplicate() Duplicate this background group. :returns: The duplicated group. :rtype: BackgroundGroup :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: remove(force = False) Delete a background group .. note:: By default, only empty groups can be deleted (:py:obj:`NotEmptyError` is raised otherwise), use ``force`` to force deletion of non empty groups. :param force: Force the deletion of the group even if it contains backgrounds. :type force: bool :raises NotEmptyError: If ``force`` is :py:obj:`False` and the group contains backgrounds. :raises ReadOnlyError: If :py:obj:`Database` is in read only mode. .. py:method:: create_background(name) Create a new background. :param name: The name of the new background. :type name: str :returns: The newly created background. :rtype: Background :raises ReadOnlyError: If :py:obj:`Database` is in read only mode.