***
layout: overview
slug: nemo-curator/nemo\_curator/utils/operation\_utils
title: nemo\_curator.utils.operation\_utils
-------------------------------------------
## Module Contents
### Functions
| Name | Description |
| -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| [`get_tmp_dir`](#nemo_curator-utils-operation_utils-get_tmp_dir) | Retrieve the appropriate temporary directory based on the runtime environment. |
| [`make_named_temporary_file`](#nemo_curator-utils-operation_utils-make_named_temporary_file) | Context manager to create a named temporary file. |
| [`make_pipeline_named_temporary_file`](#nemo_curator-utils-operation_utils-make_pipeline_named_temporary_file) | Context manager to create a named temporary file for pipelines. |
| [`make_pipeline_temporary_dir`](#nemo_curator-utils-operation_utils-make_pipeline_temporary_dir) | Context manager to create a temporary directory for pipelines. |
| [`make_temporary_dir`](#nemo_curator-utils-operation_utils-make_temporary_dir) | Context manager to create a temporary directory. |
### API
```python
nemo_curator.utils.operation_utils.get_tmp_dir() -> pathlib.Path
```
Retrieve the appropriate temporary directory based on the runtime environment.
**Returns:** `pathlib.Path`
pathlib.Path: Path to the temporary directory.
```python
nemo_curator.utils.operation_utils.make_named_temporary_file(
prefix: str | None = None,
suffix: str | None = None,
delete: bool = True,
target_dir: pathlib.Path | None = None
) -> collections.abc.Generator[pathlib.Path, None, None]
```
Context manager to create a named temporary file.
**Parameters:**
Prefix for the file name. Defaults to None.
suffix for the file name. Defaults to None.
If True, the file will be deleted upon exit. Defaults to True.
Directory where the file should be created. Defaults to None.
```python
nemo_curator.utils.operation_utils.make_pipeline_named_temporary_file(
sub_dir: str | None = None,
suffix: str | None = None
) -> collections.abc.Generator[pathlib.Path, None, None]
```
Context manager to create a named temporary file for pipelines.
```python
nemo_curator.utils.operation_utils.make_pipeline_temporary_dir(
sub_dir: str | None = None
) -> collections.abc.Generator[pathlib.Path, None, None]
```
Context manager to create a temporary directory for pipelines.
```python
nemo_curator.utils.operation_utils.make_temporary_dir(
prefix: str | None = None,
target_dir: pathlib.Path | None = None,
delete: bool = True
) -> collections.abc.Generator[pathlib.Path, None, None]
```
Context manager to create a temporary directory.
**Parameters:**
Prefix for the directory name. Defaults to None.
Parent directory for the temporary directory. Defaults to None.
If True, the directory will be deleted upon exit. Defaults to True.