<!-- # hard line break macro for HTML -->

# fiftyone.operators.constants

FiftyOne operator constants.

Copyright 2017-2026, Voxel51, Inc.
<br/>
[voxel51.com](https://voxel51.com/)
<br/>
<br/>

**Classes:**

| [`ViewTarget`](#fiftyone.operators.constants.ViewTarget)()   | Choices for target view that an operator should operate on   |
|--------------------------------------------------------------|--------------------------------------------------------------|

### *class* fiftyone.operators.constants.ViewTarget

Bases: `object`

Choices for target view that an operator should operate on

See [`fiftyone.operators.types.ViewTargetProperty()`](fiftyone.operators.types.md#fiftyone.operators.types.ViewTargetProperty) for details.

**Attributes:**

| [`BASE_VIEW`](#fiftyone.operators.constants.ViewTarget.BASE_VIEW)                   | Base view from which a generated view was created   |
|-------------------------------------------------------------------------------------|-----------------------------------------------------|
| [`CURRENT_VIEW`](#fiftyone.operators.constants.ViewTarget.CURRENT_VIEW)             | Current view in the app                             |
| [`DATASET`](#fiftyone.operators.constants.ViewTarget.DATASET)                       | Entire dataset                                      |
| [`DATASET_VIEW`](#fiftyone.operators.constants.ViewTarget.DATASET_VIEW)             | Empty dataset view, i.e., `ctx.dataset.view()`.     |
| [`SELECTED_LABELS`](#fiftyone.operators.constants.ViewTarget.SELECTED_LABELS)       | Selected labels in the app view, if any.            |
| [`SELECTED_SAMPLES`](#fiftyone.operators.constants.ViewTarget.SELECTED_SAMPLES)     | Selected samples in the app view, if any.           |
| [`CUSTOM_VIEW_TARGET`](#fiftyone.operators.constants.ViewTarget.CUSTOM_VIEW_TARGET) | Custom view target specified by the caller.         |

**Methods:**

| [`values`](#fiftyone.operators.constants.ViewTarget.values)()   | Returns all [`ViewTarget`](#fiftyone.operators.constants.ViewTarget) values.   |
|-----------------------------------------------------------------|--------------------------------------------------------------------------------|

#### BASE_VIEW *= 'BASE_VIEW'*

Base view from which a generated view was created

If the current view is a generated view such as
[`fiftyone.core.clips.ClipsView`](fiftyone.core.clips.md#fiftyone.core.clips.ClipsView),
[`fiftyone.core.video.FramesView`](fiftyone.core.video.md#fiftyone.core.video.FramesView), or
[`fiftyone.core.patches.PatchesView`](fiftyone.core.patches.md#fiftyone.core.patches.PatchesView)), base view is the semantic
equivalent of “entire dataset” for these views. The base view is the
view from which the generated view was created. For example,
`dataset.limit(51).to_frames("ground_truth").limit(10)` has a base
view of `dataset.limit(51).to_frames("ground_truth")`

#### CURRENT_VIEW *= 'CURRENT_VIEW'*

Current view in the app

#### DATASET *= 'DATASET'*

Entire dataset

#### DATASET_VIEW *= 'DATASET_VIEW'*

Empty dataset view, i.e., `ctx.dataset.view()`.

Note: unlikely to be useful in the typical case.

#### SELECTED_LABELS *= 'SELECTED_LABELS'*

Selected labels in the app view, if any.

#### SELECTED_SAMPLES *= 'SELECTED_SAMPLES'*

Selected samples in the app view, if any.

#### CUSTOM_VIEW_TARGET *= 'CUSTOM_VIEW_TARGET'*

Custom view target specified by the caller.

When using this option, specify ‘custom_view_target’ in the
operator parameters with a list of JSON-serialized view stages to apply.

#### *classmethod* values()

Returns all [`ViewTarget`](#fiftyone.operators.constants.ViewTarget) values.
