get#

barecat._api.Barecat.get(path, default=None)[source]#

Get the contents of a file in the Barecat archive, with a default value if the file does not exist.

Parameters:
  • path (str) – Path to the file within the archive.

  • default (Any) – Default value to return if the file does not exist.

Returns:

The contents of the file (possibly decoded), or the default value if the file does not exist.

Return type:

Union[bytes, Any]