<!-- Source: https://docs.squirro.com/en/latest/api/squirro_client.topic.GlobalTempMixin.html -->
# GlobalTempMixin

**`class GlobalTempMixin`**

Bases: [`object`](https://docs.python.org/3.11/library/functions.html#object)

Methods SummaryMethods Documentation

**`get_tempfile(filename, file_type=None, project_id=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
- `project_id` – optional project ID for project-specific temp file access control

**`new_tempfile(data, filename=None, index_pdf=False, project_id=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.
- `index_pdf` – whether to enable PDF chunk indexing for PDF files.
- `project_id` – optional project ID for project-specific temp file access control

**`new_tempfile_from_localfile(filename, index_pdf=None, project_id=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.
- `project_id` – Optional project ID for project-specific temp file access control
