GlobalTempMixin#

class GlobalTempMixin#

Bases: object

Methods Summary

get_tempfile(filename[, file_type])

Returns the content of the temp file with the name filename.

new_tempfile(data[, filename])

Stores the data in a temp file.

new_tempfile_from_localfile(filename)

Stores the file identified by file_name on Squirro's global temp folder.

Methods Documentation

get_tempfile(filename, file_type=None)#

Returns the content of the temp file with the name filename.

Parameters
  • filename – File name

  • file_type – The type of file- for community uploads, these values are either community_csv or community_xlsx

new_tempfile(data, filename=None)#

Stores the data in a temp file.

Parameters
  • data – data to be stored in the temp file

  • filename – optional filename, serving as metadata of the temp file.

new_tempfile_from_localfile(filename)#

Stores the file identified by file_name on Squirro’s global temp folder.

Parameters

filename – Name of the file on local filesystem to be uploaded to the server