GlobalTempMixin#
- class GlobalTempMixin#
Bases:
objectMethods Summary
get_tempfile(filename[, file_type])Returns the content of the temp file with the name filename.
new_tempfile(data[, filename, index_pdf])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, index_pdf=False)#
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.
index_pdf – whether to enable PDF chunk indexing for PDF files.
- new_tempfile_from_localfile(filename, index_pdf=None)#
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
index_pdf – Whether to enable PDF chunk indexing. If None, auto-detects PDF files.