def dumps(self, bucket=None):
        """Serialize files from a bucket.

        :param bucket: Instance of files
            :class:`invenio_files_rest.models.Bucket`. (Default:
            ``self.bucket``)
        :returns: List of serialized files.
        """
        return [
            self.file_cls(o, self.filesmap.get(o.key, {})).dumps()
            for o in sorted_files_from_bucket(bucket or self.bucket, self.keys)
        ]
def dumps ( self , bucket = None ) : return [ self . file_cls ( o , self . filesmap . get ( o . key , { } ) ) . dumps ( ) for o in sorted_files_from_bucket ( bucket or self . bucket , self . keys ) ]
Serialize files from a bucket.

        :param bucket: Instance of files
            :class:`invenio_files_rest.models.Bucket`. (Default:
            ``self.bucket``)
        :returns: List of serialized files.