ZipFolderMixin

class Stoner.Zip.ZipFolderMixin(*args, **kargs)[source]

Bases: object

Provides methods to load and save data from a single Zip file.

See Stoner.Folders.DataFolder for documentation on constructor.

Note

As this mixin class provides both read and write storage, it cannot be mixed in with another class that provides a __setter__ method without causing a problem.

Attributes Summary

full_key

Generate a full canonical path through the zip archive to this file.

key

Return the immediate filename of the stored file.

Methods Summary

getlist([recursive, directory, flatten])

Read the Zip File to construct a list of ZipFile objects.

save([root])

Save a load of files to a single Zip file, creating members as it goes.

Attributes Documentation

full_key

Generate a full canonical path through the zip archive to this file.

key

Return the immediate filename of the stored file.

Methods Documentation

getlist(recursive=None, directory=None, flatten=None)[source]

Read the Zip File to construct a list of ZipFile objects.

save(root=None)[source]

Save a load of files to a single Zip file, creating members as it goes.

Keyword Arguments:

root (string) – The name of the Zip file to save to if set to None, will prompt for a filename.

Returns:

A list of group paths in the Zip file