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

# fiftyone.operators.types

FiftyOne operator types.

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

**Classes:**

| [`Pipeline`](#fiftyone.operators.types.Pipeline)([stages])                                         | Dataclass representing a FiftyOne operator pipeline.                                                                          |
|----------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|
| [`PipelineRunInfo`](#fiftyone.operators.types.PipelineRunInfo)([active, expected_children, ...])   | Dataclass with information about a pipeline run.                                                                              |
| [`PipelineStage`](#fiftyone.operators.types.PipelineStage)(operator_uri[, always_run, ...])        | Dataclass representing a stage in a FiftyOne plugin operator pipeline                                                         |
| [`BaseType`](#fiftyone.operators.types.BaseType)()                                                 | Base class for all types.                                                                                                     |
| [`Void`](#fiftyone.operators.types.Void)()                                                         | Represents a void type.                                                                                                       |
| [`Object`](#fiftyone.operators.types.Object)([root_view])                                          | Represents a JSON object.                                                                                                     |
| [`Property`](#fiftyone.operators.types.Property)(type, \*\*kwargs)                                 | Represents a property on an [`fiftyone.operators.Operator`](fiftyone.operators.md#fiftyone.operators.Operator).               |
| [`ResolvableProperty`](#fiftyone.operators.types.ResolvableProperty)(resolver, \*\*kwargs)         | Represents a resolvable property.                                                                                             |
| [`String`](#fiftyone.operators.types.String)([allow_empty])                                        | Represents a string.                                                                                                          |
| [`Boolean`](#fiftyone.operators.types.Boolean)()                                                   | Represents a boolean.                                                                                                         |
| [`Number`](#fiftyone.operators.types.Number)([min, max, int, float])                               | Represents a number.                                                                                                          |
| [`List`](#fiftyone.operators.types.List)(element_type[, min_items, max_items])                     | Represents a list.                                                                                                            |
| [`SampleID`](#fiftyone.operators.types.SampleID)()                                                 | Represents a `fiftyone.core.samples.Sample` ID.                                                                               |
| [`Enum`](#fiftyone.operators.types.Enum)(values)                                                   | Represents an enum.                                                                                                           |
| [`OneOf`](#fiftyone.operators.types.OneOf)(types)                                                  | Represents a one-of type.                                                                                                     |
| [`Tuple`](#fiftyone.operators.types.Tuple)(\*items)                                                | Represents a tuple of types.                                                                                                  |
| [`Tree`](#fiftyone.operators.types.Tree)(\*items)                                                  | Represents a tree selection type.                                                                                             |
| [`Map`](#fiftyone.operators.types.Map)(key_type, value_type)                                       | Represents a map.                                                                                                             |
| [`File`](#fiftyone.operators.types.File)(\*\*kwargs)                                               | Represents a file and related metadata for use with [`FileExplorerView`](#fiftyone.operators.types.FileExplorerView).         |
| [`UploadedFile`](#fiftyone.operators.types.UploadedFile)(\*\*kwargs)                               | Represents an object with uploaded file content and its metadata in properties.                                               |
| [`View`](#fiftyone.operators.types.View)([container])                                              | Represents a view of a [`Property`](#fiftyone.operators.types.Property).                                                      |
| [`InferredView`](#fiftyone.operators.types.InferredView)(\*\*kwargs)                               | Represents a view of a [`Property`](#fiftyone.operators.types.Property) that is inferred from the data.                       |
| [`Form`](#fiftyone.operators.types.Form)([live, submit_button_label, ...])                         | A form view.                                                                                                                  |
| [`ReadOnlyView`](#fiftyone.operators.types.ReadOnlyView)(\*\*kwargs)                               | A read-only [`View`](#fiftyone.operators.types.View).                                                                         |
| [`Choice`](#fiftyone.operators.types.Choice)(value[, include])                                     | Represents a choice in a [`Choices`](#fiftyone.operators.types.Choices) view.                                                 |
| [`Choices`](#fiftyone.operators.types.Choices)(\*\*kwargs)                                         | Represents a set of choices in a [`View`](#fiftyone.operators.types.View).                                                    |
| [`RadioGroup`](#fiftyone.operators.types.RadioGroup)(\*\*kwargs)                                   | Represents a set of choices in a [`View`](#fiftyone.operators.types.View) that are displayed as a radio group.                |
| [`Dropdown`](#fiftyone.operators.types.Dropdown)(\*\*kwargs)                                       | Represents a set of choices in a [`View`](#fiftyone.operators.types.View) that are displayed as a dropdown.                   |
| [`Notice`](#fiftyone.operators.types.Notice)(\*\*kwargs)                                           | Represents a notice in a [`View`](#fiftyone.operators.types.View).                                                            |
| [`Header`](#fiftyone.operators.types.Header)(\*\*kwargs)                                           | Represents a header in a [`View`](#fiftyone.operators.types.View).                                                            |
| [`Warning`](#fiftyone.operators.types.Warning)(\*\*kwargs)                                         | Represents a warning in a [`View`](#fiftyone.operators.types.View).                                                           |
| [`Error`](#fiftyone.operators.types.Error)(\*\*kwargs)                                             | Represents an error in a [`View`](#fiftyone.operators.types.View).                                                            |
| [`Button`](#fiftyone.operators.types.Button)(\*\*kwargs)                                           | Represents a button in a [`View`](#fiftyone.operators.types.View).                                                            |
| [`OperatorExecutionButtonView`](#fiftyone.operators.types.OperatorExecutionButtonView)(\*\*kwargs) | Represents an operator execution button in a [`View`](#fiftyone.operators.types.View).                                        |
| [`OneOfView`](#fiftyone.operators.types.OneOfView)(\*\*kwargs)                                     | Displays one of the given [`View`](#fiftyone.operators.types.View) instances.                                                 |
| [`ListView`](#fiftyone.operators.types.ListView)(\*\*kwargs)                                       | Displays a list of [`View`](#fiftyone.operators.types.View) instances.                                                        |
| [`TupleView`](#fiftyone.operators.types.TupleView)(\*itemsView, \*\*options)                       | Displays a tuple of [`View`](#fiftyone.operators.types.View) instances.                                                       |
| [`TreeSelectionView`](#fiftyone.operators.types.TreeSelectionView)(\*\*options)                    | Displays a tree selection checkbox groups.                                                                                    |
| [`CodeView`](#fiftyone.operators.types.CodeView)(\*\*kwargs)                                       | Displays a code editor.                                                                                                       |
| [`ColorView`](#fiftyone.operators.types.ColorView)(\*\*kwargs)                                     | Displays a color picker.                                                                                                      |
| [`TabsView`](#fiftyone.operators.types.TabsView)(\*\*kwargs)                                       | Displays a tabbed view.                                                                                                       |
| [`JSONView`](#fiftyone.operators.types.JSONView)(\*\*kwargs)                                       | Displays a JSON viewer.                                                                                                       |
| [`AutocompleteView`](#fiftyone.operators.types.AutocompleteView)(\*\*kwargs)                       | Displays an autocomplete input.                                                                                               |
| [`FileView`](#fiftyone.operators.types.FileView)(\*\*kwargs)                                       | Displays a file input.                                                                                                        |
| [`LinkView`](#fiftyone.operators.types.LinkView)(\*\*kwargs)                                       | Displays a hyperlink.                                                                                                         |
| [`HiddenView`](#fiftyone.operators.types.HiddenView)(\*\*kwargs)                                   | Allows properties to be hidden from the user.                                                                                 |
| [`LoadingView`](#fiftyone.operators.types.LoadingView)(\*\*kwargs)                                 | Displays a loading indicator.                                                                                                 |
| [`LoaderView`](#fiftyone.operators.types.LoaderView)(operator[, params, label, ...])               | A view that loads data asynchronously via an operator.                                                                        |
| [`PillBadgeView`](#fiftyone.operators.types.PillBadgeView)(\*\*kwargs)                             | Displays a pill shaped badge.                                                                                                 |
| [`PlotlyView`](#fiftyone.operators.types.PlotlyView)(\*\*kwargs)                                   | Displays a Plotly chart.                                                                                                      |
| [`Placement`](#fiftyone.operators.types.Placement)(place[, view])                                  | Represents the placement of an operator in the FiftyOne App.                                                                  |
| [`Places`](#fiftyone.operators.types.Places)(\*values)                                             | The places available to operators in the FiftyOne App.                                                                        |
| [`KeyValueView`](#fiftyone.operators.types.KeyValueView)(\*\*kwargs)                               | Displays a key-value editor.                                                                                                  |
| [`Column`](#fiftyone.operators.types.Column)(key, \*\*kwargs)                                      | A column in a [`TableView`](#fiftyone.operators.types.TableView).                                                             |
| [`Action`](#fiftyone.operators.types.Action)(name, \*\*kwargs)                                     | An action (currently supported only in a [`TableView`](#fiftyone.operators.types.TableView)).                                 |
| [`Tooltip`](#fiftyone.operators.types.Tooltip)(row, column, \*\*kwargs)                            | A tooltip (currently supported only in a [`TableView`](#fiftyone.operators.types.TableView)).                                 |
| [`TableView`](#fiftyone.operators.types.TableView)(\*\*kwargs)                                     | Displays a table.                                                                                                             |
| [`MapView`](#fiftyone.operators.types.MapView)(\*\*kwargs)                                         | Displays a key-value mapping.                                                                                                 |
| [`ProgressView`](#fiftyone.operators.types.ProgressView)(\*\*kwargs)                               | Displays a progress bar.                                                                                                      |
| [`ImageView`](#fiftyone.operators.types.ImageView)(\*\*kwargs)                                     | Displays an image.                                                                                                            |
| [`AlertView`](#fiftyone.operators.types.AlertView)(\*\*kwargs)                                     | Displays an alert.                                                                                                            |
| [`ToastView`](#fiftyone.operators.types.ToastView)(\*\*kwargs)                                     | Displays a snackbar style toast element.                                                                                      |
| [`CheckboxView`](#fiftyone.operators.types.CheckboxView)(\*\*kwargs)                               | Displays a checkbox.                                                                                                          |
| [`ErrorView`](#fiftyone.operators.types.ErrorView)(\*\*kwargs)                                     | Displays an error.                                                                                                            |
| [`HeaderView`](#fiftyone.operators.types.HeaderView)(\*\*kwargs)                                   | Displays a header component.                                                                                                  |
| [`ObjectView`](#fiftyone.operators.types.ObjectView)(\*\*kwargs)                                   | Displays an object component.                                                                                                 |
| [`RadioView`](#fiftyone.operators.types.RadioView)(\*\*kwargs)                                     | Displays a radio component for the given [`RadioGroup`](#fiftyone.operators.types.RadioGroup) instance.                       |
| [`SwitchView`](#fiftyone.operators.types.SwitchView)(\*\*kwargs)                                   | Displays a toggle switch.                                                                                                     |
| [`TextView`](#fiftyone.operators.types.TextView)(\*\*kwargs)                                       | Displays a text. .. note::     Must be used with [`String`](#fiftyone.operators.types.String) properties.                     |
| [`TextFieldView`](#fiftyone.operators.types.TextFieldView)([multiline, rows])                      | Displays a text input.                                                                                                        |
| [`FieldView`](#fiftyone.operators.types.FieldView)(\*\*kwargs)                                     | Displays a text input.                                                                                                        |
| [`LazyFieldView`](#fiftyone.operators.types.LazyFieldView)(\*\*kwargs)                             | Displays a lazy text input which only apply input field changes on blur or when user clicks the save button within the field. |
| [`DropdownView`](#fiftyone.operators.types.DropdownView)(\*\*kwargs)                               | Displays a dropdown selector input.                                                                                           |
| [`DateTimeView`](#fiftyone.operators.types.DateTimeView)(\*\*kwargs)                               | Displays a date/time input - response in epoch time                                                                           |
| [`LabelValueView`](#fiftyone.operators.types.LabelValueView)(\*\*kwargs)                           | Displays a label-value component.                                                                                             |
| [`PrimitiveView`](#fiftyone.operators.types.PrimitiveView)(\*\*kwargs)                             | Displays a primitive value component.                                                                                         |
| [`SliderView`](#fiftyone.operators.types.SliderView)(\*\*kwargs)                                   | Displays a slider component.                                                                                                  |
| [`TagsView`](#fiftyone.operators.types.TagsView)(\*\*kwargs)                                       | Displays a list of tags component.                                                                                            |
| [`Success`](#fiftyone.operators.types.Success)(\*\*kwargs)                                         | Represents a success in a [`View`](#fiftyone.operators.types.View).                                                           |
| [`ButtonView`](#fiftyone.operators.types.ButtonView)(\*\*kwargs)                                   | Represents a button in a [`Button`](#fiftyone.operators.types.Button).                                                        |
| [`MarkdownView`](#fiftyone.operators.types.MarkdownView)(\*\*kwargs)                               | Renders a markdown string as HTML.                                                                                            |
| [`StatusButtonView`](#fiftyone.operators.types.StatusButtonView)(\*\*kwargs)                       | Renders a status button.                                                                                                      |
| [`MediaPlayerView`](#fiftyone.operators.types.MediaPlayerView)(\*\*kwargs)                         | Renders a media player for audio and video files.                                                                             |
| [`FileExplorerView`](#fiftyone.operators.types.FileExplorerView)(\*\*kwargs)                       | Displays a file explorer for interacting with files.                                                                          |
| [`PromptView`](#fiftyone.operators.types.PromptView)(\*\*kwargs)                                   | Customizes how a prompt is rendered.                                                                                          |
| [`ViewTargetOptions`](#fiftyone.operators.types.ViewTargetOptions)(choices_view[, ...])            | Represents the options for a [`ViewTargetProperty`](#fiftyone.operators.types.ViewTargetProperty).                            |
| [`ViewTargetProperty`](#fiftyone.operators.types.ViewTargetProperty)(ctx[, view_type, ...])        | Property that displays a view target selector.                                                                                |
| [`GridView`](#fiftyone.operators.types.GridView)(\*\*kwargs)                                       | Displays properties of an object as a grid of components in horizontal or vertical orientation.                               |
| [`DashboardView`](#fiftyone.operators.types.DashboardView)(\*\*kwargs)                             | Defines a Dashboard view.                                                                                                     |
| [`DrawerView`](#fiftyone.operators.types.DrawerView)(\*\*kwargs)                                   | Renders an operator prompt as a left or right side drawer.                                                                    |
| [`IconButtonView`](#fiftyone.operators.types.IconButtonView)(\*\*kwargs)                           | Represents a button in a [`View`](#fiftyone.operators.types.View).                                                            |
| [`ModalView`](#fiftyone.operators.types.ModalView)(\*\*kwargs)                                     | Represents a button in a [`View`](#fiftyone.operators.types.View) that opens up an interactive modal.                         |
| [`HStackView`](#fiftyone.operators.types.HStackView)([orientation])                                | Displays properties of an object as a horizontal stack of components.                                                         |
| [`VStackView`](#fiftyone.operators.types.VStackView)([orientation])                                | Displays properties of an object as a vertical stack of components.                                                           |
| [`ButtonGroupView`](#fiftyone.operators.types.ButtonGroupView)([orientation])                      | Displays a group of buttons in a horizontal stack.                                                                            |
| [`MenuView`](#fiftyone.operators.types.MenuView)([orientation])                                    | Displays a menu of options in a vertical stack.                                                                               |
| [`ArrowNavView`](#fiftyone.operators.types.ArrowNavView)(\*\*kwargs)                               | Displays a floating navigation arrows.                                                                                        |
| [`FrameLoaderView`](#fiftyone.operators.types.FrameLoaderView)(\*\*kwargs)                         | Utility for animating panel state based on the given timeline_name.                                                           |
| [`TimelineView`](#fiftyone.operators.types.TimelineView)(\*\*kwargs)                               | Represents a timeline for playing animations.                                                                                 |
| [`TimerView`](#fiftyone.operators.types.TimerView)(\*\*kwargs)                                     | Supports a timer for executing operators/events after a specified duration or interval.                                       |
| [`ComponentView`](#fiftyone.operators.types.ComponentView)(name, \*\*kwargs)                       | Represents a custom component view.                                                                                           |
| [`Container`](#fiftyone.operators.types.Container)(\*\*kwargs)                                     | Represents a base container for a container types.                                                                            |
| [`PaperContainer`](#fiftyone.operators.types.PaperContainer)([elevation, rounded])                 | Represents an elevated block for a view.                                                                                      |
| [`OutlinedContainer`](#fiftyone.operators.types.OutlinedContainer)([rounded])                      | Represents an elevated block for a view.                                                                                      |
| [`RiskLevel`](#fiftyone.operators.types.RiskLevel)(\*values)                                       | Risk levels that operators can declare.                                                                                       |

**Functions:**

| [`dedent`](#fiftyone.operators.types.dedent)(text)   | Remove any common leading whitespace from every line in `text`.   |
|------------------------------------------------------|-------------------------------------------------------------------|

### *class* fiftyone.operators.types.Pipeline(stages: [list](fiftyone.core.session.events.md#fiftyone.core.session.events.Colorscale.list)[[PipelineStage](#fiftyone.operators.types.PipelineStage)] | None = None, \*\*kwargs)

Bases: `object`

Dataclass representing a FiftyOne operator pipeline.

A pipeline consists of one or more stages, each of which is an operator.

**Attributes:**

| [`stages`](#fiftyone.operators.types.Pipeline.stages)   | A list of [`PipelineStage`](#fiftyone.operators.types.PipelineStage) instances   |
|---------------------------------------------------------|----------------------------------------------------------------------------------|

**Methods:**

| [`stage`](#fiftyone.operators.types.Pipeline.stage)(operator_uri[, always_run, name, ...])   | Adds a stage to the end of the pipeline.                  |
|----------------------------------------------------------------------------------------------|-----------------------------------------------------------|
| [`from_json`](#fiftyone.operators.types.Pipeline.from_json)(json_dict)                       | Loads the pipeline from a JSON/python dict.               |
| [`to_json`](#fiftyone.operators.types.Pipeline.to_json)()                                    | Converts this pipeline to JSON/python dict representation |

#### stages *: [list](fiftyone.core.session.events.md#fiftyone.core.session.events.Colorscale.list)[[PipelineStage](#fiftyone.operators.types.PipelineStage)]*

A list of [`PipelineStage`](#fiftyone.operators.types.PipelineStage) instances

#### stage(operator_uri, always_run=False, name=None, num_distributed_tasks=None, params=None, rerunnable=None, request_params_overrides=None, \*\*kwargs)

Adds a stage to the end of the pipeline.

* **Parameters:**
  * **operator_uri** – the URI of the operator to use for the stage
  * **always_run** – if True, this stage runs even when the pipeline
    is inactive (e.g., after a failure), enabling
    cleanup/finalization stages
  * **name** – the name of the stage
  * **num_distributed_tasks** – the number of distributed tasks to use
    for the stage, optional
  * **params** – optional parameters to pass to the operator
  * **rerunnable** – whether the stage is rerunnable
  * **request_params_overrides** – optional dict of request parameter
    overrides for the execution context. Allows overriding fields
    like `view` (accepts a DatasetView or serialized stages),
    `filters`, etc.
  * **\*\*kwargs** – reserved for future use
* **Returns:**
  a [`PipelineStage`](#fiftyone.operators.types.PipelineStage)

#### *classmethod* from_json(json_dict)

Loads the pipeline from a JSON/python dict.

Examples:

```default
{
    "stages": [
        {
            "operator_uri": "@voxel51/test/blah",
            "name": "my_stage",
            "request_params_overrides": {
                "view_name": "filtered_view"
            }
        },
        ...,
    ]
}
```

* **Parameters:**
  **json_dict** – a JSON / python dict representation of the pipeline

#### to_json()

Converts this pipeline to JSON/python dict representation

Examples:

```default
{
    "stages": [
        {
            "operator_uri": "@voxel51/test/blah",
            "name": "my_stage",
            "request_params_overrides": {
                "view_name": "filtered_view"
            }
        },
        ...,
    ]
}
```

* **Returns:**
  JSON / python dict representation of the pipeline

### *class* fiftyone.operators.types.PipelineRunInfo(active=True, expected_children=None, stage_index=0, child_errors=None, \*\*\_)

Bases: `object`

Dataclass with information about a pipeline run.

Unlike the pipeline definition, the information in this class is dynamic
as it changes over time as the pipeline is executed. An instance of this
class represents a snapshot of the state of execution.

**Attributes:**

| [`active`](#fiftyone.operators.types.PipelineRunInfo.active)                       | Whether the pipeline is currently active, i.e., having no failures in prior stages   |
|------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------|
| [`expected_children`](#fiftyone.operators.types.PipelineRunInfo.expected_children) | List of the number of expected child operations per stage                            |
| [`stage_index`](#fiftyone.operators.types.PipelineRunInfo.stage_index)             | Index of the pipeline's current execution stage                                      |
| [`child_errors`](#fiftyone.operators.types.PipelineRunInfo.child_errors)           | Mapping from child operation IDs to error messages                                   |

**Methods:**

| [`from_json`](#fiftyone.operators.types.PipelineRunInfo.from_json)(doc)   |    |
|---------------------------------------------------------------------------|----|
| [`to_json`](#fiftyone.operators.types.PipelineRunInfo.to_json)()          |    |

#### active *: [bool](fiftyone.core.stages.md#fiftyone.core.stages.Exists.bool)* *= True*

Whether the pipeline is currently active, i.e., having no failures in
prior stages

#### expected_children *: List[int] | None* *= None*

List of the number of expected child operations per stage

#### stage_index *: int* *= 0*

Index of the pipeline’s current execution stage

#### child_errors *: dict[str, str] | None* *= None*

Mapping from child operation IDs to error messages

#### *classmethod* from_json(doc: dict)

#### to_json()

### *class* fiftyone.operators.types.PipelineStage(operator_uri: str, always_run: [bool](fiftyone.core.stages.md#fiftyone.core.stages.Exists.bool) = False, name: str | None = None, num_distributed_tasks: int | None = None, params: Mapping[str, Any] | None = None, rerunnable: [bool](fiftyone.core.stages.md#fiftyone.core.stages.Exists.bool) | None = None, request_params_overrides: Mapping[str, Any] | None = None, \*\*\_)

Bases: `object`

Dataclass representing a stage in a FiftyOne plugin operator pipeline

**Attributes:**

| [`operator_uri`](#fiftyone.operators.types.PipelineStage.operator_uri)                         | The URI of the operator to use for the stage                                                  |
|------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------|
| [`always_run`](#fiftyone.operators.types.PipelineStage.always_run)                             | Whether the stage should always run regardless of failures in previous stages of the pipeline |
| [`name`](#fiftyone.operators.types.PipelineStage.name)                                         | The optional name of the stage                                                                |
| [`num_distributed_tasks`](#fiftyone.operators.types.PipelineStage.num_distributed_tasks)       | The number of distributed tasks to split the stage into                                       |
| [`params`](#fiftyone.operators.types.PipelineStage.params)                                     | Optional dict of parameters to pass to the operator                                           |
| [`rerunnable`](#fiftyone.operators.types.PipelineStage.rerunnable)                             | Whether the stage is rerunnable, defaults to operator config                                  |
| [`request_params_overrides`](#fiftyone.operators.types.PipelineStage.request_params_overrides) | Optional dict of request parameter overrides for the execution context.                       |

**Methods:**

| [`to_json`](#fiftyone.operators.types.PipelineStage.to_json)()   | Converts the object definition to JSON / python dict.   |
|------------------------------------------------------------------|---------------------------------------------------------|

#### operator_uri *: str*

The URI of the operator to use for the stage

#### always_run *: [bool](fiftyone.core.stages.md#fiftyone.core.stages.Exists.bool)* *= False*

Whether the stage should always run regardless of failures in
previous stages of the pipeline

#### name *: str | None* *= None*

The optional name of the stage

#### num_distributed_tasks *: int | None* *= None*

The number of distributed tasks to split the stage into

#### params *: Mapping[str, Any] | None* *= None*

Optional dict of parameters to pass to the operator

#### rerunnable *: [bool](fiftyone.core.stages.md#fiftyone.core.stages.Exists.bool) | None* *= None*

Whether the stage is rerunnable, defaults to operator config

#### request_params_overrides *: Mapping[str, Any] | None* *= None*

Optional dict of request parameter overrides for the execution context.

Commonly overridden parameters include:
- `view`: a [`fiftyone.core.view.DatasetView`](fiftyone.core.view.md#fiftyone.core.view.DatasetView) (serialized

> automatically) or `None` to clear any active view
- `view_name`: name of a saved view to use
- `selected`: list of selected sample IDs
- `group_slice`: group slice to use

The keys `dataset_id`, `dataset_name`, `delegated`,
`delegation_target`, `request_delegation`, and `results` are not
allowed and will be removed with a logged error.

Note: The `params` field should not be included here; use the `params`
field of [`PipelineStage`](#fiftyone.operators.types.PipelineStage) directly for operator parameters.

#### to_json()

Converts the object definition to JSON / python dict.

* **Returns:**
  a JSON / python dict

### fiftyone.operators.types.dedent(text)

Remove any common leading whitespace from every line in `text`.

This can be used to make triple-quoted strings line up with the left
edge of the display, while still presenting them in the source code
in indented form.

Note that tabs and spaces are both treated as whitespace, but they
are not equal: the lines “  hello” and “thello” are
considered to have no common leading whitespace.

Entirely blank lines are normalized to a newline character.

### *class* fiftyone.operators.types.BaseType

Bases: `object`

Base class for all types.

**Methods:**

| [`to_json`](#fiftyone.operators.types.BaseType.to_json)()   |    |
|-------------------------------------------------------------|----|

#### to_json()

### *class* fiftyone.operators.types.Void

Bases: [`BaseType`](#fiftyone.operators.types.BaseType)

Represents a void type.

**Methods:**

| [`to_json`](#fiftyone.operators.types.Void.to_json)()   |    |
|---------------------------------------------------------|----|

#### to_json()

### *class* fiftyone.operators.types.Object(root_view=None)

Bases: [`BaseType`](#fiftyone.operators.types.BaseType)

Represents a JSON object.

* **Parameters:**
  **root_view** (*None*) – the [`View`](#fiftyone.operators.types.View) used to display the object

**Methods:**

| [`add_property`](#fiftyone.operators.types.Object.add_property)(name, property)                | Adds a property to the object.                                                                            |
|------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------|
| [`get_property`](#fiftyone.operators.types.Object.get_property)(name)                          | Gets a property by name.                                                                                  |
| [`define_property`](#fiftyone.operators.types.Object.define_property)(name, type, \*\*kwargs)  | Defines a property on the object.                                                                         |
| [`str`](#fiftyone.operators.types.Object.str)(name[, allow_empty])                             | Defines a property on the object that is a string.                                                        |
| [`bool`](#fiftyone.operators.types.Object.bool)(name, \*\*kwargs)                              | Defines a property on the object that is a boolean.                                                       |
| [`int`](#fiftyone.operators.types.Object.int)(name[, min, max])                                | Defines a property on the object that is an integer.                                                      |
| [`float`](#fiftyone.operators.types.Object.float)(name[, min, max])                            | Defines a property on the object that is a float.                                                         |
| [`enum`](#fiftyone.operators.types.Object.enum)(name, values, \*\*kwargs)                      | Defines a property on the object that is an enum.                                                         |
| [`list`](#fiftyone.operators.types.Object.list)(name, element_type[, min_items, max_items])    | Defines a property on the object that is a list.                                                          |
| [`obj`](#fiftyone.operators.types.Object.obj)(name, \*\*kwargs)                                | Defines a property on the object that is an object.                                                       |
| [`file`](#fiftyone.operators.types.Object.file)(name, \*\*kwargs)                              | Defines a property on the object that is a file.                                                          |
| [`uploaded_file`](#fiftyone.operators.types.Object.uploaded_file)(name, \*\*kwargs)            | Defines a property on the object that is an uploaded file.                                                |
| [`view`](#fiftyone.operators.types.Object.view)(name, view, \*\*kwargs)                        | Defines a view-only property.                                                                             |
| [`loader`](#fiftyone.operators.types.Object.loader)(name, type, operator[, params, ...])       | Defines a loader property that fetches data asynchronously.                                               |
| [`btn`](#fiftyone.operators.types.Object.btn)(name, label[, icon, variant, disabled, ...])     | Defines a button or icon button to display to the user as a [`Button`](#fiftyone.operators.types.Button). |
| [`img`](#fiftyone.operators.types.Object.img)(name[, href, on_click, prompt, params, ...])     | Defines an image to display to the user as a [`ImageView`](#fiftyone.operators.types.ImageView).          |
| [`message`](#fiftyone.operators.types.Object.message)(name, label, \*\*kwargs)                 | Defines a message to display to the user as a [`Notice`](#fiftyone.operators.types.Notice).               |
| [`grid`](#fiftyone.operators.types.Object.grid)(name, \*\*kwargs)                              | Defines a grid view as a [`View`](#fiftyone.operators.types.View).                                        |
| [`dashboard`](#fiftyone.operators.types.Object.dashboard)(name, \*\*kwargs)                    | Defines a dashboard view as a [`View`](#fiftyone.operators.types.View).                                   |
| [`plot`](#fiftyone.operators.types.Object.plot)(name, \*\*kwargs)                              | Defines an object property displayed as a plot.                                                           |
| [`h_stack`](#fiftyone.operators.types.Object.h_stack)(name, \*\*kwargs)                        | Defines a horizontal stack object.                                                                        |
| [`v_stack`](#fiftyone.operators.types.Object.v_stack)(name, \*\*kwargs)                        | Defines a vertical stack object.                                                                          |
| [`menu`](#fiftyone.operators.types.Object.menu)(name, \*\*kwargs)                              | Defined an [`Object`](#fiftyone.operators.types.Object) property that is displayed as a menu.             |
| [`btn_group`](#fiftyone.operators.types.Object.btn_group)(name, \*\*kwargs)                    | Defines a button group object.                                                                            |
| [`md`](#fiftyone.operators.types.Object.md)(markdown[, name])                                  | Defines a markdown object.                                                                                |
| [`media_player`](#fiftyone.operators.types.Object.media_player)(name, url, \*\*kwargs)         | Defines a media player object.                                                                            |
| [`arrow_nav`](#fiftyone.operators.types.Object.arrow_nav)(name[, forward, backward, position]) | Defines a floating navigation arrows as a [`ArrowNavView`](#fiftyone.operators.types.ArrowNavView).       |
| [`map`](#fiftyone.operators.types.Object.map)(name, key_type, value_type, \*\*kwargs)          | Defines a map property on the object.                                                                     |
| [`oneof`](#fiftyone.operators.types.Object.oneof)(name, types, \*\*kwargs)                     | Defines a one-of property on the object.                                                                  |
| [`tuple`](#fiftyone.operators.types.Object.tuple)(name, \*items, \*\*kwargs)                   | Defines a tuple property on the object.                                                                   |
| [`tree`](#fiftyone.operators.types.Object.tree)(name, \*\*kwargs)                              | Defines a tree property on the object.                                                                    |
| [`clone`](#fiftyone.operators.types.Object.clone)()                                            | Clones the definition of the object.                                                                      |
| [`view_target`](#fiftyone.operators.types.Object.view_target)(ctx[, name, view_type, ...])     | Defines a view target input property.                                                                     |
| [`target_view`](#fiftyone.operators.types.Object.target_view)(ctx[, name, view_type, ...])     | Defines a view target input property.                                                                     |
| [`to_json`](#fiftyone.operators.types.Object.to_json)()                                        | Converts the object definition to JSON.                                                                   |

#### add_property(name, property)

Adds a property to the object.

* **Parameters:**
  * **name** – the name of the property
  * **property** – the property to add
* **Returns:**
  the [`Property`](#fiftyone.operators.types.Property) that was added

#### get_property(name)

Gets a property by name.

* **Parameters:**
  **name** – the name of the property
* **Returns:**
  the [`Property`](#fiftyone.operators.types.Property), or None

#### define_property(name, type, \*\*kwargs)

Defines a property on the object.

* **Parameters:**
  * **name** – the name of the property
  * **type** – the type of the property
  * **label** (*None*) – the label of the property
  * **description** (*None*) – the description of the property
  * **view** (*None*) – the [`View`](#fiftyone.operators.types.View) of the property
* **Returns:**
  the [`Property`](#fiftyone.operators.types.Property) that was added

#### str(name, allow_empty=False, \*\*kwargs)

Defines a property on the object that is a string.

* **Parameters:**
  * **name** – the name of the property
  * **label** (*None*) – the label of the property
  * **description** (*None*) – the description of the property
  * **view** (*None*) – the [`View`](#fiftyone.operators.types.View) of the property
* **Returns:**
  a [`Property`](#fiftyone.operators.types.Property)

#### bool(name, \*\*kwargs)

Defines a property on the object that is a boolean.

* **Parameters:**
  * **name** – the name of the property
  * **label** (*None*) – the label of the property
  * **description** (*None*) – the description of the property
  * **view** (*None*) – the [`View`](#fiftyone.operators.types.View) of the property
* **Returns:**
  a [`Property`](#fiftyone.operators.types.Property)

#### int(name, min=None, max=None, \*\*kwargs)

Defines a property on the object that is an integer.

* **Parameters:**
  * **name** – the name of the property
  * **min** – minimum value of the property
  * **max** – maximum value of the property
  * **label** (*None*) – the label of the property
  * **description** (*None*) – the description of the property
  * **view** (*None*) – the [`View`](#fiftyone.operators.types.View) of the property
* **Returns:**
  a [`Property`](#fiftyone.operators.types.Property)

#### float(name, min=None, max=None, \*\*kwargs)

Defines a property on the object that is a float.

* **Parameters:**
  * **name** – the name of the property
  * **min** – minimum value of the property
  * **max** – maximum value of the property
  * **label** (*None*) – the label of the property
  * **description** (*None*) – the description of the property
  * **view** (*None*) – the [`View`](#fiftyone.operators.types.View) of the property
* **Returns:**
  a [`Property`](#fiftyone.operators.types.Property)

#### enum(name, values, \*\*kwargs)

Defines a property on the object that is an enum.

* **Parameters:**
  * **name** – the name of the property
  * **values** – a list of values that define the enum
  * **label** (*None*) – the label of the property
  * **description** (*None*) – the description of the property
  * **view** (*None*) – the [`View`](#fiftyone.operators.types.View) of the property, which must be a
    [`Choices`](#fiftyone.operators.types.Choices) or a subclass of it
* **Returns:**
  a [`Property`](#fiftyone.operators.types.Property)

#### list(name, element_type, min_items=None, max_items=None, \*\*kwargs)

Defines a property on the object that is a list.

* **Parameters:**
  * **name** – the name of the property
  * **element_type** – the type of the elements in the list
  * **label** (*None*) – the label of the property
  * **description** (*None*) – the description of the property
  * **view** (*None*) – the [`View`](#fiftyone.operators.types.View) of the property
* **Returns:**
  a [`Property`](#fiftyone.operators.types.Property)

#### obj(name, \*\*kwargs)

Defines a property on the object that is an object.

* **Parameters:**
  * **name** – the name of the property
  * **label** (*None*) – the label of the property
  * **description** (*None*) – the description of the property
  * **view** (*None*) – the [`View`](#fiftyone.operators.types.View) of the property
* **Returns:**
  a [`Property`](#fiftyone.operators.types.Property)

#### file(name, \*\*kwargs)

Defines a property on the object that is a file.

* **Parameters:**
  * **name** – the name of the property
  * **view** (*None*) – the [`View`](#fiftyone.operators.types.View) of the property

#### uploaded_file(name, \*\*kwargs)

Defines a property on the object that is an uploaded file.

* **Parameters:**
  * **name** – the name of the property
  * **view** (*None*) – the [`View`](#fiftyone.operators.types.View) of the property
  * **lite** (*False*) – whether to use the lite version of the file. When True, the content of the
    file in not included in resolve_input params, only the metadata is included.

#### view(name, view, \*\*kwargs)

Defines a view-only property.

Examples:

```default
import fiftyone.operators.types as types

notice = types.Notice(label="a label", description="a description")
inputs = types.Object()
inputs.view("notice", notice)
```

* **Parameters:**
  * **name** – the name of the property
  * **view** – the [`View`](#fiftyone.operators.types.View) to define
* **Returns:**
  a [`Property`](#fiftyone.operators.types.Property)

#### loader(name, type, operator, params=None, label=None, placeholder_view=None, dependencies=None, \*\*kwargs)

Defines a loader property that fetches data asynchronously.

The loader executes an operator and stores the result at the property
path. The property value always has the following structure:

```default
{
    "state": "idle" | "loading" | "loaded" | "errored",
    "data": <type>,  # the loaded data, shaped by the type argument
    "error": <str>   # error message (when state is "errored")
}
```

The `type` argument defines the shape of the `data` field, not the
entire loader value. For example, if `type=types.List(types.Object())`,
then `ctx.params[name]["data"]` will be a list of objects.

By default, the loader executes only once when the component mounts.
Use the `dependencies` argument to specify which param paths should
trigger a reload when their values change.

Examples:

```default
def resolve_input(self, ctx):
    inputs = types.Object()

    inputs.str("make", label="Car Make")

    chosen_make = ctx.params.get("make")
    if chosen_make:
        inputs.loader(
            "available_models",
            type=types.List(types.Object()),
            operator="@my-plugin/load_models",
            params={"make": chosen_make},
            label="Loading models...",
            dependencies=["make"],  # reload when "make" changes
        )

    models = ctx.params.get("available_models", {})
    if models.get("state") == "loaded":
        choices = Choices()
        for model in models.get("data", []):
            choices.add_choice(model["id"], label=model["name"])
        inputs.enum("model", values=choices)

    return types.Property(inputs)
```

* **Parameters:**
  * **name** – the name of the property
  * **type** – the type of the `data` field within the loader value
    (e.g., `types.Object()`, `types.List(types.Object())`)
  * **operator** – the operator to execute (string URI or callable method)
  * **params** (*None*) – parameters to pass to the operator
  * **label** (*None*) – loading message to display
  * **placeholder_view** (*None*) – view to render while loading
  * **dependencies** (*None*) – list of param paths (dot-notation supported)
    that should trigger a reload when changed. If None, the loader
    only executes once on mount
* **Returns:**
  a [`Property`](#fiftyone.operators.types.Property)

#### btn(name, label, icon=None, variant=None, disabled=False, on_click=None, prompt=False, params=None, space=None, href=None, icon_position='left', \*\*kwargs)

Defines a button or icon button to display to the user as a [`Button`](#fiftyone.operators.types.Button).

Examples:

```default
import fiftyone.operators.types as types

inputs = types.Object()
inputs.btn(
    "greet",
    label="Say Hi!",
    icon="waving_hand",
    variant="round",
    on_click="print_stdout",
    params={"msg": "Hi!"},
)
```

* **Parameters:**
  * **name** – the name of the property
  * **label** – the label of the button
  * **icon** (*None*) – the name of the icon to display
  * **icon_position** ( *"left"*) – the position of the icon. Can be `"left"` or `"right"`
  * **disabled** (*False*) – whether the button is disabled
  * **variant** (*None*) – the variant of the button. Can be `"contained"`, `"outlined"`,
    `"round"` or `"square"`
  * **on_click** (*None*) – the name of the operator to execute when the button is clicked
  * **prompt** (*False*) – whether to prompt the user before executing the operator
  * **params** (*None*) – the parameters to pass to the operator
  * **space** (*None*) – An int specifying how much vertical/horizontal space to allocate out
    of `12` depending on the orientation of the parent container
  * **href** (*None*) – the URL to navigate to when the button is clicked

#### img(name, href=None, on_click=None, prompt=False, params=None, point_on_hover=True, height=None, width=None, alt_text=None, \*\*kwargs)

Defines an image to display to the user as a [`ImageView`](#fiftyone.operators.types.ImageView).

Examples:

```default
import fiftyone.operators.types as types
ctx.panel.state.my_img = "/path/to/my/image.jpg"

panel = types.Object()
panel.img(
    "my_img", # uses the value in ctx.panel.state.my_img
    href="https://path/to/navigate/to",
    on_click=self.do_something,
    prompt=False,
    params={"foo": "bar"},
    point_on_hover=True,
    height="100px",
    width="100px",
    alt_text="My image alt text"
)
```

* **Parameters:**
  * **name** – the name of the state variable to use as the image source
  * **href** (*None*) – the url to navigate to when the image is clicked
  * **on_click** (*None*) – the name of the operator to execute when the button is clicked
  * **prompt** (*False*) – whether to prompt the user before executing the operator
  * **params** (*None*) – the parameters to pass to the operator
  * **point_on_hover** (*True*) – whether to show a pointer when hovering over the image
  * **height** (*None*) – the height of the image
  * **width** (*None*) – the width of the image
  * **alt_text** (*None*) – the alt text of the image

#### message(name, label, \*\*kwargs)

Defines a message to display to the user as a [`Notice`](#fiftyone.operators.types.Notice).

* **Parameters:**
  * **name** – the name of the property
  * **label** – the label of the notice
  * **description** (*None*) – the description of the notice
  * **view** (*None*) – the [`View`](#fiftyone.operators.types.View) of the notice
* **Returns:**
  a [`Property`](#fiftyone.operators.types.Property)

#### grid(name, \*\*kwargs)

Defines a grid view as a [`View`](#fiftyone.operators.types.View).

#### dashboard(name, \*\*kwargs)

Defines a dashboard view as a [`View`](#fiftyone.operators.types.View).

See [`DashboardView`](#fiftyone.operators.types.DashboardView) for more information.

* **Parameters:**
  **name** – the name of the property
* **Returns:**
  an [`Object`](#fiftyone.operators.types.Object)

See [`DashboardView`](#fiftyone.operators.types.DashboardView) for more information.

#### plot(name, \*\*kwargs)

Defines an object property displayed as a plot.

* **Parameters:**
  * **name** – the name of the property
  * **config** (*None*) – the chart config
  * **layout** (*None*) – the chart layout

See [`PlotlyView`](#fiftyone.operators.types.PlotlyView) for more information.

#### h_stack(name, \*\*kwargs)

Defines a horizontal stack object.

* **Parameters:**
  **name** – the name of the property
* **Returns:**
  a [`Object`](#fiftyone.operators.types.Object)

#### v_stack(name, \*\*kwargs)

Defines a vertical stack object.

* **Parameters:**
  **name** – the name of the property
* **Returns:**
  a [`Object`](#fiftyone.operators.types.Object)

#### menu(name, \*\*kwargs)

Defined an [`Object`](#fiftyone.operators.types.Object) property that is displayed as a menu.

#### NOTE
Can be used for an [`Button`](#fiftyone.operators.types.Button) type with properties whose views are one of
[`Button`](#fiftyone.operators.types.Button), [`Dropdown`](#fiftyone.operators.types.Dropdown), [`DropdownView`](#fiftyone.operators.types.DropdownView), and :class;\`Choices\`. The variant
and color of the items can be set using the `variant` and `color` parameters.

* **Parameters:**
  * **name** – the name of the property
  * **variant** (*None*) – the variant for the items of the menu. Can be `"contained"`,
    `"outlined"`, `"round"` or `"square"`
  * **color** (*None*) – the color for the items of the menu.
  * **overlay** (*None*) – whether to display the menu as an overlay. Can be `"top-left"`,
  * **"top-center"**
  * **"top-right"**
  * **"bottom-left"**
  * **"bottom-center"\`**
  * **or**
  * **of** ( *"bottom-right". Overlay is useful when you want to display a floating menu on top*)
  * **content** (*another*)
  * **icon** (*None*) – when set, the icon will be displayed as the menu button instead of the label.
  * **"SettingsIcon"** (*Can be*)
  * **"MoreVertIcon".**
* **Returns:**
  a [`Object`](#fiftyone.operators.types.Object)

#### btn_group(name, \*\*kwargs)

Defines a button group object.

* **Parameters:**
  **name** – the name of the property
* **Returns:**
  a [`Object`](#fiftyone.operators.types.Object)

#### md(markdown, name='markdown', \*\*kwargs)

Defines a markdown object.

* **Parameters:**
  * **markdown** – the markdown to display
  * **name** – the name of the property

#### media_player(name, url, \*\*kwargs)

Defines a media player object.

* **Parameters:**
  * **name** – the name of the property
  * **url** – the URL of the media to display
  * **on_start** (*None*) – the operator to execute when the media starts
  * **on_play** (*None*) – the operator to execute when the media is played
  * **on_pause** (*None*) – the operator to execute when the media is paused
  * **on_buffer** (*None*) – the operator to execute when the media is buffering
  * **on_buffer_end** (*None*) – the operator to execute when the media stops buffering
  * **on_ended** (*None*) – the operator to execute when the media ends
  * **on_error** (*None*) – the operator to execute when the media errors
  * **on_duration** (*None*) – the operator to execute when the media duration is loaded
  * **on_seek** (*None*) – the operator to execute when the media is seeked
  * **on_progress** (*None*) – the operator to execute when the media progresses
* **Returns:**
  a [`Object`](#fiftyone.operators.types.Object)

#### arrow_nav(name, forward=None, backward=None, position=None, \*\*kwargs)

Defines a floating navigation arrows as a [`ArrowNavView`](#fiftyone.operators.types.ArrowNavView).

* **Parameters:**
  * **forward** (*True*) – Whether to display the forward arrow
  * **backward** (*True*) – Whether to display the backward arrow
  * **on_forward** (*None*) – The operator to execute when the forward arrow is clicked
  * **on_backward** (*None*) – The operator to execute when the backward arrow is clicked
  * **position** ( *"center"*) – The position of the arrows. Can be either `"top"`, `center`,
    `"bottom"`, `"left"`, `middle` (center horizontally), or ``"right"`
* **Returns:**
  a [`Property`](#fiftyone.operators.types.Property)

#### map(name, key_type, value_type, \*\*kwargs)

Defines a map property on the object.

* **Parameters:**
  * **name** – the name of the property
  * **key_type** – the type of the keys in the map
  * **value_type** – the type of the values in the map
* **Returns:**
  a [`Map`](#fiftyone.operators.types.Map)

#### oneof(name, types, \*\*kwargs)

Defines a one-of property on the object.

* **Parameters:**
  * **name** – the name of the property
  * **types** – list of types that are instances of [`BaseType`](#fiftyone.operators.types.BaseType)
* **Returns:**
  a [`OneOf`](#fiftyone.operators.types.OneOf)

#### tuple(name, \*items, \*\*kwargs)

Defines a tuple property on the object.

* **Parameters:**
  * **name** – the name of the property
  * **\*items** – the types of the items in the tuple
* **Returns:**
  a [`Tuple`](#fiftyone.operators.types.Tuple)

#### tree(name, \*\*kwargs)

Defines a tree property on the object.

* **Parameters:**
  **name** – the name of the property
* **Returns:**
  a [`Tree`](#fiftyone.operators.types.Tree)

#### clone()

Clones the definition of the object.

* **Parameters:**
  **name** – the name of the property
* **Returns:**
  an [`Object`](#fiftyone.operators.types.Object)

#### view_target(ctx, name='view_target', view_type=None, action_description='Process', default_target=None, allow_selected_samples=True, allow_selected_labels=False, allow_dataset_view=False, base_view_label='Base view', base_view_description=None, current_view_label='Current view', current_view_description=None, dataset_label='Dataset', dataset_description=None, dataset_view_label='Dataset', dataset_view_description=None, selected_samples_label='Current selection', selected_samples_description=None, selected_labels_label='Selected labels', selected_labels_description=None, require_flat=False, \*\*kwargs)

Defines a view target input property.

This property has an enum input that allows the user to select which view
to process. The available choices depend on the current context and the
provided flags.

The choices include:

- Dataset (if the current view is not a generated view)
- Base view (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)), which 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")`
- Dataset view (if `allow_dataset_view` is `True`)
- Current view (if the current view is different from the dataset view)
- Current selection (if `allow_selected_samples` is `True` and there are
  selected samples)
- Selected labels (if `allow_selected_labels` is `True` and there are
  selected labels)

If there’s no view or selected items, the only option is entire dataset,
so the view target selector is hidden and “DATASET” will be returned.

The resolved target view can be accessed in the operator’s
[`execute()`](fiftyone.operators.md#fiftyone.operators.Operator.execute) method
via [`ctx.target_view()`](fiftyone.operators.md#fiftyone.operators.ExecutionContext.target_view).

The target view descriptions are generated based on the provided
`action_description` and the various description parameters. If a
description parameter is not `None`, it will be used as the
description for the corresponding target view choice. Otherwise, a
default description will be generated such as
`f"{action_description} the base view"`.

Examples:

```default
import fiftyone.operators as foo

class MyTargetViewOperator(foo.Operator):
    @property
    def config(self):
        return foo.OperatorConfig(
            name="target_view_operator",
            label="Testing Target View Operator",
            dynamic=True,
        )

    def resolve_input(self, ctx):
        inputs = types.Object()

        view_target_prop = inputs.view_target(ctx)

        return types.Property(
            inputs, view=types.View(label="Target View Operator")
        )

    def execute(self, ctx):
        target_view = ctx.target_view()
        # Do something with the target view
        print("Sample collection size", len(target_view))

Args:
    ctx: the operator's :class:`fiftyone.operators.ExecutionContext`
    name(view_target): the name of the view target property
    view_type (RadioGroup): the view type to use (RadioGroup, Dropdown,
        etc.)
    default_target (None): the default target view to select if
        multiple choices are available. If ``None`` or
        ``default_target`` is not an available choice, the most
        targeted / selective available choice is chosen.
    action_description (Process): a short description of the action
        being performed, used to generate default descriptions for the
        various target views
    allow_selected_samples (True): whether to allow the "selected
        samples" target view
    allow_selected_labels (False): whether to allow the "selected
        labels" target view
    allow_dataset_view (False): whether to allow the "dataset view"
        target view
    base_view_label (Base view): the label for the "base view" target
        view
    base_view_description (None): the description for the "base view"
        target view. If ``None``, a default description is generated
    current_view_label (Current view): the label for the "current
        view" target view
    current_view_description (None): the description for the "current
        view" target view. If ``None``, a default description is
        generated
    dataset_label (Dataset): the label for the "entire dataset"
        target view
    dataset_description (None): the description for the "entire
        dataset" target view. If ``None``, a default description is
        generated
    dataset_view_label (Dataset): the label for the "dataset view"
        target view
    dataset_view_description (None): the description for the "dataset
        view" target view. If ``None``, a default description is
        generated
    selected_samples_label (Current selection): the label for the
        "selected samples" target view
    selected_samples_description (None): the description for the
        "selected samples" target view. If ``None``, a default
        description is generated
    selected_labels_label (Selected labels): the label for the
        "selected labels" target view
    selected_labels_description (None): the description for the
        "selected labels" target view. If ``None``, a default
        description is generated
    require_flat (False): whether the operation requires a
        flattened (non-grouped) collection

Returns:
    a :class:`ViewTargetProperty`
```

#### target_view(ctx, name='view_target', view_type=None, action_description='Process', default_target=None, allow_selected_samples=True, allow_selected_labels=False, allow_dataset_view=False, base_view_label='Base view', base_view_description=None, current_view_label='Current view', current_view_description=None, dataset_label='Dataset', dataset_description=None, dataset_view_label='Dataset', dataset_view_description=None, selected_samples_label='Current selection', selected_samples_description=None, selected_labels_label='Selected labels', selected_labels_description=None, require_flat=False, \*\*kwargs)

Defines a view target input property.

This property has an enum input that allows the user to select which view
to process. The available choices depend on the current context and the
provided flags.

The choices include:

- Dataset (if the current view is not a generated view)
- Base view (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)), which 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")`
- Dataset view (if `allow_dataset_view` is `True`)
- Current view (if the current view is different from the dataset view)
- Current selection (if `allow_selected_samples` is `True` and there are
  selected samples)
- Selected labels (if `allow_selected_labels` is `True` and there are
  selected labels)

If there’s no view or selected items, the only option is entire dataset,
so the view target selector is hidden and “DATASET” will be returned.

The resolved target view can be accessed in the operator’s
[`execute()`](fiftyone.operators.md#fiftyone.operators.Operator.execute) method
via [`ctx.target_view()`](fiftyone.operators.md#fiftyone.operators.ExecutionContext.target_view).

The target view descriptions are generated based on the provided
`action_description` and the various description parameters. If a
description parameter is not `None`, it will be used as the
description for the corresponding target view choice. Otherwise, a
default description will be generated such as
`f"{action_description} the base view"`.

Examples:

```default
import fiftyone.operators as foo

class MyTargetViewOperator(foo.Operator):
    @property
    def config(self):
        return foo.OperatorConfig(
            name="target_view_operator",
            label="Testing Target View Operator",
            dynamic=True,
        )

    def resolve_input(self, ctx):
        inputs = types.Object()

        view_target_prop = inputs.view_target(ctx)

        return types.Property(
            inputs, view=types.View(label="Target View Operator")
        )

    def execute(self, ctx):
        target_view = ctx.target_view()
        # Do something with the target view
        print("Sample collection size", len(target_view))

Args:
    ctx: the operator's :class:`fiftyone.operators.ExecutionContext`
    name(view_target): the name of the view target property
    view_type (RadioGroup): the view type to use (RadioGroup, Dropdown,
        etc.)
    default_target (None): the default target view to select if
        multiple choices are available. If ``None`` or
        ``default_target`` is not an available choice, the most
        targeted / selective available choice is chosen.
    action_description (Process): a short description of the action
        being performed, used to generate default descriptions for the
        various target views
    allow_selected_samples (True): whether to allow the "selected
        samples" target view
    allow_selected_labels (False): whether to allow the "selected
        labels" target view
    allow_dataset_view (False): whether to allow the "dataset view"
        target view
    base_view_label (Base view): the label for the "base view" target
        view
    base_view_description (None): the description for the "base view"
        target view. If ``None``, a default description is generated
    current_view_label (Current view): the label for the "current
        view" target view
    current_view_description (None): the description for the "current
        view" target view. If ``None``, a default description is
        generated
    dataset_label (Dataset): the label for the "entire dataset"
        target view
    dataset_description (None): the description for the "entire
        dataset" target view. If ``None``, a default description is
        generated
    dataset_view_label (Dataset): the label for the "dataset view"
        target view
    dataset_view_description (None): the description for the "dataset
        view" target view. If ``None``, a default description is
        generated
    selected_samples_label (Current selection): the label for the
        "selected samples" target view
    selected_samples_description (None): the description for the
        "selected samples" target view. If ``None``, a default
        description is generated
    selected_labels_label (Selected labels): the label for the
        "selected labels" target view
    selected_labels_description (None): the description for the
        "selected labels" target view. If ``None``, a default
        description is generated
    require_flat (False): whether the operation requires a
        flattened (non-grouped) collection

Returns:
    a :class:`ViewTargetProperty`
```

#### to_json()

Converts the object definition to JSON.

* **Returns:**
  a JSON dict

### *class* fiftyone.operators.types.Property(type, \*\*kwargs)

Bases: [`BaseType`](#fiftyone.operators.types.BaseType)

Represents a property on an [`fiftyone.operators.Operator`](fiftyone.operators.md#fiftyone.operators.Operator).

Properties are used to define the data that an operator can accept as input
and return as output.

Properties may also define a [`View`](#fiftyone.operators.types.View) that can be used to customize
how the property behaves in the FiftyOne App.

Examples:

```default
import fiftyone.operators.types as types

my_object = types.Object()

# Define a string property
my_object.str("name", label="Name", description="a description")

# Define an enum property with a custom view
radio_group = types.RadioGroup()
radio_group.add_choice("car", "A brand new car")
radio_group.add_choice("truck", "A fancy truck")
my_object.enum("type", radio_group.values(), view=radio_group)
```

* **Parameters:**
  * **type** – the type of the property
  * **invalid** (*False*) – whether the property is invalid
  * **default** (*None*) – the default value of the property
  * **required** (*False*) – whether the property is required
  * **error_message** ( *"Invalid"*) – the error message of the property
  * **view** (*None*) – the [`View`](#fiftyone.operators.types.View) of the property

**Methods:**

| [`to_json`](#fiftyone.operators.types.Property.to_json)()   |    |
|-------------------------------------------------------------|----|

#### to_json()

### *class* fiftyone.operators.types.ResolvableProperty(resolver: str, \*\*kwargs)

Bases: [`BaseType`](#fiftyone.operators.types.BaseType)

Represents a resolvable property.

* **Parameters:**
  * **resolver** (*str*) – operator to resolve the schema for this property
  * **debounce** (*None*) – whether to debounce the resolver
  * **throttle** (*None*) – whether to throttle the resolver
  * **wait** (*None*) – wait time in milliseconds for when debounce or throttle is True
  * **auto_update** (*True*) – whether to auto-update the property when dependencies change
  * **dependencies** ([*list*](fiftyone.core.session.events.md#fiftyone.core.session.events.Colorscale.list)) – list of property names that this property depends on
  * **params** (*dict*) – parameters to pass to the resolver
  * **validate** (*False*) – whether the property should be validated. If True, the operator
    will not be allowed to execute until this property is resolved and validated.
  * **leading** (*False*) – whether to invoke the resolver on the leading edge when
    debouncing or throttling is enabled.
  * **trailing** (*True*) – whether to invoke the resolver on the trailing edge when
    debouncing or throttling is enabled.

**Methods:**

| [`to_json`](#fiftyone.operators.types.ResolvableProperty.to_json)()   |    |
|-----------------------------------------------------------------------|----|

#### to_json()

### *class* fiftyone.operators.types.String(allow_empty=False)

Bases: [`BaseType`](#fiftyone.operators.types.BaseType)

Represents a string.

* **Parameters:**
  **allow_empty** (*False*) – allow an empty string value

**Methods:**

| [`to_json`](#fiftyone.operators.types.String.to_json)()   |    |
|-----------------------------------------------------------|----|

#### to_json()

### *class* fiftyone.operators.types.Boolean

Bases: [`BaseType`](#fiftyone.operators.types.BaseType)

Represents a boolean.

**Methods:**

| [`to_json`](#fiftyone.operators.types.Boolean.to_json)()   |    |
|------------------------------------------------------------|----|

#### to_json()

### *class* fiftyone.operators.types.Number(min=None, max=None, int=False, float=False)

Bases: [`BaseType`](#fiftyone.operators.types.BaseType)

Represents a number.

* **Parameters:**
  * **min** (*None*) – the minimum value of the [`Number`](#fiftyone.operators.types.Number)
  * **max** (*None*) – the maximum value of the [`Number`](#fiftyone.operators.types.Number)
  * **int** (*False*) – whether the number is an integer
  * **float** (*False*) – whether the number is a float

**Methods:**

| [`to_json`](#fiftyone.operators.types.Number.to_json)()   |    |
|-----------------------------------------------------------|----|

#### to_json()

### *class* fiftyone.operators.types.List(element_type, min_items=None, max_items=None)

Bases: [`BaseType`](#fiftyone.operators.types.BaseType)

Represents a list.

* **Parameters:**
  * **element_type** – the type of the elements in the list
  * **min_items** (*None*) – the minimum number of items in the list
  * **max_items** (*None*) – the maximum number of items in the list

**Methods:**

| [`to_json`](#fiftyone.operators.types.List.to_json)()   |    |
|---------------------------------------------------------|----|

#### to_json()

### *class* fiftyone.operators.types.SampleID

Bases: [`String`](#fiftyone.operators.types.String)

Represents a `fiftyone.core.samples.Sample` ID.

**Methods:**

| [`to_json`](#fiftyone.operators.types.SampleID.to_json)()   |    |
|-------------------------------------------------------------|----|

#### to_json()

### *class* fiftyone.operators.types.Enum(values)

Bases: [`BaseType`](#fiftyone.operators.types.BaseType)

Represents an enum.

* **Parameters:**
  **values** – the values of the enum

**Methods:**

| [`to_json`](#fiftyone.operators.types.Enum.to_json)()   |    |
|---------------------------------------------------------|----|

#### to_json()

### *class* fiftyone.operators.types.OneOf(types)

Bases: [`BaseType`](#fiftyone.operators.types.BaseType)

Represents a one-of type.

Examples:

```default
import fiftyone.operators.types as types

my_object = types.Object()
my_object.define_property(
    "my_property",
    types.OneOf([types.String(), types.Number()],
)
```

* **Parameters:**
  **types** – the possible types

**Methods:**

| [`to_json`](#fiftyone.operators.types.OneOf.to_json)()   |    |
|----------------------------------------------------------|----|

#### to_json()

### *class* fiftyone.operators.types.Tuple(\*items)

Bases: [`BaseType`](#fiftyone.operators.types.BaseType)

Represents a tuple of types.

Examples:

```default
import fiftyone.operators.types as types

inputs = types.Object()
inputs.define_property(
    "image", types.Tuple(types.String(), types.Number())
)
```

* **Parameters:**
  **\*items** – the types

**Methods:**

| [`to_json`](#fiftyone.operators.types.Tuple.to_json)()   |    |
|----------------------------------------------------------|----|

#### to_json()

### *class* fiftyone.operators.types.Tree(\*items)

Bases: [`BaseType`](#fiftyone.operators.types.BaseType)

Represents a tree selection type.

Examples:

```default
import fiftyone.operators.types as types
inputs = types.Object()
```

* **Parameters:**
  **\*items** – the tree structure of items

**Methods:**

| [`to_json`](#fiftyone.operators.types.Tree.to_json)()   |    |
|---------------------------------------------------------|----|

#### to_json()

### *class* fiftyone.operators.types.Map(key_type, value_type)

Bases: [`BaseType`](#fiftyone.operators.types.BaseType)

Represents a map.

Examples:

```default
import fiftyone.operators.types as types

inputs = types.Object()
inputs.define_property(
    "image", types.Map(types.String(), types.Number())
)
```

* **Parameters:**
  * **key_type** – the type of the keys in the [`Map`](#fiftyone.operators.types.Map)
  * **value_type** – the type of the values in the [`Map`](#fiftyone.operators.types.Map)

**Methods:**

| [`to_json`](#fiftyone.operators.types.Map.to_json)()   |    |
|--------------------------------------------------------|----|

#### to_json()

### *class* fiftyone.operators.types.File(\*\*kwargs)

Bases: [`Object`](#fiftyone.operators.types.Object)

Represents a file and related metadata for use with
[`FileExplorerView`](#fiftyone.operators.types.FileExplorerView).

**Methods:**

| [`add_property`](#fiftyone.operators.types.File.add_property)(name, property)                | Adds a property to the object.                                                                            |
|----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------|
| [`arrow_nav`](#fiftyone.operators.types.File.arrow_nav)(name[, forward, backward, position]) | Defines a floating navigation arrows as a [`ArrowNavView`](#fiftyone.operators.types.ArrowNavView).       |
| [`bool`](#fiftyone.operators.types.File.bool)(name, \*\*kwargs)                              | Defines a property on the object that is a boolean.                                                       |
| [`btn`](#fiftyone.operators.types.File.btn)(name, label[, icon, variant, disabled, ...])     | Defines a button or icon button to display to the user as a [`Button`](#fiftyone.operators.types.Button). |
| [`btn_group`](#fiftyone.operators.types.File.btn_group)(name, \*\*kwargs)                    | Defines a button group object.                                                                            |
| [`clone`](#fiftyone.operators.types.File.clone)()                                            | Clones the definition of the object.                                                                      |
| [`dashboard`](#fiftyone.operators.types.File.dashboard)(name, \*\*kwargs)                    | Defines a dashboard view as a [`View`](#fiftyone.operators.types.View).                                   |
| [`define_property`](#fiftyone.operators.types.File.define_property)(name, type, \*\*kwargs)  | Defines a property on the object.                                                                         |
| [`enum`](#fiftyone.operators.types.File.enum)(name, values, \*\*kwargs)                      | Defines a property on the object that is an enum.                                                         |
| [`file`](#fiftyone.operators.types.File.file)(name, \*\*kwargs)                              | Defines a property on the object that is a file.                                                          |
| [`float`](#fiftyone.operators.types.File.float)(name[, min, max])                            | Defines a property on the object that is a float.                                                         |
| [`get_property`](#fiftyone.operators.types.File.get_property)(name)                          | Gets a property by name.                                                                                  |
| [`grid`](#fiftyone.operators.types.File.grid)(name, \*\*kwargs)                              | Defines a grid view as a [`View`](#fiftyone.operators.types.View).                                        |
| [`h_stack`](#fiftyone.operators.types.File.h_stack)(name, \*\*kwargs)                        | Defines a horizontal stack object.                                                                        |
| [`img`](#fiftyone.operators.types.File.img)(name[, href, on_click, prompt, params, ...])     | Defines an image to display to the user as a [`ImageView`](#fiftyone.operators.types.ImageView).          |
| [`int`](#fiftyone.operators.types.File.int)(name[, min, max])                                | Defines a property on the object that is an integer.                                                      |
| [`list`](#fiftyone.operators.types.File.list)(name, element_type[, min_items, max_items])    | Defines a property on the object that is a list.                                                          |
| [`loader`](#fiftyone.operators.types.File.loader)(name, type, operator[, params, ...])       | Defines a loader property that fetches data asynchronously.                                               |
| [`map`](#fiftyone.operators.types.File.map)(name, key_type, value_type, \*\*kwargs)          | Defines a map property on the object.                                                                     |
| [`md`](#fiftyone.operators.types.File.md)(markdown[, name])                                  | Defines a markdown object.                                                                                |
| [`media_player`](#fiftyone.operators.types.File.media_player)(name, url, \*\*kwargs)         | Defines a media player object.                                                                            |
| [`menu`](#fiftyone.operators.types.File.menu)(name, \*\*kwargs)                              | Defined an [`Object`](#fiftyone.operators.types.Object) property that is displayed as a menu.             |
| [`message`](#fiftyone.operators.types.File.message)(name, label, \*\*kwargs)                 | Defines a message to display to the user as a [`Notice`](#fiftyone.operators.types.Notice).               |
| [`obj`](#fiftyone.operators.types.File.obj)(name, \*\*kwargs)                                | Defines a property on the object that is an object.                                                       |
| [`oneof`](#fiftyone.operators.types.File.oneof)(name, types, \*\*kwargs)                     | Defines a one-of property on the object.                                                                  |
| [`plot`](#fiftyone.operators.types.File.plot)(name, \*\*kwargs)                              | Defines an object property displayed as a plot.                                                           |
| [`str`](#fiftyone.operators.types.File.str)(name[, allow_empty])                             | Defines a property on the object that is a string.                                                        |
| [`target_view`](#fiftyone.operators.types.File.target_view)(ctx[, name, view_type, ...])     | Defines a view target input property.                                                                     |
| [`to_json`](#fiftyone.operators.types.File.to_json)()                                        | Converts the object definition to JSON.                                                                   |
| [`tree`](#fiftyone.operators.types.File.tree)(name, \*\*kwargs)                              | Defines a tree property on the object.                                                                    |
| [`tuple`](#fiftyone.operators.types.File.tuple)(name, \*items, \*\*kwargs)                   | Defines a tuple property on the object.                                                                   |
| [`uploaded_file`](#fiftyone.operators.types.File.uploaded_file)(name, \*\*kwargs)            | Defines a property on the object that is an uploaded file.                                                |
| [`v_stack`](#fiftyone.operators.types.File.v_stack)(name, \*\*kwargs)                        | Defines a vertical stack object.                                                                          |
| [`view`](#fiftyone.operators.types.File.view)(name, view, \*\*kwargs)                        | Defines a view-only property.                                                                             |
| [`view_target`](#fiftyone.operators.types.File.view_target)(ctx[, name, view_type, ...])     | Defines a view target input property.                                                                     |

#### add_property(name, property)

Adds a property to the object.

* **Parameters:**
  * **name** – the name of the property
  * **property** – the property to add
* **Returns:**
  the [`Property`](#fiftyone.operators.types.Property) that was added

#### arrow_nav(name, forward=None, backward=None, position=None, \*\*kwargs)

Defines a floating navigation arrows as a [`ArrowNavView`](#fiftyone.operators.types.ArrowNavView).

* **Parameters:**
  * **forward** (*True*) – Whether to display the forward arrow
  * **backward** (*True*) – Whether to display the backward arrow
  * **on_forward** (*None*) – The operator to execute when the forward arrow is clicked
  * **on_backward** (*None*) – The operator to execute when the backward arrow is clicked
  * **position** ( *"center"*) – The position of the arrows. Can be either `"top"`, `center`,
    `"bottom"`, `"left"`, `middle` (center horizontally), or ``"right"`
* **Returns:**
  a [`Property`](#fiftyone.operators.types.Property)

#### bool(name, \*\*kwargs)

Defines a property on the object that is a boolean.

* **Parameters:**
  * **name** – the name of the property
  * **label** (*None*) – the label of the property
  * **description** (*None*) – the description of the property
  * **view** (*None*) – the [`View`](#fiftyone.operators.types.View) of the property
* **Returns:**
  a [`Property`](#fiftyone.operators.types.Property)

#### btn(name, label, icon=None, variant=None, disabled=False, on_click=None, prompt=False, params=None, space=None, href=None, icon_position='left', \*\*kwargs)

Defines a button or icon button to display to the user as a [`Button`](#fiftyone.operators.types.Button).

Examples:

```default
import fiftyone.operators.types as types

inputs = types.Object()
inputs.btn(
    "greet",
    label="Say Hi!",
    icon="waving_hand",
    variant="round",
    on_click="print_stdout",
    params={"msg": "Hi!"},
)
```

* **Parameters:**
  * **name** – the name of the property
  * **label** – the label of the button
  * **icon** (*None*) – the name of the icon to display
  * **icon_position** ( *"left"*) – the position of the icon. Can be `"left"` or `"right"`
  * **disabled** (*False*) – whether the button is disabled
  * **variant** (*None*) – the variant of the button. Can be `"contained"`, `"outlined"`,
    `"round"` or `"square"`
  * **on_click** (*None*) – the name of the operator to execute when the button is clicked
  * **prompt** (*False*) – whether to prompt the user before executing the operator
  * **params** (*None*) – the parameters to pass to the operator
  * **space** (*None*) – An int specifying how much vertical/horizontal space to allocate out
    of `12` depending on the orientation of the parent container
  * **href** (*None*) – the URL to navigate to when the button is clicked

#### btn_group(name, \*\*kwargs)

Defines a button group object.

* **Parameters:**
  **name** – the name of the property
* **Returns:**
  a [`Object`](#fiftyone.operators.types.Object)

#### clone()

Clones the definition of the object.

* **Parameters:**
  **name** – the name of the property
* **Returns:**
  an [`Object`](#fiftyone.operators.types.Object)

#### dashboard(name, \*\*kwargs)

Defines a dashboard view as a [`View`](#fiftyone.operators.types.View).

See [`DashboardView`](#fiftyone.operators.types.DashboardView) for more information.

* **Parameters:**
  **name** – the name of the property
* **Returns:**
  an [`Object`](#fiftyone.operators.types.Object)

See [`DashboardView`](#fiftyone.operators.types.DashboardView) for more information.

#### define_property(name, type, \*\*kwargs)

Defines a property on the object.

* **Parameters:**
  * **name** – the name of the property
  * **type** – the type of the property
  * **label** (*None*) – the label of the property
  * **description** (*None*) – the description of the property
  * **view** (*None*) – the [`View`](#fiftyone.operators.types.View) of the property
* **Returns:**
  the [`Property`](#fiftyone.operators.types.Property) that was added

#### enum(name, values, \*\*kwargs)

Defines a property on the object that is an enum.

* **Parameters:**
  * **name** – the name of the property
  * **values** – a list of values that define the enum
  * **label** (*None*) – the label of the property
  * **description** (*None*) – the description of the property
  * **view** (*None*) – the [`View`](#fiftyone.operators.types.View) of the property, which must be a
    [`Choices`](#fiftyone.operators.types.Choices) or a subclass of it
* **Returns:**
  a [`Property`](#fiftyone.operators.types.Property)

#### file(name, \*\*kwargs)

Defines a property on the object that is a file.

* **Parameters:**
  * **name** – the name of the property
  * **view** (*None*) – the [`View`](#fiftyone.operators.types.View) of the property

#### float(name, min=None, max=None, \*\*kwargs)

Defines a property on the object that is a float.

* **Parameters:**
  * **name** – the name of the property
  * **min** – minimum value of the property
  * **max** – maximum value of the property
  * **label** (*None*) – the label of the property
  * **description** (*None*) – the description of the property
  * **view** (*None*) – the [`View`](#fiftyone.operators.types.View) of the property
* **Returns:**
  a [`Property`](#fiftyone.operators.types.Property)

#### get_property(name)

Gets a property by name.

* **Parameters:**
  **name** – the name of the property
* **Returns:**
  the [`Property`](#fiftyone.operators.types.Property), or None

#### grid(name, \*\*kwargs)

Defines a grid view as a [`View`](#fiftyone.operators.types.View).

#### h_stack(name, \*\*kwargs)

Defines a horizontal stack object.

* **Parameters:**
  **name** – the name of the property
* **Returns:**
  a [`Object`](#fiftyone.operators.types.Object)

#### img(name, href=None, on_click=None, prompt=False, params=None, point_on_hover=True, height=None, width=None, alt_text=None, \*\*kwargs)

Defines an image to display to the user as a [`ImageView`](#fiftyone.operators.types.ImageView).

Examples:

```default
import fiftyone.operators.types as types
ctx.panel.state.my_img = "/path/to/my/image.jpg"

panel = types.Object()
panel.img(
    "my_img", # uses the value in ctx.panel.state.my_img
    href="https://path/to/navigate/to",
    on_click=self.do_something,
    prompt=False,
    params={"foo": "bar"},
    point_on_hover=True,
    height="100px",
    width="100px",
    alt_text="My image alt text"
)
```

* **Parameters:**
  * **name** – the name of the state variable to use as the image source
  * **href** (*None*) – the url to navigate to when the image is clicked
  * **on_click** (*None*) – the name of the operator to execute when the button is clicked
  * **prompt** (*False*) – whether to prompt the user before executing the operator
  * **params** (*None*) – the parameters to pass to the operator
  * **point_on_hover** (*True*) – whether to show a pointer when hovering over the image
  * **height** (*None*) – the height of the image
  * **width** (*None*) – the width of the image
  * **alt_text** (*None*) – the alt text of the image

#### int(name, min=None, max=None, \*\*kwargs)

Defines a property on the object that is an integer.

* **Parameters:**
  * **name** – the name of the property
  * **min** – minimum value of the property
  * **max** – maximum value of the property
  * **label** (*None*) – the label of the property
  * **description** (*None*) – the description of the property
  * **view** (*None*) – the [`View`](#fiftyone.operators.types.View) of the property
* **Returns:**
  a [`Property`](#fiftyone.operators.types.Property)

#### list(name, element_type, min_items=None, max_items=None, \*\*kwargs)

Defines a property on the object that is a list.

* **Parameters:**
  * **name** – the name of the property
  * **element_type** – the type of the elements in the list
  * **label** (*None*) – the label of the property
  * **description** (*None*) – the description of the property
  * **view** (*None*) – the [`View`](#fiftyone.operators.types.View) of the property
* **Returns:**
  a [`Property`](#fiftyone.operators.types.Property)

#### loader(name, type, operator, params=None, label=None, placeholder_view=None, dependencies=None, \*\*kwargs)

Defines a loader property that fetches data asynchronously.

The loader executes an operator and stores the result at the property
path. The property value always has the following structure:

```default
{
    "state": "idle" | "loading" | "loaded" | "errored",
    "data": <type>,  # the loaded data, shaped by the type argument
    "error": <str>   # error message (when state is "errored")
}
```

The `type` argument defines the shape of the `data` field, not the
entire loader value. For example, if `type=types.List(types.Object())`,
then `ctx.params[name]["data"]` will be a list of objects.

By default, the loader executes only once when the component mounts.
Use the `dependencies` argument to specify which param paths should
trigger a reload when their values change.

Examples:

```default
def resolve_input(self, ctx):
    inputs = types.Object()

    inputs.str("make", label="Car Make")

    chosen_make = ctx.params.get("make")
    if chosen_make:
        inputs.loader(
            "available_models",
            type=types.List(types.Object()),
            operator="@my-plugin/load_models",
            params={"make": chosen_make},
            label="Loading models...",
            dependencies=["make"],  # reload when "make" changes
        )

    models = ctx.params.get("available_models", {})
    if models.get("state") == "loaded":
        choices = Choices()
        for model in models.get("data", []):
            choices.add_choice(model["id"], label=model["name"])
        inputs.enum("model", values=choices)

    return types.Property(inputs)
```

* **Parameters:**
  * **name** – the name of the property
  * **type** – the type of the `data` field within the loader value
    (e.g., `types.Object()`, `types.List(types.Object())`)
  * **operator** – the operator to execute (string URI or callable method)
  * **params** (*None*) – parameters to pass to the operator
  * **label** (*None*) – loading message to display
  * **placeholder_view** (*None*) – view to render while loading
  * **dependencies** (*None*) – list of param paths (dot-notation supported)
    that should trigger a reload when changed. If None, the loader
    only executes once on mount
* **Returns:**
  a [`Property`](#fiftyone.operators.types.Property)

#### map(name, key_type, value_type, \*\*kwargs)

Defines a map property on the object.

* **Parameters:**
  * **name** – the name of the property
  * **key_type** – the type of the keys in the map
  * **value_type** – the type of the values in the map
* **Returns:**
  a [`Map`](#fiftyone.operators.types.Map)

#### md(markdown, name='markdown', \*\*kwargs)

Defines a markdown object.

* **Parameters:**
  * **markdown** – the markdown to display
  * **name** – the name of the property

#### media_player(name, url, \*\*kwargs)

Defines a media player object.

* **Parameters:**
  * **name** – the name of the property
  * **url** – the URL of the media to display
  * **on_start** (*None*) – the operator to execute when the media starts
  * **on_play** (*None*) – the operator to execute when the media is played
  * **on_pause** (*None*) – the operator to execute when the media is paused
  * **on_buffer** (*None*) – the operator to execute when the media is buffering
  * **on_buffer_end** (*None*) – the operator to execute when the media stops buffering
  * **on_ended** (*None*) – the operator to execute when the media ends
  * **on_error** (*None*) – the operator to execute when the media errors
  * **on_duration** (*None*) – the operator to execute when the media duration is loaded
  * **on_seek** (*None*) – the operator to execute when the media is seeked
  * **on_progress** (*None*) – the operator to execute when the media progresses
* **Returns:**
  a [`Object`](#fiftyone.operators.types.Object)

#### menu(name, \*\*kwargs)

Defined an [`Object`](#fiftyone.operators.types.Object) property that is displayed as a menu.

#### NOTE
Can be used for an [`Button`](#fiftyone.operators.types.Button) type with properties whose views are one of
[`Button`](#fiftyone.operators.types.Button), [`Dropdown`](#fiftyone.operators.types.Dropdown), [`DropdownView`](#fiftyone.operators.types.DropdownView), and :class;\`Choices\`. The variant
and color of the items can be set using the `variant` and `color` parameters.

* **Parameters:**
  * **name** – the name of the property
  * **variant** (*None*) – the variant for the items of the menu. Can be `"contained"`,
    `"outlined"`, `"round"` or `"square"`
  * **color** (*None*) – the color for the items of the menu.
  * **overlay** (*None*) – whether to display the menu as an overlay. Can be `"top-left"`,
  * **"top-center"**
  * **"top-right"**
  * **"bottom-left"**
  * **"bottom-center"\`**
  * **or**
  * **of** ( *"bottom-right". Overlay is useful when you want to display a floating menu on top*)
  * **content** (*another*)
  * **icon** (*None*) – when set, the icon will be displayed as the menu button instead of the label.
  * **"SettingsIcon"** (*Can be*)
  * **"MoreVertIcon".**
* **Returns:**
  a [`Object`](#fiftyone.operators.types.Object)

#### message(name, label, \*\*kwargs)

Defines a message to display to the user as a [`Notice`](#fiftyone.operators.types.Notice).

* **Parameters:**
  * **name** – the name of the property
  * **label** – the label of the notice
  * **description** (*None*) – the description of the notice
  * **view** (*None*) – the [`View`](#fiftyone.operators.types.View) of the notice
* **Returns:**
  a [`Property`](#fiftyone.operators.types.Property)

#### obj(name, \*\*kwargs)

Defines a property on the object that is an object.

* **Parameters:**
  * **name** – the name of the property
  * **label** (*None*) – the label of the property
  * **description** (*None*) – the description of the property
  * **view** (*None*) – the [`View`](#fiftyone.operators.types.View) of the property
* **Returns:**
  a [`Property`](#fiftyone.operators.types.Property)

#### oneof(name, types, \*\*kwargs)

Defines a one-of property on the object.

* **Parameters:**
  * **name** – the name of the property
  * **types** – list of types that are instances of [`BaseType`](#fiftyone.operators.types.BaseType)
* **Returns:**
  a [`OneOf`](#fiftyone.operators.types.OneOf)

#### plot(name, \*\*kwargs)

Defines an object property displayed as a plot.

* **Parameters:**
  * **name** – the name of the property
  * **config** (*None*) – the chart config
  * **layout** (*None*) – the chart layout

See [`PlotlyView`](#fiftyone.operators.types.PlotlyView) for more information.

#### str(name, allow_empty=False, \*\*kwargs)

Defines a property on the object that is a string.

* **Parameters:**
  * **name** – the name of the property
  * **label** (*None*) – the label of the property
  * **description** (*None*) – the description of the property
  * **view** (*None*) – the [`View`](#fiftyone.operators.types.View) of the property
* **Returns:**
  a [`Property`](#fiftyone.operators.types.Property)

#### target_view(ctx, name='view_target', view_type=None, action_description='Process', default_target=None, allow_selected_samples=True, allow_selected_labels=False, allow_dataset_view=False, base_view_label='Base view', base_view_description=None, current_view_label='Current view', current_view_description=None, dataset_label='Dataset', dataset_description=None, dataset_view_label='Dataset', dataset_view_description=None, selected_samples_label='Current selection', selected_samples_description=None, selected_labels_label='Selected labels', selected_labels_description=None, require_flat=False, \*\*kwargs)

Defines a view target input property.

This property has an enum input that allows the user to select which view
to process. The available choices depend on the current context and the
provided flags.

The choices include:

- Dataset (if the current view is not a generated view)
- Base view (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)), which 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")`
- Dataset view (if `allow_dataset_view` is `True`)
- Current view (if the current view is different from the dataset view)
- Current selection (if `allow_selected_samples` is `True` and there are
  selected samples)
- Selected labels (if `allow_selected_labels` is `True` and there are
  selected labels)

If there’s no view or selected items, the only option is entire dataset,
so the view target selector is hidden and “DATASET” will be returned.

The resolved target view can be accessed in the operator’s
[`execute()`](fiftyone.operators.md#fiftyone.operators.Operator.execute) method
via [`ctx.target_view()`](fiftyone.operators.md#fiftyone.operators.ExecutionContext.target_view).

The target view descriptions are generated based on the provided
`action_description` and the various description parameters. If a
description parameter is not `None`, it will be used as the
description for the corresponding target view choice. Otherwise, a
default description will be generated such as
`f"{action_description} the base view"`.

Examples:

```default
import fiftyone.operators as foo

class MyTargetViewOperator(foo.Operator):
    @property
    def config(self):
        return foo.OperatorConfig(
            name="target_view_operator",
            label="Testing Target View Operator",
            dynamic=True,
        )

    def resolve_input(self, ctx):
        inputs = types.Object()

        view_target_prop = inputs.view_target(ctx)

        return types.Property(
            inputs, view=types.View(label="Target View Operator")
        )

    def execute(self, ctx):
        target_view = ctx.target_view()
        # Do something with the target view
        print("Sample collection size", len(target_view))

Args:
    ctx: the operator's :class:`fiftyone.operators.ExecutionContext`
    name(view_target): the name of the view target property
    view_type (RadioGroup): the view type to use (RadioGroup, Dropdown,
        etc.)
    default_target (None): the default target view to select if
        multiple choices are available. If ``None`` or
        ``default_target`` is not an available choice, the most
        targeted / selective available choice is chosen.
    action_description (Process): a short description of the action
        being performed, used to generate default descriptions for the
        various target views
    allow_selected_samples (True): whether to allow the "selected
        samples" target view
    allow_selected_labels (False): whether to allow the "selected
        labels" target view
    allow_dataset_view (False): whether to allow the "dataset view"
        target view
    base_view_label (Base view): the label for the "base view" target
        view
    base_view_description (None): the description for the "base view"
        target view. If ``None``, a default description is generated
    current_view_label (Current view): the label for the "current
        view" target view
    current_view_description (None): the description for the "current
        view" target view. If ``None``, a default description is
        generated
    dataset_label (Dataset): the label for the "entire dataset"
        target view
    dataset_description (None): the description for the "entire
        dataset" target view. If ``None``, a default description is
        generated
    dataset_view_label (Dataset): the label for the "dataset view"
        target view
    dataset_view_description (None): the description for the "dataset
        view" target view. If ``None``, a default description is
        generated
    selected_samples_label (Current selection): the label for the
        "selected samples" target view
    selected_samples_description (None): the description for the
        "selected samples" target view. If ``None``, a default
        description is generated
    selected_labels_label (Selected labels): the label for the
        "selected labels" target view
    selected_labels_description (None): the description for the
        "selected labels" target view. If ``None``, a default
        description is generated
    require_flat (False): whether the operation requires a
        flattened (non-grouped) collection

Returns:
    a :class:`ViewTargetProperty`
```

#### to_json()

Converts the object definition to JSON.

* **Returns:**
  a JSON dict

#### tree(name, \*\*kwargs)

Defines a tree property on the object.

* **Parameters:**
  **name** – the name of the property
* **Returns:**
  a [`Tree`](#fiftyone.operators.types.Tree)

#### tuple(name, \*items, \*\*kwargs)

Defines a tuple property on the object.

* **Parameters:**
  * **name** – the name of the property
  * **\*items** – the types of the items in the tuple
* **Returns:**
  a [`Tuple`](#fiftyone.operators.types.Tuple)

#### uploaded_file(name, \*\*kwargs)

Defines a property on the object that is an uploaded file.

* **Parameters:**
  * **name** – the name of the property
  * **view** (*None*) – the [`View`](#fiftyone.operators.types.View) of the property
  * **lite** (*False*) – whether to use the lite version of the file. When True, the content of the
    file in not included in resolve_input params, only the metadata is included.

#### v_stack(name, \*\*kwargs)

Defines a vertical stack object.

* **Parameters:**
  **name** – the name of the property
* **Returns:**
  a [`Object`](#fiftyone.operators.types.Object)

#### view(name, view, \*\*kwargs)

Defines a view-only property.

Examples:

```default
import fiftyone.operators.types as types

notice = types.Notice(label="a label", description="a description")
inputs = types.Object()
inputs.view("notice", notice)
```

* **Parameters:**
  * **name** – the name of the property
  * **view** – the [`View`](#fiftyone.operators.types.View) to define
* **Returns:**
  a [`Property`](#fiftyone.operators.types.Property)

#### view_target(ctx, name='view_target', view_type=None, action_description='Process', default_target=None, allow_selected_samples=True, allow_selected_labels=False, allow_dataset_view=False, base_view_label='Base view', base_view_description=None, current_view_label='Current view', current_view_description=None, dataset_label='Dataset', dataset_description=None, dataset_view_label='Dataset', dataset_view_description=None, selected_samples_label='Current selection', selected_samples_description=None, selected_labels_label='Selected labels', selected_labels_description=None, require_flat=False, \*\*kwargs)

Defines a view target input property.

This property has an enum input that allows the user to select which view
to process. The available choices depend on the current context and the
provided flags.

The choices include:

- Dataset (if the current view is not a generated view)
- Base view (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)), which 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")`
- Dataset view (if `allow_dataset_view` is `True`)
- Current view (if the current view is different from the dataset view)
- Current selection (if `allow_selected_samples` is `True` and there are
  selected samples)
- Selected labels (if `allow_selected_labels` is `True` and there are
  selected labels)

If there’s no view or selected items, the only option is entire dataset,
so the view target selector is hidden and “DATASET” will be returned.

The resolved target view can be accessed in the operator’s
[`execute()`](fiftyone.operators.md#fiftyone.operators.Operator.execute) method
via [`ctx.target_view()`](fiftyone.operators.md#fiftyone.operators.ExecutionContext.target_view).

The target view descriptions are generated based on the provided
`action_description` and the various description parameters. If a
description parameter is not `None`, it will be used as the
description for the corresponding target view choice. Otherwise, a
default description will be generated such as
`f"{action_description} the base view"`.

Examples:

```default
import fiftyone.operators as foo

class MyTargetViewOperator(foo.Operator):
    @property
    def config(self):
        return foo.OperatorConfig(
            name="target_view_operator",
            label="Testing Target View Operator",
            dynamic=True,
        )

    def resolve_input(self, ctx):
        inputs = types.Object()

        view_target_prop = inputs.view_target(ctx)

        return types.Property(
            inputs, view=types.View(label="Target View Operator")
        )

    def execute(self, ctx):
        target_view = ctx.target_view()
        # Do something with the target view
        print("Sample collection size", len(target_view))

Args:
    ctx: the operator's :class:`fiftyone.operators.ExecutionContext`
    name(view_target): the name of the view target property
    view_type (RadioGroup): the view type to use (RadioGroup, Dropdown,
        etc.)
    default_target (None): the default target view to select if
        multiple choices are available. If ``None`` or
        ``default_target`` is not an available choice, the most
        targeted / selective available choice is chosen.
    action_description (Process): a short description of the action
        being performed, used to generate default descriptions for the
        various target views
    allow_selected_samples (True): whether to allow the "selected
        samples" target view
    allow_selected_labels (False): whether to allow the "selected
        labels" target view
    allow_dataset_view (False): whether to allow the "dataset view"
        target view
    base_view_label (Base view): the label for the "base view" target
        view
    base_view_description (None): the description for the "base view"
        target view. If ``None``, a default description is generated
    current_view_label (Current view): the label for the "current
        view" target view
    current_view_description (None): the description for the "current
        view" target view. If ``None``, a default description is
        generated
    dataset_label (Dataset): the label for the "entire dataset"
        target view
    dataset_description (None): the description for the "entire
        dataset" target view. If ``None``, a default description is
        generated
    dataset_view_label (Dataset): the label for the "dataset view"
        target view
    dataset_view_description (None): the description for the "dataset
        view" target view. If ``None``, a default description is
        generated
    selected_samples_label (Current selection): the label for the
        "selected samples" target view
    selected_samples_description (None): the description for the
        "selected samples" target view. If ``None``, a default
        description is generated
    selected_labels_label (Selected labels): the label for the
        "selected labels" target view
    selected_labels_description (None): the description for the
        "selected labels" target view. If ``None``, a default
        description is generated
    require_flat (False): whether the operation requires a
        flattened (non-grouped) collection

Returns:
    a :class:`ViewTargetProperty`
```

### *class* fiftyone.operators.types.UploadedFile(\*\*kwargs)

Bases: [`Object`](#fiftyone.operators.types.Object)

Represents an object with uploaded file content and its metadata in
properties.

Properties:
: name: the name of the file
  type: the mime type of the file
  size: the size of the file in bytes
  content: the base64 encoded content of the file
  last_modified: the last modified time of the file in ms since epoch

**Methods:**

| [`add_property`](#fiftyone.operators.types.UploadedFile.add_property)(name, property)                | Adds a property to the object.                                                                            |
|------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------|
| [`arrow_nav`](#fiftyone.operators.types.UploadedFile.arrow_nav)(name[, forward, backward, position]) | Defines a floating navigation arrows as a [`ArrowNavView`](#fiftyone.operators.types.ArrowNavView).       |
| [`bool`](#fiftyone.operators.types.UploadedFile.bool)(name, \*\*kwargs)                              | Defines a property on the object that is a boolean.                                                       |
| [`btn`](#fiftyone.operators.types.UploadedFile.btn)(name, label[, icon, variant, disabled, ...])     | Defines a button or icon button to display to the user as a [`Button`](#fiftyone.operators.types.Button). |
| [`btn_group`](#fiftyone.operators.types.UploadedFile.btn_group)(name, \*\*kwargs)                    | Defines a button group object.                                                                            |
| [`clone`](#fiftyone.operators.types.UploadedFile.clone)()                                            | Clones the definition of the object.                                                                      |
| [`dashboard`](#fiftyone.operators.types.UploadedFile.dashboard)(name, \*\*kwargs)                    | Defines a dashboard view as a [`View`](#fiftyone.operators.types.View).                                   |
| [`define_property`](#fiftyone.operators.types.UploadedFile.define_property)(name, type, \*\*kwargs)  | Defines a property on the object.                                                                         |
| [`enum`](#fiftyone.operators.types.UploadedFile.enum)(name, values, \*\*kwargs)                      | Defines a property on the object that is an enum.                                                         |
| [`file`](#fiftyone.operators.types.UploadedFile.file)(name, \*\*kwargs)                              | Defines a property on the object that is a file.                                                          |
| [`float`](#fiftyone.operators.types.UploadedFile.float)(name[, min, max])                            | Defines a property on the object that is a float.                                                         |
| [`get_property`](#fiftyone.operators.types.UploadedFile.get_property)(name)                          | Gets a property by name.                                                                                  |
| [`grid`](#fiftyone.operators.types.UploadedFile.grid)(name, \*\*kwargs)                              | Defines a grid view as a [`View`](#fiftyone.operators.types.View).                                        |
| [`h_stack`](#fiftyone.operators.types.UploadedFile.h_stack)(name, \*\*kwargs)                        | Defines a horizontal stack object.                                                                        |
| [`img`](#fiftyone.operators.types.UploadedFile.img)(name[, href, on_click, prompt, params, ...])     | Defines an image to display to the user as a [`ImageView`](#fiftyone.operators.types.ImageView).          |
| [`int`](#fiftyone.operators.types.UploadedFile.int)(name[, min, max])                                | Defines a property on the object that is an integer.                                                      |
| [`list`](#fiftyone.operators.types.UploadedFile.list)(name, element_type[, min_items, max_items])    | Defines a property on the object that is a list.                                                          |
| [`loader`](#fiftyone.operators.types.UploadedFile.loader)(name, type, operator[, params, ...])       | Defines a loader property that fetches data asynchronously.                                               |
| [`map`](#fiftyone.operators.types.UploadedFile.map)(name, key_type, value_type, \*\*kwargs)          | Defines a map property on the object.                                                                     |
| [`md`](#fiftyone.operators.types.UploadedFile.md)(markdown[, name])                                  | Defines a markdown object.                                                                                |
| [`media_player`](#fiftyone.operators.types.UploadedFile.media_player)(name, url, \*\*kwargs)         | Defines a media player object.                                                                            |
| [`menu`](#fiftyone.operators.types.UploadedFile.menu)(name, \*\*kwargs)                              | Defined an [`Object`](#fiftyone.operators.types.Object) property that is displayed as a menu.             |
| [`message`](#fiftyone.operators.types.UploadedFile.message)(name, label, \*\*kwargs)                 | Defines a message to display to the user as a [`Notice`](#fiftyone.operators.types.Notice).               |
| [`obj`](#fiftyone.operators.types.UploadedFile.obj)(name, \*\*kwargs)                                | Defines a property on the object that is an object.                                                       |
| [`oneof`](#fiftyone.operators.types.UploadedFile.oneof)(name, types, \*\*kwargs)                     | Defines a one-of property on the object.                                                                  |
| [`plot`](#fiftyone.operators.types.UploadedFile.plot)(name, \*\*kwargs)                              | Defines an object property displayed as a plot.                                                           |
| [`str`](#fiftyone.operators.types.UploadedFile.str)(name[, allow_empty])                             | Defines a property on the object that is a string.                                                        |
| [`target_view`](#fiftyone.operators.types.UploadedFile.target_view)(ctx[, name, view_type, ...])     | Defines a view target input property.                                                                     |
| [`to_json`](#fiftyone.operators.types.UploadedFile.to_json)()                                        | Converts the object definition to JSON.                                                                   |
| [`tree`](#fiftyone.operators.types.UploadedFile.tree)(name, \*\*kwargs)                              | Defines a tree property on the object.                                                                    |
| [`tuple`](#fiftyone.operators.types.UploadedFile.tuple)(name, \*items, \*\*kwargs)                   | Defines a tuple property on the object.                                                                   |
| [`uploaded_file`](#fiftyone.operators.types.UploadedFile.uploaded_file)(name, \*\*kwargs)            | Defines a property on the object that is an uploaded file.                                                |
| [`v_stack`](#fiftyone.operators.types.UploadedFile.v_stack)(name, \*\*kwargs)                        | Defines a vertical stack object.                                                                          |
| [`view`](#fiftyone.operators.types.UploadedFile.view)(name, view, \*\*kwargs)                        | Defines a view-only property.                                                                             |
| [`view_target`](#fiftyone.operators.types.UploadedFile.view_target)(ctx[, name, view_type, ...])     | Defines a view target input property.                                                                     |

#### add_property(name, property)

Adds a property to the object.

* **Parameters:**
  * **name** – the name of the property
  * **property** – the property to add
* **Returns:**
  the [`Property`](#fiftyone.operators.types.Property) that was added

#### arrow_nav(name, forward=None, backward=None, position=None, \*\*kwargs)

Defines a floating navigation arrows as a [`ArrowNavView`](#fiftyone.operators.types.ArrowNavView).

* **Parameters:**
  * **forward** (*True*) – Whether to display the forward arrow
  * **backward** (*True*) – Whether to display the backward arrow
  * **on_forward** (*None*) – The operator to execute when the forward arrow is clicked
  * **on_backward** (*None*) – The operator to execute when the backward arrow is clicked
  * **position** ( *"center"*) – The position of the arrows. Can be either `"top"`, `center`,
    `"bottom"`, `"left"`, `middle` (center horizontally), or ``"right"`
* **Returns:**
  a [`Property`](#fiftyone.operators.types.Property)

#### bool(name, \*\*kwargs)

Defines a property on the object that is a boolean.

* **Parameters:**
  * **name** – the name of the property
  * **label** (*None*) – the label of the property
  * **description** (*None*) – the description of the property
  * **view** (*None*) – the [`View`](#fiftyone.operators.types.View) of the property
* **Returns:**
  a [`Property`](#fiftyone.operators.types.Property)

#### btn(name, label, icon=None, variant=None, disabled=False, on_click=None, prompt=False, params=None, space=None, href=None, icon_position='left', \*\*kwargs)

Defines a button or icon button to display to the user as a [`Button`](#fiftyone.operators.types.Button).

Examples:

```default
import fiftyone.operators.types as types

inputs = types.Object()
inputs.btn(
    "greet",
    label="Say Hi!",
    icon="waving_hand",
    variant="round",
    on_click="print_stdout",
    params={"msg": "Hi!"},
)
```

* **Parameters:**
  * **name** – the name of the property
  * **label** – the label of the button
  * **icon** (*None*) – the name of the icon to display
  * **icon_position** ( *"left"*) – the position of the icon. Can be `"left"` or `"right"`
  * **disabled** (*False*) – whether the button is disabled
  * **variant** (*None*) – the variant of the button. Can be `"contained"`, `"outlined"`,
    `"round"` or `"square"`
  * **on_click** (*None*) – the name of the operator to execute when the button is clicked
  * **prompt** (*False*) – whether to prompt the user before executing the operator
  * **params** (*None*) – the parameters to pass to the operator
  * **space** (*None*) – An int specifying how much vertical/horizontal space to allocate out
    of `12` depending on the orientation of the parent container
  * **href** (*None*) – the URL to navigate to when the button is clicked

#### btn_group(name, \*\*kwargs)

Defines a button group object.

* **Parameters:**
  **name** – the name of the property
* **Returns:**
  a [`Object`](#fiftyone.operators.types.Object)

#### clone()

Clones the definition of the object.

* **Parameters:**
  **name** – the name of the property
* **Returns:**
  an [`Object`](#fiftyone.operators.types.Object)

#### dashboard(name, \*\*kwargs)

Defines a dashboard view as a [`View`](#fiftyone.operators.types.View).

See [`DashboardView`](#fiftyone.operators.types.DashboardView) for more information.

* **Parameters:**
  **name** – the name of the property
* **Returns:**
  an [`Object`](#fiftyone.operators.types.Object)

See [`DashboardView`](#fiftyone.operators.types.DashboardView) for more information.

#### define_property(name, type, \*\*kwargs)

Defines a property on the object.

* **Parameters:**
  * **name** – the name of the property
  * **type** – the type of the property
  * **label** (*None*) – the label of the property
  * **description** (*None*) – the description of the property
  * **view** (*None*) – the [`View`](#fiftyone.operators.types.View) of the property
* **Returns:**
  the [`Property`](#fiftyone.operators.types.Property) that was added

#### enum(name, values, \*\*kwargs)

Defines a property on the object that is an enum.

* **Parameters:**
  * **name** – the name of the property
  * **values** – a list of values that define the enum
  * **label** (*None*) – the label of the property
  * **description** (*None*) – the description of the property
  * **view** (*None*) – the [`View`](#fiftyone.operators.types.View) of the property, which must be a
    [`Choices`](#fiftyone.operators.types.Choices) or a subclass of it
* **Returns:**
  a [`Property`](#fiftyone.operators.types.Property)

#### file(name, \*\*kwargs)

Defines a property on the object that is a file.

* **Parameters:**
  * **name** – the name of the property
  * **view** (*None*) – the [`View`](#fiftyone.operators.types.View) of the property

#### float(name, min=None, max=None, \*\*kwargs)

Defines a property on the object that is a float.

* **Parameters:**
  * **name** – the name of the property
  * **min** – minimum value of the property
  * **max** – maximum value of the property
  * **label** (*None*) – the label of the property
  * **description** (*None*) – the description of the property
  * **view** (*None*) – the [`View`](#fiftyone.operators.types.View) of the property
* **Returns:**
  a [`Property`](#fiftyone.operators.types.Property)

#### get_property(name)

Gets a property by name.

* **Parameters:**
  **name** – the name of the property
* **Returns:**
  the [`Property`](#fiftyone.operators.types.Property), or None

#### grid(name, \*\*kwargs)

Defines a grid view as a [`View`](#fiftyone.operators.types.View).

#### h_stack(name, \*\*kwargs)

Defines a horizontal stack object.

* **Parameters:**
  **name** – the name of the property
* **Returns:**
  a [`Object`](#fiftyone.operators.types.Object)

#### img(name, href=None, on_click=None, prompt=False, params=None, point_on_hover=True, height=None, width=None, alt_text=None, \*\*kwargs)

Defines an image to display to the user as a [`ImageView`](#fiftyone.operators.types.ImageView).

Examples:

```default
import fiftyone.operators.types as types
ctx.panel.state.my_img = "/path/to/my/image.jpg"

panel = types.Object()
panel.img(
    "my_img", # uses the value in ctx.panel.state.my_img
    href="https://path/to/navigate/to",
    on_click=self.do_something,
    prompt=False,
    params={"foo": "bar"},
    point_on_hover=True,
    height="100px",
    width="100px",
    alt_text="My image alt text"
)
```

* **Parameters:**
  * **name** – the name of the state variable to use as the image source
  * **href** (*None*) – the url to navigate to when the image is clicked
  * **on_click** (*None*) – the name of the operator to execute when the button is clicked
  * **prompt** (*False*) – whether to prompt the user before executing the operator
  * **params** (*None*) – the parameters to pass to the operator
  * **point_on_hover** (*True*) – whether to show a pointer when hovering over the image
  * **height** (*None*) – the height of the image
  * **width** (*None*) – the width of the image
  * **alt_text** (*None*) – the alt text of the image

#### int(name, min=None, max=None, \*\*kwargs)

Defines a property on the object that is an integer.

* **Parameters:**
  * **name** – the name of the property
  * **min** – minimum value of the property
  * **max** – maximum value of the property
  * **label** (*None*) – the label of the property
  * **description** (*None*) – the description of the property
  * **view** (*None*) – the [`View`](#fiftyone.operators.types.View) of the property
* **Returns:**
  a [`Property`](#fiftyone.operators.types.Property)

#### list(name, element_type, min_items=None, max_items=None, \*\*kwargs)

Defines a property on the object that is a list.

* **Parameters:**
  * **name** – the name of the property
  * **element_type** – the type of the elements in the list
  * **label** (*None*) – the label of the property
  * **description** (*None*) – the description of the property
  * **view** (*None*) – the [`View`](#fiftyone.operators.types.View) of the property
* **Returns:**
  a [`Property`](#fiftyone.operators.types.Property)

#### loader(name, type, operator, params=None, label=None, placeholder_view=None, dependencies=None, \*\*kwargs)

Defines a loader property that fetches data asynchronously.

The loader executes an operator and stores the result at the property
path. The property value always has the following structure:

```default
{
    "state": "idle" | "loading" | "loaded" | "errored",
    "data": <type>,  # the loaded data, shaped by the type argument
    "error": <str>   # error message (when state is "errored")
}
```

The `type` argument defines the shape of the `data` field, not the
entire loader value. For example, if `type=types.List(types.Object())`,
then `ctx.params[name]["data"]` will be a list of objects.

By default, the loader executes only once when the component mounts.
Use the `dependencies` argument to specify which param paths should
trigger a reload when their values change.

Examples:

```default
def resolve_input(self, ctx):
    inputs = types.Object()

    inputs.str("make", label="Car Make")

    chosen_make = ctx.params.get("make")
    if chosen_make:
        inputs.loader(
            "available_models",
            type=types.List(types.Object()),
            operator="@my-plugin/load_models",
            params={"make": chosen_make},
            label="Loading models...",
            dependencies=["make"],  # reload when "make" changes
        )

    models = ctx.params.get("available_models", {})
    if models.get("state") == "loaded":
        choices = Choices()
        for model in models.get("data", []):
            choices.add_choice(model["id"], label=model["name"])
        inputs.enum("model", values=choices)

    return types.Property(inputs)
```

* **Parameters:**
  * **name** – the name of the property
  * **type** – the type of the `data` field within the loader value
    (e.g., `types.Object()`, `types.List(types.Object())`)
  * **operator** – the operator to execute (string URI or callable method)
  * **params** (*None*) – parameters to pass to the operator
  * **label** (*None*) – loading message to display
  * **placeholder_view** (*None*) – view to render while loading
  * **dependencies** (*None*) – list of param paths (dot-notation supported)
    that should trigger a reload when changed. If None, the loader
    only executes once on mount
* **Returns:**
  a [`Property`](#fiftyone.operators.types.Property)

#### map(name, key_type, value_type, \*\*kwargs)

Defines a map property on the object.

* **Parameters:**
  * **name** – the name of the property
  * **key_type** – the type of the keys in the map
  * **value_type** – the type of the values in the map
* **Returns:**
  a [`Map`](#fiftyone.operators.types.Map)

#### md(markdown, name='markdown', \*\*kwargs)

Defines a markdown object.

* **Parameters:**
  * **markdown** – the markdown to display
  * **name** – the name of the property

#### media_player(name, url, \*\*kwargs)

Defines a media player object.

* **Parameters:**
  * **name** – the name of the property
  * **url** – the URL of the media to display
  * **on_start** (*None*) – the operator to execute when the media starts
  * **on_play** (*None*) – the operator to execute when the media is played
  * **on_pause** (*None*) – the operator to execute when the media is paused
  * **on_buffer** (*None*) – the operator to execute when the media is buffering
  * **on_buffer_end** (*None*) – the operator to execute when the media stops buffering
  * **on_ended** (*None*) – the operator to execute when the media ends
  * **on_error** (*None*) – the operator to execute when the media errors
  * **on_duration** (*None*) – the operator to execute when the media duration is loaded
  * **on_seek** (*None*) – the operator to execute when the media is seeked
  * **on_progress** (*None*) – the operator to execute when the media progresses
* **Returns:**
  a [`Object`](#fiftyone.operators.types.Object)

#### menu(name, \*\*kwargs)

Defined an [`Object`](#fiftyone.operators.types.Object) property that is displayed as a menu.

#### NOTE
Can be used for an [`Button`](#fiftyone.operators.types.Button) type with properties whose views are one of
[`Button`](#fiftyone.operators.types.Button), [`Dropdown`](#fiftyone.operators.types.Dropdown), [`DropdownView`](#fiftyone.operators.types.DropdownView), and :class;\`Choices\`. The variant
and color of the items can be set using the `variant` and `color` parameters.

* **Parameters:**
  * **name** – the name of the property
  * **variant** (*None*) – the variant for the items of the menu. Can be `"contained"`,
    `"outlined"`, `"round"` or `"square"`
  * **color** (*None*) – the color for the items of the menu.
  * **overlay** (*None*) – whether to display the menu as an overlay. Can be `"top-left"`,
  * **"top-center"**
  * **"top-right"**
  * **"bottom-left"**
  * **"bottom-center"\`**
  * **or**
  * **of** ( *"bottom-right". Overlay is useful when you want to display a floating menu on top*)
  * **content** (*another*)
  * **icon** (*None*) – when set, the icon will be displayed as the menu button instead of the label.
  * **"SettingsIcon"** (*Can be*)
  * **"MoreVertIcon".**
* **Returns:**
  a [`Object`](#fiftyone.operators.types.Object)

#### message(name, label, \*\*kwargs)

Defines a message to display to the user as a [`Notice`](#fiftyone.operators.types.Notice).

* **Parameters:**
  * **name** – the name of the property
  * **label** – the label of the notice
  * **description** (*None*) – the description of the notice
  * **view** (*None*) – the [`View`](#fiftyone.operators.types.View) of the notice
* **Returns:**
  a [`Property`](#fiftyone.operators.types.Property)

#### obj(name, \*\*kwargs)

Defines a property on the object that is an object.

* **Parameters:**
  * **name** – the name of the property
  * **label** (*None*) – the label of the property
  * **description** (*None*) – the description of the property
  * **view** (*None*) – the [`View`](#fiftyone.operators.types.View) of the property
* **Returns:**
  a [`Property`](#fiftyone.operators.types.Property)

#### oneof(name, types, \*\*kwargs)

Defines a one-of property on the object.

* **Parameters:**
  * **name** – the name of the property
  * **types** – list of types that are instances of [`BaseType`](#fiftyone.operators.types.BaseType)
* **Returns:**
  a [`OneOf`](#fiftyone.operators.types.OneOf)

#### plot(name, \*\*kwargs)

Defines an object property displayed as a plot.

* **Parameters:**
  * **name** – the name of the property
  * **config** (*None*) – the chart config
  * **layout** (*None*) – the chart layout

See [`PlotlyView`](#fiftyone.operators.types.PlotlyView) for more information.

#### str(name, allow_empty=False, \*\*kwargs)

Defines a property on the object that is a string.

* **Parameters:**
  * **name** – the name of the property
  * **label** (*None*) – the label of the property
  * **description** (*None*) – the description of the property
  * **view** (*None*) – the [`View`](#fiftyone.operators.types.View) of the property
* **Returns:**
  a [`Property`](#fiftyone.operators.types.Property)

#### target_view(ctx, name='view_target', view_type=None, action_description='Process', default_target=None, allow_selected_samples=True, allow_selected_labels=False, allow_dataset_view=False, base_view_label='Base view', base_view_description=None, current_view_label='Current view', current_view_description=None, dataset_label='Dataset', dataset_description=None, dataset_view_label='Dataset', dataset_view_description=None, selected_samples_label='Current selection', selected_samples_description=None, selected_labels_label='Selected labels', selected_labels_description=None, require_flat=False, \*\*kwargs)

Defines a view target input property.

This property has an enum input that allows the user to select which view
to process. The available choices depend on the current context and the
provided flags.

The choices include:

- Dataset (if the current view is not a generated view)
- Base view (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)), which 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")`
- Dataset view (if `allow_dataset_view` is `True`)
- Current view (if the current view is different from the dataset view)
- Current selection (if `allow_selected_samples` is `True` and there are
  selected samples)
- Selected labels (if `allow_selected_labels` is `True` and there are
  selected labels)

If there’s no view or selected items, the only option is entire dataset,
so the view target selector is hidden and “DATASET” will be returned.

The resolved target view can be accessed in the operator’s
[`execute()`](fiftyone.operators.md#fiftyone.operators.Operator.execute) method
via [`ctx.target_view()`](fiftyone.operators.md#fiftyone.operators.ExecutionContext.target_view).

The target view descriptions are generated based on the provided
`action_description` and the various description parameters. If a
description parameter is not `None`, it will be used as the
description for the corresponding target view choice. Otherwise, a
default description will be generated such as
`f"{action_description} the base view"`.

Examples:

```default
import fiftyone.operators as foo

class MyTargetViewOperator(foo.Operator):
    @property
    def config(self):
        return foo.OperatorConfig(
            name="target_view_operator",
            label="Testing Target View Operator",
            dynamic=True,
        )

    def resolve_input(self, ctx):
        inputs = types.Object()

        view_target_prop = inputs.view_target(ctx)

        return types.Property(
            inputs, view=types.View(label="Target View Operator")
        )

    def execute(self, ctx):
        target_view = ctx.target_view()
        # Do something with the target view
        print("Sample collection size", len(target_view))

Args:
    ctx: the operator's :class:`fiftyone.operators.ExecutionContext`
    name(view_target): the name of the view target property
    view_type (RadioGroup): the view type to use (RadioGroup, Dropdown,
        etc.)
    default_target (None): the default target view to select if
        multiple choices are available. If ``None`` or
        ``default_target`` is not an available choice, the most
        targeted / selective available choice is chosen.
    action_description (Process): a short description of the action
        being performed, used to generate default descriptions for the
        various target views
    allow_selected_samples (True): whether to allow the "selected
        samples" target view
    allow_selected_labels (False): whether to allow the "selected
        labels" target view
    allow_dataset_view (False): whether to allow the "dataset view"
        target view
    base_view_label (Base view): the label for the "base view" target
        view
    base_view_description (None): the description for the "base view"
        target view. If ``None``, a default description is generated
    current_view_label (Current view): the label for the "current
        view" target view
    current_view_description (None): the description for the "current
        view" target view. If ``None``, a default description is
        generated
    dataset_label (Dataset): the label for the "entire dataset"
        target view
    dataset_description (None): the description for the "entire
        dataset" target view. If ``None``, a default description is
        generated
    dataset_view_label (Dataset): the label for the "dataset view"
        target view
    dataset_view_description (None): the description for the "dataset
        view" target view. If ``None``, a default description is
        generated
    selected_samples_label (Current selection): the label for the
        "selected samples" target view
    selected_samples_description (None): the description for the
        "selected samples" target view. If ``None``, a default
        description is generated
    selected_labels_label (Selected labels): the label for the
        "selected labels" target view
    selected_labels_description (None): the description for the
        "selected labels" target view. If ``None``, a default
        description is generated
    require_flat (False): whether the operation requires a
        flattened (non-grouped) collection

Returns:
    a :class:`ViewTargetProperty`
```

#### to_json()

Converts the object definition to JSON.

* **Returns:**
  a JSON dict

#### tree(name, \*\*kwargs)

Defines a tree property on the object.

* **Parameters:**
  **name** – the name of the property
* **Returns:**
  a [`Tree`](#fiftyone.operators.types.Tree)

#### tuple(name, \*items, \*\*kwargs)

Defines a tuple property on the object.

* **Parameters:**
  * **name** – the name of the property
  * **\*items** – the types of the items in the tuple
* **Returns:**
  a [`Tuple`](#fiftyone.operators.types.Tuple)

#### uploaded_file(name, \*\*kwargs)

Defines a property on the object that is an uploaded file.

* **Parameters:**
  * **name** – the name of the property
  * **view** (*None*) – the [`View`](#fiftyone.operators.types.View) of the property
  * **lite** (*False*) – whether to use the lite version of the file. When True, the content of the
    file in not included in resolve_input params, only the metadata is included.

#### v_stack(name, \*\*kwargs)

Defines a vertical stack object.

* **Parameters:**
  **name** – the name of the property
* **Returns:**
  a [`Object`](#fiftyone.operators.types.Object)

#### view(name, view, \*\*kwargs)

Defines a view-only property.

Examples:

```default
import fiftyone.operators.types as types

notice = types.Notice(label="a label", description="a description")
inputs = types.Object()
inputs.view("notice", notice)
```

* **Parameters:**
  * **name** – the name of the property
  * **view** – the [`View`](#fiftyone.operators.types.View) to define
* **Returns:**
  a [`Property`](#fiftyone.operators.types.Property)

#### view_target(ctx, name='view_target', view_type=None, action_description='Process', default_target=None, allow_selected_samples=True, allow_selected_labels=False, allow_dataset_view=False, base_view_label='Base view', base_view_description=None, current_view_label='Current view', current_view_description=None, dataset_label='Dataset', dataset_description=None, dataset_view_label='Dataset', dataset_view_description=None, selected_samples_label='Current selection', selected_samples_description=None, selected_labels_label='Selected labels', selected_labels_description=None, require_flat=False, \*\*kwargs)

Defines a view target input property.

This property has an enum input that allows the user to select which view
to process. The available choices depend on the current context and the
provided flags.

The choices include:

- Dataset (if the current view is not a generated view)
- Base view (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)), which 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")`
- Dataset view (if `allow_dataset_view` is `True`)
- Current view (if the current view is different from the dataset view)
- Current selection (if `allow_selected_samples` is `True` and there are
  selected samples)
- Selected labels (if `allow_selected_labels` is `True` and there are
  selected labels)

If there’s no view or selected items, the only option is entire dataset,
so the view target selector is hidden and “DATASET” will be returned.

The resolved target view can be accessed in the operator’s
[`execute()`](fiftyone.operators.md#fiftyone.operators.Operator.execute) method
via [`ctx.target_view()`](fiftyone.operators.md#fiftyone.operators.ExecutionContext.target_view).

The target view descriptions are generated based on the provided
`action_description` and the various description parameters. If a
description parameter is not `None`, it will be used as the
description for the corresponding target view choice. Otherwise, a
default description will be generated such as
`f"{action_description} the base view"`.

Examples:

```default
import fiftyone.operators as foo

class MyTargetViewOperator(foo.Operator):
    @property
    def config(self):
        return foo.OperatorConfig(
            name="target_view_operator",
            label="Testing Target View Operator",
            dynamic=True,
        )

    def resolve_input(self, ctx):
        inputs = types.Object()

        view_target_prop = inputs.view_target(ctx)

        return types.Property(
            inputs, view=types.View(label="Target View Operator")
        )

    def execute(self, ctx):
        target_view = ctx.target_view()
        # Do something with the target view
        print("Sample collection size", len(target_view))

Args:
    ctx: the operator's :class:`fiftyone.operators.ExecutionContext`
    name(view_target): the name of the view target property
    view_type (RadioGroup): the view type to use (RadioGroup, Dropdown,
        etc.)
    default_target (None): the default target view to select if
        multiple choices are available. If ``None`` or
        ``default_target`` is not an available choice, the most
        targeted / selective available choice is chosen.
    action_description (Process): a short description of the action
        being performed, used to generate default descriptions for the
        various target views
    allow_selected_samples (True): whether to allow the "selected
        samples" target view
    allow_selected_labels (False): whether to allow the "selected
        labels" target view
    allow_dataset_view (False): whether to allow the "dataset view"
        target view
    base_view_label (Base view): the label for the "base view" target
        view
    base_view_description (None): the description for the "base view"
        target view. If ``None``, a default description is generated
    current_view_label (Current view): the label for the "current
        view" target view
    current_view_description (None): the description for the "current
        view" target view. If ``None``, a default description is
        generated
    dataset_label (Dataset): the label for the "entire dataset"
        target view
    dataset_description (None): the description for the "entire
        dataset" target view. If ``None``, a default description is
        generated
    dataset_view_label (Dataset): the label for the "dataset view"
        target view
    dataset_view_description (None): the description for the "dataset
        view" target view. If ``None``, a default description is
        generated
    selected_samples_label (Current selection): the label for the
        "selected samples" target view
    selected_samples_description (None): the description for the
        "selected samples" target view. If ``None``, a default
        description is generated
    selected_labels_label (Selected labels): the label for the
        "selected labels" target view
    selected_labels_description (None): the description for the
        "selected labels" target view. If ``None``, a default
        description is generated
    require_flat (False): whether the operation requires a
        flattened (non-grouped) collection

Returns:
    a :class:`ViewTargetProperty`
```

### *class* fiftyone.operators.types.View(container=None, \*\*kwargs)

Bases: `object`

Represents a view of a [`Property`](#fiftyone.operators.types.Property).

Views are used to define how properties are displayed in the FiftyOne App.

* **Parameters:**
  * **label** (*None*) – a label for the view
  * **description** (*None*) – a description for the view
  * **caption** (*None*) – a caption for the view
  * **space** (*12*) – An int specifying how much vertical/horizontal space to allocate out
    of `12` depending on the orientation of the parent container
  * **placeholder** (*None*) – string to display placeholder text
  * **read_only** (*False*) – whether the view is read-only
  * **component** (*None*) – specifying custom component to use as the view
  * **componentsProps** (*None*) – dict for providing props to components rendered
    by a view
  * **container** (*None*) – the container (instance of [`BaseType`](#fiftyone.operators.types.BaseType)) of the view

**Methods:**

| [`clone`](#fiftyone.operators.types.View.clone)()                   |    |
|---------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.View.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.View.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.InferredView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Represents a view of a [`Property`](#fiftyone.operators.types.Property) that is inferred from the data.

#### NOTE
You can only use inferred views for input properties.

**Methods:**

| [`clone`](#fiftyone.operators.types.InferredView.clone)()                   |    |
|-----------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.InferredView.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.InferredView.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.Form(live=False, submit_button_label='Execute', cancel_button_label='Close', \*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

A form view.

**Methods:**

| [`to_json`](#fiftyone.operators.types.Form.to_json)()               |    |
|---------------------------------------------------------------------|----|
| [`clone`](#fiftyone.operators.types.Form.clone)()                   |    |
| [`kwargs_to_json`](#fiftyone.operators.types.Form.kwargs_to_json)() |    |

#### to_json()

#### clone()

#### kwargs_to_json()

### *class* fiftyone.operators.types.ReadOnlyView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

A read-only [`View`](#fiftyone.operators.types.View).

**Methods:**

| [`clone`](#fiftyone.operators.types.ReadOnlyView.clone)()                   |    |
|-----------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.ReadOnlyView.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.ReadOnlyView.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.Choice(value, include=True, \*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Represents a choice in a [`Choices`](#fiftyone.operators.types.Choices) view.

* **Parameters:**
  * **value** – the value of the choice
  * **label** (*None*) – a label for the [`Choice`](#fiftyone.operators.types.Choice)
  * **description** (*None*) – a description for the [`Choice`](#fiftyone.operators.types.Choice)
  * **caption** (*None*) – a caption for the [`Choice`](#fiftyone.operators.types.Choice)

**Methods:**

| [`clone`](#fiftyone.operators.types.Choice.clone)()                   | Clones the [`Choice`](#fiftyone.operators.types.Choice).   |
|-----------------------------------------------------------------------|------------------------------------------------------------|
| [`to_json`](#fiftyone.operators.types.Choice.to_json)()               |                                                            |
| [`kwargs_to_json`](#fiftyone.operators.types.Choice.kwargs_to_json)() |                                                            |

#### clone()

Clones the [`Choice`](#fiftyone.operators.types.Choice).

* **Returns:**
  a [`Choice`](#fiftyone.operators.types.Choice)

#### to_json()

#### kwargs_to_json()

### *class* fiftyone.operators.types.Choices(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Represents a set of choices in a [`View`](#fiftyone.operators.types.View).

Use this view to define a set of choices for a [`Property`](#fiftyone.operators.types.Property) that can
be selected by the user and require labels and optional descriptions.

Examples:

```default
import fiftyone.operators.types as types

choices = types.Choices()
choices.add_choice("cat", label="Cat", description="A cat")
choices.add_choice("dog", label="Dog", description="A dog")

inputs = types.Object()
inputs.enum("animal", choices.values(), view=choices)
```

* **Parameters:**
  **choices** (*None*) – a list of [`Choice`](#fiftyone.operators.types.Choice) instances

**Attributes:**

| [`choices`](#fiftyone.operators.types.Choices.choices)   |    |
|----------------------------------------------------------|----|

**Methods:**

| [`values`](#fiftyone.operators.types.Choices.values)()                          | Returns the choice values for this instance.                                   |
|---------------------------------------------------------------------------------|--------------------------------------------------------------------------------|
| [`add_choice`](#fiftyone.operators.types.Choices.add_choice)(value, \*\*kwargs) | Adds a choice value to this instance.                                          |
| [`append`](#fiftyone.operators.types.Choices.append)(choice)                    | Appends a [`Choice`](#fiftyone.operators.types.Choice) to the list of choices. |
| [`clone`](#fiftyone.operators.types.Choices.clone)()                            |                                                                                |
| [`to_json`](#fiftyone.operators.types.Choices.to_json)()                        |                                                                                |
| [`kwargs_to_json`](#fiftyone.operators.types.Choices.kwargs_to_json)()          |                                                                                |

#### *property* choices

#### values()

Returns the choice values for this instance.

* **Returns:**
  a list of values

#### add_choice(value, \*\*kwargs)

Adds a choice value to this instance.

* **Parameters:**
  **value** – a choice value
* **Returns:**
  the [`Choice`](#fiftyone.operators.types.Choice) that was added

#### append(choice)

Appends a [`Choice`](#fiftyone.operators.types.Choice) to the list of choices.

* **Parameters:**
  **choice** – a [`Choice`](#fiftyone.operators.types.Choice) instance

#### clone()

#### to_json()

#### kwargs_to_json()

### *class* fiftyone.operators.types.RadioGroup(\*\*kwargs)

Bases: [`Choices`](#fiftyone.operators.types.Choices)

Represents a set of choices in a [`View`](#fiftyone.operators.types.View) that are displayed as a
radio group.

Examples:

```default
import fiftyone.operators.types as types

choices = types.RadioGroup()
choices.add_choice("cat", label="Cat", description="A cat")
choices.add_choice("dog", label="Dog", description="A dog")

inputs = types.Object()
inputs.enum("animal", choices.values(), view=choices)
```

* **Parameters:**
  * **orientation** ( *"horizontal"*) – the orientation of the radio group Can be
    `"horizontal"` or `"vertical"`
  * **label** (*None*) – a label for the radio group
  * **description** (*None*) – a description for the radio group
  * **caption** (*None*) – a caption for the radio group

**Methods:**

| [`to_json`](#fiftyone.operators.types.RadioGroup.to_json)()                        |                                                                                |
|------------------------------------------------------------------------------------|--------------------------------------------------------------------------------|
| [`add_choice`](#fiftyone.operators.types.RadioGroup.add_choice)(value, \*\*kwargs) | Adds a choice value to this instance.                                          |
| [`append`](#fiftyone.operators.types.RadioGroup.append)(choice)                    | Appends a [`Choice`](#fiftyone.operators.types.Choice) to the list of choices. |
| [`clone`](#fiftyone.operators.types.RadioGroup.clone)()                            |                                                                                |
| [`kwargs_to_json`](#fiftyone.operators.types.RadioGroup.kwargs_to_json)()          |                                                                                |
| [`values`](#fiftyone.operators.types.RadioGroup.values)()                          | Returns the choice values for this instance.                                   |

**Attributes:**

| [`choices`](#fiftyone.operators.types.RadioGroup.choices)   |    |
|-------------------------------------------------------------|----|

#### to_json()

#### add_choice(value, \*\*kwargs)

Adds a choice value to this instance.

* **Parameters:**
  **value** – a choice value
* **Returns:**
  the [`Choice`](#fiftyone.operators.types.Choice) that was added

#### append(choice)

Appends a [`Choice`](#fiftyone.operators.types.Choice) to the list of choices.

* **Parameters:**
  **choice** – a [`Choice`](#fiftyone.operators.types.Choice) instance

#### *property* choices

#### clone()

#### kwargs_to_json()

#### values()

Returns the choice values for this instance.

* **Returns:**
  a list of values

### *class* fiftyone.operators.types.Dropdown(\*\*kwargs)

Bases: [`Choices`](#fiftyone.operators.types.Choices)

Represents a set of choices in a [`View`](#fiftyone.operators.types.View) that are displayed as a
dropdown.

Examples:

```default
import fiftyone.operators.types as types

choices = types.Dropdown()
choices.add_choice("cat", label="Cat", description="A cat")
choices.add_choice("dog", label="Dog", description="A dog")

inputs = types.Object()
inputs.enum("animal", choices.values(), view=choices)
```

* **Parameters:**
  * **label** (*None*) – a label for the dropdown
  * **description** (*None*) – a description for the dropdown
  * **caption** (*None*) – a caption for the dropdown

**Methods:**

| [`add_choice`](#fiftyone.operators.types.Dropdown.add_choice)(value, \*\*kwargs)   | Adds a choice value to this instance.                                          |
|------------------------------------------------------------------------------------|--------------------------------------------------------------------------------|
| [`append`](#fiftyone.operators.types.Dropdown.append)(choice)                      | Appends a [`Choice`](#fiftyone.operators.types.Choice) to the list of choices. |
| [`clone`](#fiftyone.operators.types.Dropdown.clone)()                              |                                                                                |
| [`kwargs_to_json`](#fiftyone.operators.types.Dropdown.kwargs_to_json)()            |                                                                                |
| [`to_json`](#fiftyone.operators.types.Dropdown.to_json)()                          |                                                                                |
| [`values`](#fiftyone.operators.types.Dropdown.values)()                            | Returns the choice values for this instance.                                   |

**Attributes:**

| [`choices`](#fiftyone.operators.types.Dropdown.choices)   |    |
|-----------------------------------------------------------|----|

#### add_choice(value, \*\*kwargs)

Adds a choice value to this instance.

* **Parameters:**
  **value** – a choice value
* **Returns:**
  the [`Choice`](#fiftyone.operators.types.Choice) that was added

#### append(choice)

Appends a [`Choice`](#fiftyone.operators.types.Choice) to the list of choices.

* **Parameters:**
  **choice** – a [`Choice`](#fiftyone.operators.types.Choice) instance

#### *property* choices

#### clone()

#### kwargs_to_json()

#### to_json()

#### values()

Returns the choice values for this instance.

* **Returns:**
  a list of values

### *class* fiftyone.operators.types.Notice(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Represents a notice in a [`View`](#fiftyone.operators.types.View).

You can use this view to display notices to the user.

Examples:

```default
import fiftyone.operators.types as types

inputs = types.Object()
inputs.notice("This is a notice")
```

* **Parameters:**
  * **label** (*None*) – a label for the notice
  * **description** (*None*) – a description for the notice
  * **caption** (*None*) – a caption for the notice

**Methods:**

| [`clone`](#fiftyone.operators.types.Notice.clone)()                   |    |
|-----------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.Notice.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.Notice.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.Header(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Represents a header in a [`View`](#fiftyone.operators.types.View).

**Methods:**

| [`clone`](#fiftyone.operators.types.Header.clone)()                   |    |
|-----------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.Header.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.Header.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.Warning(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Represents a warning in a [`View`](#fiftyone.operators.types.View).

**Methods:**

| [`clone`](#fiftyone.operators.types.Warning.clone)()                   |    |
|------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.Warning.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.Warning.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.Error(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Represents an error in a [`View`](#fiftyone.operators.types.View).

**Methods:**

| [`clone`](#fiftyone.operators.types.Error.clone)()                   |    |
|----------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.Error.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.Error.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.Button(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Represents a button in a [`View`](#fiftyone.operators.types.View).

Examples:

```default
import fiftyone.operators.types as types

button = types.Button(
    label="Click me",
    operator="print_stdout",
    params={"msg": "Hello World"},
)

inputs = types.Object()
inputs.view("btn", button)
```

* **Parameters:**
  * **label** (*None*) – a label for the button
  * **description** (*None*) – a description for the button
  * **caption** (*None*) – a caption for the button
  * **operator** (*None*) – the name of the operator to execute when the button is
    clicked
  * **params** (*None*) – the parameters to pass to the operator
  * **href** (*None*) – the URL to navigate to when the button is clicked

**Methods:**

| [`to_json`](#fiftyone.operators.types.Button.to_json)()               |    |
|-----------------------------------------------------------------------|----|
| [`clone`](#fiftyone.operators.types.Button.clone)()                   |    |
| [`kwargs_to_json`](#fiftyone.operators.types.Button.kwargs_to_json)() |    |

#### to_json()

#### clone()

#### kwargs_to_json()

### *class* fiftyone.operators.types.OperatorExecutionButtonView(\*\*kwargs)

Bases: [`Button`](#fiftyone.operators.types.Button)

Represents an operator execution button in a [`View`](#fiftyone.operators.types.View).

Examples:

```default
import fiftyone.operators.types as types

exec_button = types.OperatorExecutionButtonView(
    label="Execute Simple Op",
    variant="contained",
    operator="@voxel51/panel-examples/simple_op",
    on_success=self.on_success,
    on_error=self.on_error,
    on_option_selected=self.on_select,
    params={"msg": "Hello World!"},
)

inputs = types.Object()
inputs.view("operator_btn", view=exec_button)
```

* **Parameters:**
  * **icon** – an icon for the button. Defaults to “expand_more” if not provided.
  * **label** – a label for the button.
  * **variant** – the variant of the button. Can be “contained” or “outlined”.
  * **description** – a description for the button.
  * **title** – a tooltip title for the button.
  * **operator** – the URI of the operator to execute when the button is clicked.
  * **on_success** – the URI of the operator to execute when the operator execution is successful.
  * **on_error** – the URI of the operator to execute when the operator execution fails.
  * **on_option_selected** – the URI of the operator to execute when an option is selected.
  * **params** – the parameters dict to pass to the operator.
  * **disabled** – whether the button is disabled.

**Methods:**

| [`clone`](#fiftyone.operators.types.OperatorExecutionButtonView.clone)()                   |    |
|--------------------------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.OperatorExecutionButtonView.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.OperatorExecutionButtonView.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.OneOfView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Displays one of the given [`View`](#fiftyone.operators.types.View) instances.

Examples:

```default
import fiftyone.operators.types as types

choices = types.RadioGroup()
choices.add_choice("cat", label="Cat", description="A cat")
choices.add_choice("dog", label="Dog", description="A dog")
view = types.OneOfView(
    oneof=[types.Enum(choices.values()), types.String()]
)

inputs = types.Object()
inputs.define_property(types.OneOfView(oneof=[choices]), view=view)
```

* **Parameters:**
  **oneof** (*None*) – a list of [`View`](#fiftyone.operators.types.View) instances

**Methods:**

| [`to_json`](#fiftyone.operators.types.OneOfView.to_json)()               |    |
|--------------------------------------------------------------------------|----|
| [`clone`](#fiftyone.operators.types.OneOfView.clone)()                   |    |
| [`kwargs_to_json`](#fiftyone.operators.types.OneOfView.kwargs_to_json)() |    |

#### to_json()

#### clone()

#### kwargs_to_json()

### *class* fiftyone.operators.types.ListView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Displays a list of [`View`](#fiftyone.operators.types.View) instances.

**Methods:**

| [`to_json`](#fiftyone.operators.types.ListView.to_json)()               |    |
|-------------------------------------------------------------------------|----|
| [`clone`](#fiftyone.operators.types.ListView.clone)()                   |    |
| [`kwargs_to_json`](#fiftyone.operators.types.ListView.kwargs_to_json)() |    |

#### to_json()

#### clone()

#### kwargs_to_json()

### *class* fiftyone.operators.types.TupleView(\*itemsView, \*\*options)

Bases: [`View`](#fiftyone.operators.types.View)

Displays a tuple of [`View`](#fiftyone.operators.types.View) instances.

**Methods:**

| [`to_json`](#fiftyone.operators.types.TupleView.to_json)()               |    |
|--------------------------------------------------------------------------|----|
| [`clone`](#fiftyone.operators.types.TupleView.clone)()                   |    |
| [`kwargs_to_json`](#fiftyone.operators.types.TupleView.kwargs_to_json)() |    |

#### to_json()

#### clone()

#### kwargs_to_json()

### *class* fiftyone.operators.types.TreeSelectionView(\*\*options)

Bases: [`View`](#fiftyone.operators.types.View)

Displays a tree selection checkbox groups.

Examples:

```default
import fiftyone.operators.types as types

structure = [
    ["group_id_1", ["sample_id_1", "sample_id_2"]],
    ["group_id_2", ["sample_id_3", "sample_id_4", "sample_id_5"], ["group_id_8", ["sample_id_6"]]],
]

tree_view = types.TreeSelectionView(
    data=structure # this data represents the basic group structure;
)

panel.view('exact_duplicate_selections', view=tree_view, on_change=self.toggle_select)

def toggle_select(self, ctx):
    selected = ctx.params['value']
    print('selected samples:', selected)
```

* **Parameters:**
  * **data** (*None*) – a list of lists representing the tree structure of groups and its children
  * **on_change** (*None*) – the operator to execute when the tree selection changes

**Methods:**

| [`to_json`](#fiftyone.operators.types.TreeSelectionView.to_json)()               |    |
|----------------------------------------------------------------------------------|----|
| [`clone`](#fiftyone.operators.types.TreeSelectionView.clone)()                   |    |
| [`kwargs_to_json`](#fiftyone.operators.types.TreeSelectionView.kwargs_to_json)() |    |

#### to_json()

#### clone()

#### kwargs_to_json()

### *class* fiftyone.operators.types.CodeView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Displays a code editor.

Examples:

```default
import fiftyone.operators.types as types

inputs = types.Object()
inputs.str("src", types.CodeView(language="python"))
```

* **Parameters:**
  **language** (*None*) – the language to use for syntax highlighting

**Methods:**

| [`to_json`](#fiftyone.operators.types.CodeView.to_json)()               |    |
|-------------------------------------------------------------------------|----|
| [`clone`](#fiftyone.operators.types.CodeView.clone)()                   |    |
| [`kwargs_to_json`](#fiftyone.operators.types.CodeView.kwargs_to_json)() |    |

#### to_json()

#### clone()

#### kwargs_to_json()

### *class* fiftyone.operators.types.ColorView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Displays a color picker.

* **Parameters:**
  * **compact** (*None*) – whether to display the color picker in compact mode
  * **variant** (*None*) – the variant of the color picker. See
    [https://casesandberg.github.io/react-color](https://casesandberg.github.io/react-color)

**Methods:**

| [`to_json`](#fiftyone.operators.types.ColorView.to_json)()               |    |
|--------------------------------------------------------------------------|----|
| [`clone`](#fiftyone.operators.types.ColorView.clone)()                   |    |
| [`kwargs_to_json`](#fiftyone.operators.types.ColorView.kwargs_to_json)() |    |

#### to_json()

#### clone()

#### kwargs_to_json()

### *class* fiftyone.operators.types.TabsView(\*\*kwargs)

Bases: [`Choices`](#fiftyone.operators.types.Choices)

Displays a tabbed view.

* **Parameters:**
  **variant** (*None*) – the variant of the tabs. See
  [https://material-ui.com/components/tabs](https://material-ui.com/components/tabs)

**Methods:**

| [`to_json`](#fiftyone.operators.types.TabsView.to_json)()                        |                                                                                |
|----------------------------------------------------------------------------------|--------------------------------------------------------------------------------|
| [`add_choice`](#fiftyone.operators.types.TabsView.add_choice)(value, \*\*kwargs) | Adds a choice value to this instance.                                          |
| [`append`](#fiftyone.operators.types.TabsView.append)(choice)                    | Appends a [`Choice`](#fiftyone.operators.types.Choice) to the list of choices. |
| [`clone`](#fiftyone.operators.types.TabsView.clone)()                            |                                                                                |
| [`kwargs_to_json`](#fiftyone.operators.types.TabsView.kwargs_to_json)()          |                                                                                |
| [`values`](#fiftyone.operators.types.TabsView.values)()                          | Returns the choice values for this instance.                                   |

**Attributes:**

| [`choices`](#fiftyone.operators.types.TabsView.choices)   |    |
|-----------------------------------------------------------|----|

#### to_json()

#### add_choice(value, \*\*kwargs)

Adds a choice value to this instance.

* **Parameters:**
  **value** – a choice value
* **Returns:**
  the [`Choice`](#fiftyone.operators.types.Choice) that was added

#### append(choice)

Appends a [`Choice`](#fiftyone.operators.types.Choice) to the list of choices.

* **Parameters:**
  **choice** – a [`Choice`](#fiftyone.operators.types.Choice) instance

#### *property* choices

#### clone()

#### kwargs_to_json()

#### values()

Returns the choice values for this instance.

* **Returns:**
  a list of values

### *class* fiftyone.operators.types.JSONView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Displays a JSON viewer.

Examples:

```default
# Show an object/dictionary in a JSON viewer
outputs.obj("my_property", label="My Object", view=types.JSONView())
```

**Methods:**

| [`clone`](#fiftyone.operators.types.JSONView.clone)()                   |    |
|-------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.JSONView.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.JSONView.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.AutocompleteView(\*\*kwargs)

Bases: [`Choices`](#fiftyone.operators.types.Choices)

Displays an autocomplete input.

#### NOTE
This view can be used in place of [`Choices`](#fiftyone.operators.types.Choices).

* **Parameters:**
  * **choices** (*None*) – a list of [`Choice`](#fiftyone.operators.types.Choice) instances
  * **read_only** (*False*) – whether the view is read-only
  * **allow_user_input** (*True*) – when True the user can input a value that is not in the choices
  * **allow_duplicates** (*True*) – when True the user can select the same choice multiple times
  * **filter_selected_options** (*False*) – when True a multi-select drops the
    choices already selected from its list rather than marking them

**Methods:**

| [`add_choice`](#fiftyone.operators.types.AutocompleteView.add_choice)(value, \*\*kwargs)   | Adds a choice value to this instance.                                          |
|--------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------|
| [`append`](#fiftyone.operators.types.AutocompleteView.append)(choice)                      | Appends a [`Choice`](#fiftyone.operators.types.Choice) to the list of choices. |
| [`clone`](#fiftyone.operators.types.AutocompleteView.clone)()                              |                                                                                |
| [`kwargs_to_json`](#fiftyone.operators.types.AutocompleteView.kwargs_to_json)()            |                                                                                |
| [`to_json`](#fiftyone.operators.types.AutocompleteView.to_json)()                          |                                                                                |
| [`values`](#fiftyone.operators.types.AutocompleteView.values)()                            | Returns the choice values for this instance.                                   |

**Attributes:**

| [`choices`](#fiftyone.operators.types.AutocompleteView.choices)   |    |
|-------------------------------------------------------------------|----|

#### add_choice(value, \*\*kwargs)

Adds a choice value to this instance.

* **Parameters:**
  **value** – a choice value
* **Returns:**
  the [`Choice`](#fiftyone.operators.types.Choice) that was added

#### append(choice)

Appends a [`Choice`](#fiftyone.operators.types.Choice) to the list of choices.

* **Parameters:**
  **choice** – a [`Choice`](#fiftyone.operators.types.Choice) instance

#### *property* choices

#### clone()

#### kwargs_to_json()

#### to_json()

#### values()

Returns the choice values for this instance.

* **Returns:**
  a list of values

### *class* fiftyone.operators.types.FileView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Displays a file input.

#### NOTE
This view can be used on [`String`](#fiftyone.operators.types.String) or [`UploadedFile`](#fiftyone.operators.types.UploadedFile)
properties. If used on a [`String`](#fiftyone.operators.types.String) property, the value will be
the base64-encoded contents. If used on a [`UploadedFile`](#fiftyone.operators.types.UploadedFile), the
value will be a [`UploadedFile`](#fiftyone.operators.types.UploadedFile) object.

* **Parameters:**
  * **max_size** (*None*) – a maximum allowed size of the file, in bytes
  * **max_size_error_message** (*None*) – an error message to display if the file
    exceeds the max size
  * **types** (*None*) – a string containing the comma-separated file types to
    accept
  * **lite** (*False*) – whether to use the lite version of the file. When True, the content of the
    file in not included, only the metadata is included in resolve_input params. Must be
    used in conjunction with a property of type [`UploadedFile`](#fiftyone.operators.types.UploadedFile) .

**Methods:**

| [`clone`](#fiftyone.operators.types.FileView.clone)()                   |    |
|-------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.FileView.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.FileView.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.LinkView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Displays a hyperlink.

* **Parameters:**
  **href** (*None*) – the URL to link to. Defaults to the property
  `value.href`

**Methods:**

| [`to_json`](#fiftyone.operators.types.LinkView.to_json)()               |    |
|-------------------------------------------------------------------------|----|
| [`clone`](#fiftyone.operators.types.LinkView.clone)()                   |    |
| [`kwargs_to_json`](#fiftyone.operators.types.LinkView.kwargs_to_json)() |    |

#### to_json()

#### clone()

#### kwargs_to_json()

### *class* fiftyone.operators.types.HiddenView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Allows properties to be hidden from the user.

**Methods:**

| [`clone`](#fiftyone.operators.types.HiddenView.clone)()                   |    |
|---------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.HiddenView.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.HiddenView.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.LoadingView(\*\*kwargs)

Bases: [`ReadOnlyView`](#fiftyone.operators.types.ReadOnlyView)

Displays a loading indicator.

* **Parameters:**
  * **text** ( *"Loading"*) – a label for the loading indicator
  * **variant** ( *"spinner"*) – the variant of the loading indicator
  * **color** ( *"primary"*) – the color of the loading indicator
  * **size** ( *"medium"*) – the size of the loading indicator

**Methods:**

| [`clone`](#fiftyone.operators.types.LoadingView.clone)()                   |    |
|----------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.LoadingView.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.LoadingView.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.LoaderView(operator, params=None, label=None, placeholder_view=None, dependencies=None, \*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

A view that loads data asynchronously via an operator.

The view executes the specified operator and stores the result. The loader
property value always has the following structure:

```default
{
    "state": "idle" | "loading" | "loaded" | "errored",
    "data": <type>,  # shaped by the type argument passed to loader()
    "error": <str>   # error message (when state is "errored")
}
```

The `type` argument passed to [`Object.loader()`](#fiftyone.operators.types.Object.loader) defines the shape of
the `data` field, not the entire loader value.

By default, the loader executes only once when the component mounts.
Use the `dependencies` argument to specify which param paths should
trigger a reload when their values change.

* **Parameters:**
  * **operator** – the operator to execute (string URI or callable method)
  * **params** (*None*) – parameters to pass to the operator
  * **label** (*None*) – loading message to display
  * **placeholder_view** (*None*) – view to render while loading
  * **dependencies** (*None*) – list of param paths (dot-notation supported)
    that should trigger a reload when changed. If None, the loader
    only executes once on mount

**Methods:**

| [`to_json`](#fiftyone.operators.types.LoaderView.to_json)()               |    |
|---------------------------------------------------------------------------|----|
| [`clone`](#fiftyone.operators.types.LoaderView.clone)()                   |    |
| [`kwargs_to_json`](#fiftyone.operators.types.LoaderView.kwargs_to_json)() |    |

#### to_json()

#### clone()

#### kwargs_to_json()

### *class* fiftyone.operators.types.PillBadgeView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Displays a pill shaped badge.

* **Parameters:**
  * **text** ( *"Reviewed"* *|*  *[* *"Reviewed"* *,*  *"Not Reviewed"* *]*  *|*  *[* *[* *"Not Started"* *,*  *"primary"* *]* *,*  *[* *"Reviewed"* *,*  *"success"* *]* *,*  *[* *"In Review"* *,*  *"warning"* *]*) – a label or set of label options with or without a color for the pill badge
  * **color** ( *"primary"*) – the color of the pill
  * **variant** ( *"outlined"*) – the variant of the pill
  * **show_icon** (*False* *|* *True*) – whether to display indicator icon

**Methods:**

| [`clone`](#fiftyone.operators.types.PillBadgeView.clone)()                   |    |
|------------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.PillBadgeView.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.PillBadgeView.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.PlotlyView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Displays a Plotly chart.

#### NOTE
See [https://github.com/plotly/react-plotly.js/#basic-props](https://github.com/plotly/react-plotly.js/#basic-props) for
documentation.

All event handlers have the following default params:

- `id`: the corresponding data.ids[idx]
- `path`: the path of the property
- `relative_path`: the relative path of the property
- `schema`: the schema of the property
- `view`: the value of the PlotlyView
- `event`: the event name (eg. onClick, onSelected, onDoubleClick)
- `value`: the value of the clicked point (only pie chart-like plots)
- `label`: the label of the clicked point (only pie chart-like plots)
- `shift_pressed`: whether the shift key was pressed

Examples:

```default
def render(self, ctx):
    panel.plot("my_plot", on_click=self.on_click, on_selected=self.on_selected)

def print_params(self, ctx, params):
    for key, value in params.items():
        ctx.print(f"{key}: {value}")

def on_click(self, ctx):
    # available params
    self.print_prams(ctx, {
        "id": "id", # the corresponding data.ids[idx]
        "idx": 1, # the index of the clicked point
        "label": "label", # label (eg. on pie charts)
        "shift_pressed": false, # whether the shift key was pressed
        "trace": "my_trace", # data[trace_idx].name
        "trace_idx": 0,
        "value": "my_value", # data[trace_idx].values[idx] (eg. on a pie chart)
        "x": 2, # data[trace_idx].x[idx] (the x value on most plot types)
        "y": 3, # data[trace_idx].y[idx] (the y value on most plot types)
        "z": 4, # data[trace_idx].z[idx] (the z value on 3d plots eg. heatmap)
    })

def on_selected(self, ctx):
    prin(ctx.params['data'])
    # [
    #     {
    #       "trace": "trace 0", # data[trace_idx].name
    #       "trace_idx": 0, # the index of the trace
    #       "idx": 1, # the index of the selected point
    #       "id": "one", # the corresponding data.ids[idx]
    #       "x": 2, # the x value of the selected point
    #       "y": 15, # the y value of the selected point
    #       "z": 22 # the z value of the selected point
    #     }
    # ]
```

* **Parameters:**
  * **data** (*None*) – the chart data
  * **config** (*None*) – the chart config
  * **layout** (*None*) – the chart layout
  * **on_click** (*None*) – event handler for click events
  * **on_selected** (*None*) – event handler for selected events
  * **on_double_click** (*None*) – event handler for double click events

**Methods:**

| [`to_json`](#fiftyone.operators.types.PlotlyView.to_json)()               |    |
|---------------------------------------------------------------------------|----|
| [`clone`](#fiftyone.operators.types.PlotlyView.clone)()                   |    |
| [`kwargs_to_json`](#fiftyone.operators.types.PlotlyView.kwargs_to_json)() |    |

#### to_json()

#### clone()

#### kwargs_to_json()

### *class* fiftyone.operators.types.Placement(place, view=None)

Bases: `object`

Represents the placement of an operator in the FiftyOne App.

* **Parameters:**
  * **place** – the [`Places`](#fiftyone.operators.types.Places) value
  * **view** (*None*) – a [`View`](#fiftyone.operators.types.View) to render

**Methods:**

| [`to_json`](#fiftyone.operators.types.Placement.to_json)()   |    |
|--------------------------------------------------------------|----|

#### to_json()

### *class* fiftyone.operators.types.Places(\*values)

Bases: `Enum`

The places available to operators in the FiftyOne App.

**Attributes:**

| [`SAMPLES_GRID_ACTIONS`](#fiftyone.operators.types.Places.SAMPLES_GRID_ACTIONS)                     |    |
|-----------------------------------------------------------------------------------------------------|----|
| [`SAMPLES_GRID_SECONDARY_ACTIONS`](#fiftyone.operators.types.Places.SAMPLES_GRID_SECONDARY_ACTIONS) |    |
| [`SAMPLES_VIEWER_ACTIONS`](#fiftyone.operators.types.Places.SAMPLES_VIEWER_ACTIONS)                 |    |
| [`EMBEDDINGS_ACTIONS`](#fiftyone.operators.types.Places.EMBEDDINGS_ACTIONS)                         |    |
| [`HISTOGRAM_ACTIONS`](#fiftyone.operators.types.Places.HISTOGRAM_ACTIONS)                           |    |
| [`MAP_ACTIONS`](#fiftyone.operators.types.Places.MAP_ACTIONS)                                       |    |
| [`MAP_SECONDARY_ACTIONS`](#fiftyone.operators.types.Places.MAP_SECONDARY_ACTIONS)                   |    |
| [`DISPLAY_OPTIONS`](#fiftyone.operators.types.Places.DISPLAY_OPTIONS)                               |    |
| [`HEADER_ACTIONS`](#fiftyone.operators.types.Places.HEADER_ACTIONS)                                 |    |

**Methods:**

| [`to_json`](#fiftyone.operators.types.Places.to_json)()   |    |
|-----------------------------------------------------------|----|

#### SAMPLES_GRID_ACTIONS *= 'samples-grid-actions'*

#### SAMPLES_GRID_SECONDARY_ACTIONS *= 'samples-grid-secondary-actions'*

#### SAMPLES_VIEWER_ACTIONS *= 'samples-viewer-actions'*

#### EMBEDDINGS_ACTIONS *= 'embeddings-actions'*

#### HISTOGRAM_ACTIONS *= 'histograms-actions'*

#### MAP_ACTIONS *= 'map-actions'*

#### MAP_SECONDARY_ACTIONS *= 'map-secondary-actions'*

#### DISPLAY_OPTIONS *= 'display-options'*

#### HEADER_ACTIONS *= 'header-actions'*

#### to_json()

### *class* fiftyone.operators.types.KeyValueView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Displays a key-value editor.

**Methods:**

| [`clone`](#fiftyone.operators.types.KeyValueView.clone)()                   |    |
|-----------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.KeyValueView.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.KeyValueView.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.Column(key, \*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

A column in a [`TableView`](#fiftyone.operators.types.TableView).

* **Parameters:**
  **key** – the name of the property to use for data

**Methods:**

| [`clone`](#fiftyone.operators.types.Column.clone)()                   |    |
|-----------------------------------------------------------------------|----|
| [`to_json`](#fiftyone.operators.types.Column.to_json)()               |    |
| [`kwargs_to_json`](#fiftyone.operators.types.Column.kwargs_to_json)() |    |

#### clone()

#### to_json()

#### kwargs_to_json()

### *class* fiftyone.operators.types.Action(name, \*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

An action (currently supported only in a [`TableView`](#fiftyone.operators.types.TableView)).

* **Parameters:**
  * **name** – the name of the action
  * **label** (*None*) – the label of the action
  * **icon** (*None*) – the icon of the action
  * **tooltip** (*None*) – the tooltip of the action
  * **on_click** – the operator to execute when the action is clicked

**Methods:**

| [`clone`](#fiftyone.operators.types.Action.clone)()                   |    |
|-----------------------------------------------------------------------|----|
| [`to_json`](#fiftyone.operators.types.Action.to_json)()               |    |
| [`kwargs_to_json`](#fiftyone.operators.types.Action.kwargs_to_json)() |    |

#### clone()

#### to_json()

#### kwargs_to_json()

### *class* fiftyone.operators.types.Tooltip(row, column, \*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

A tooltip (currently supported only in a [`TableView`](#fiftyone.operators.types.TableView)).

* **Parameters:**
  * **value** – the value of the tooltip
  * **row** – the row of the tooltip
  * **column** – the column of the tooltip

**Methods:**

| [`clone`](#fiftyone.operators.types.Tooltip.clone)()                   |    |
|------------------------------------------------------------------------|----|
| [`to_json`](#fiftyone.operators.types.Tooltip.to_json)()               |    |
| [`kwargs_to_json`](#fiftyone.operators.types.Tooltip.kwargs_to_json)() |    |

#### clone()

#### to_json()

#### kwargs_to_json()

### *class* fiftyone.operators.types.TableView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Displays a table.

* **Parameters:**
  * **columns** (*None*) – a list of [`Column`](#fiftyone.operators.types.Column) objects to display
  * **row_actions** (*None*) – a list of [`Action`](#fiftyone.operators.types.Action) objects to display

**Methods:**

| [`keys`](#fiftyone.operators.types.TableView.keys)()                                                 |    |
|------------------------------------------------------------------------------------------------------|----|
| [`add_column`](#fiftyone.operators.types.TableView.add_column)(key, \*\*kwargs)                      |    |
| [`add_row_action`](#fiftyone.operators.types.TableView.add_row_action)(name, on_click[, label, ...]) |    |
| [`add_tooltip`](#fiftyone.operators.types.TableView.add_tooltip)(row, column, value, \*\*kwargs)     |    |
| [`clone`](#fiftyone.operators.types.TableView.clone)()                                               |    |
| [`to_json`](#fiftyone.operators.types.TableView.to_json)()                                           |    |
| [`kwargs_to_json`](#fiftyone.operators.types.TableView.kwargs_to_json)()                             |    |

#### keys()

#### add_column(key, \*\*kwargs)

#### add_row_action(name, on_click, label=None, icon=None, tooltip=None, \*\*kwargs)

#### add_tooltip(row, column, value, \*\*kwargs)

#### clone()

#### to_json()

#### kwargs_to_json()

### *class* fiftyone.operators.types.MapView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Displays a key-value mapping.

**Methods:**

| [`to_json`](#fiftyone.operators.types.MapView.to_json)()               |    |
|------------------------------------------------------------------------|----|
| [`clone`](#fiftyone.operators.types.MapView.clone)()                   |    |
| [`kwargs_to_json`](#fiftyone.operators.types.MapView.kwargs_to_json)() |    |

#### to_json()

#### clone()

#### kwargs_to_json()

### *class* fiftyone.operators.types.ProgressView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Displays a progress bar.

Examples:

```default
import fiftyone.operators as foo
import fiftyone.operators.types as types

class ExampleProgress(foo.Operator):
    @property
    def config(self):
        return foo.OperatorConfig(
            name="example_progress",
            label="Examples: Progress",
            execute_as_generator=True,
        )

    async def execute(self, ctx):
        outputs = types.Object()
        schema = types.Property(outputs)
        n = 100
        for i in range(n):
            label = f"Loading {i} of {n}"
            progress_view = types.ProgressView(label=label)
            loading_schema = types.Object()
            loading_schema.int("percent_complete", view=progress_view)
            show_output_params = {
                "outputs": types.Property(loading_schema).to_json(),
                "results": {"percent_complete": i / n}
            }
            yield ctx.trigger("show_output", show_output_params)

            # Simulate computation
            await asyncio.sleep(0.5)
```

* **Parameters:**
  * **label** (*None*) – the label to display under the progress bar
  * **variant** (*None*) – bar variant. Supported values are `"linear"` and
    `"circular"`

**Methods:**

| [`to_json`](#fiftyone.operators.types.ProgressView.to_json)()               |    |
|-----------------------------------------------------------------------------|----|
| [`clone`](#fiftyone.operators.types.ProgressView.clone)()                   |    |
| [`kwargs_to_json`](#fiftyone.operators.types.ProgressView.kwargs_to_json)() |    |

#### to_json()

#### clone()

#### kwargs_to_json()

### *class* fiftyone.operators.types.ImageView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Displays an image.

Examples:

```default
def execute():
    return {"image": "https://voxel51.com/your/image.png"}

def resolve_output(self, ctx):
    schema = {
        "height": "100px",
        "width": "100px",
        "alt": "My image alt text",
        "href": "https://voxel51.com",
        "operator": "@my/plugin/my_operator" | self.my_operator (in Python Panels),
        "prompt": False,
        "params": {"foo": "bar"},
    }
    outputs = types.Object()
    outputs.define_property(
        "image",
        types.String(),
        label="Image",
        view=types.ImageView(),
    )
    return types.Property(outputs)
```

* **Parameters:**
  * **height** (*None*) – the height of the image
  * **width** (*None*) – the width of the image
  * **alt** (*None*) – the alt text of the image
  * **href** (*None*) – the url to navigate to when the image is clicked
  * **operator** (*None*) – the name of the callable operator to execute when the image is clicked
  * **prompt** (*False*) – whether to prompt the user before executing the operator
  * **params** (*None*) – the parameters to pass to the operator

**Methods:**

| [`clone`](#fiftyone.operators.types.ImageView.clone)()                   |    |
|--------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.ImageView.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.ImageView.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.AlertView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Displays an alert.

* **Parameters:**
  * **severity** (*None*) – the severity of the alert displayed, one of
    `("info", "success", "warning", "error")`
  * **componentsProps** (*None*) – 

    an optional dict with the following keys:
    - `'label'` (None): props to pass to the label subcomponents
    - `'description'` (None): props to pass to the description
      subcomponents
    - `'caption'` (None): props to pass to the caption subcomponents

**Methods:**

| [`to_json`](#fiftyone.operators.types.AlertView.to_json)()               |    |
|--------------------------------------------------------------------------|----|
| [`clone`](#fiftyone.operators.types.AlertView.clone)()                   |    |
| [`kwargs_to_json`](#fiftyone.operators.types.AlertView.kwargs_to_json)() |    |

#### to_json()

#### clone()

#### kwargs_to_json()

### *class* fiftyone.operators.types.ToastView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Displays a snackbar style toast element.

Examples:

schema = {
: > “message”: “Test”,
  > “duration”: 30000,
  > “layout”: {
  <br/>
  > > “vertical”: “top”,
  > > “horizontal”: “center”,
  > > “top”: “200px”
  <br/>
  > },
  <br/>
  }
  snackbar = types.ToastView(
  <br/>
  ```
  **
  ```
  <br/>
  schema)
  panel.obj(“toast”, view=snackbar)

* **Parameters:**
  * **message** – the message to display
  * **duration** (*None*) – the duration to stay on screen in milliseconds
  * **layout** (*None*) – the layout of the toast

**Methods:**

| [`clone`](#fiftyone.operators.types.ToastView.clone)()                   |    |
|--------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.ToastView.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.ToastView.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.CheckboxView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Displays a checkbox.

Examples:

```default
inputs.bool(
    "my_property_name",
    default=True,
    label="My Checkbox",
    description="A checkbox description.",
    view=types.CheckboxView(),
)
```

#### NOTE
Must be used with [`Boolean`](#fiftyone.operators.types.Boolean) properties.

**Methods:**

| [`clone`](#fiftyone.operators.types.CheckboxView.clone)()                   |    |
|-----------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.CheckboxView.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.CheckboxView.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.ErrorView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Displays an error.

* **Parameters:**
  * **detailed** (*False*) – whether to display a detailed error message
  * **popout** (*None*) – if provided, displays a popout button with the given
    dictionary of props
  * **left** (*False*) – whether to display on the left side of the popout button

**Methods:**

| [`clone`](#fiftyone.operators.types.ErrorView.clone)()                   |    |
|--------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.ErrorView.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.ErrorView.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.HeaderView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Displays a header component.

Headers can have a `label`, `description`, and `caption`, each of
which are displayed in a separate line.

**Methods:**

| [`clone`](#fiftyone.operators.types.HeaderView.clone)()                   |    |
|---------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.HeaderView.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.HeaderView.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.ObjectView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Displays an object component.

**Methods:**

| [`clone`](#fiftyone.operators.types.ObjectView.clone)()                   |    |
|---------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.ObjectView.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.ObjectView.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.RadioView(\*\*kwargs)

Bases: [`RadioGroup`](#fiftyone.operators.types.RadioGroup)

Displays a radio component for the given [`RadioGroup`](#fiftyone.operators.types.RadioGroup) instance.

**Methods:**

| [`add_choice`](#fiftyone.operators.types.RadioView.add_choice)(value, \*\*kwargs)   | Adds a choice value to this instance.                                          |
|-------------------------------------------------------------------------------------|--------------------------------------------------------------------------------|
| [`append`](#fiftyone.operators.types.RadioView.append)(choice)                      | Appends a [`Choice`](#fiftyone.operators.types.Choice) to the list of choices. |
| [`clone`](#fiftyone.operators.types.RadioView.clone)()                              |                                                                                |
| [`kwargs_to_json`](#fiftyone.operators.types.RadioView.kwargs_to_json)()            |                                                                                |
| [`to_json`](#fiftyone.operators.types.RadioView.to_json)()                          |                                                                                |
| [`values`](#fiftyone.operators.types.RadioView.values)()                            | Returns the choice values for this instance.                                   |

**Attributes:**

| [`choices`](#fiftyone.operators.types.RadioView.choices)   |    |
|------------------------------------------------------------|----|

#### add_choice(value, \*\*kwargs)

Adds a choice value to this instance.

* **Parameters:**
  **value** – a choice value
* **Returns:**
  the [`Choice`](#fiftyone.operators.types.Choice) that was added

#### append(choice)

Appends a [`Choice`](#fiftyone.operators.types.Choice) to the list of choices.

* **Parameters:**
  **choice** – a [`Choice`](#fiftyone.operators.types.Choice) instance

#### *property* choices

#### clone()

#### kwargs_to_json()

#### to_json()

#### values()

Returns the choice values for this instance.

* **Returns:**
  a list of values

### *class* fiftyone.operators.types.SwitchView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Displays a toggle switch.

#### NOTE
Must be used with [`Boolean`](#fiftyone.operators.types.Boolean) properties.

**Methods:**

| [`clone`](#fiftyone.operators.types.SwitchView.clone)()                   |    |
|---------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.SwitchView.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.SwitchView.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.TextView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Displays a text.
.. note:

```default
Must be used with :class:`String` properties.
```

**Methods:**

| [`clone`](#fiftyone.operators.types.TextView.clone)()                   |    |
|-------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.TextView.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.TextView.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.TextFieldView(multiline=False, rows=None, \*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Displays a text input.

#### NOTE
Must be used with [`String`](#fiftyone.operators.types.String) or [`Number`](#fiftyone.operators.types.Number) properties.

* **Parameters:**
  * **multiline** (*False*) – whether to render a multiline text area
  * **rows** (*None*) – optional number of visible text rows when `multiline`
    is enabled

**Methods:**

| [`to_json`](#fiftyone.operators.types.TextFieldView.to_json)()               |    |
|------------------------------------------------------------------------------|----|
| [`clone`](#fiftyone.operators.types.TextFieldView.clone)()                   |    |
| [`kwargs_to_json`](#fiftyone.operators.types.TextFieldView.kwargs_to_json)() |    |

#### to_json()

#### clone()

#### kwargs_to_json()

### *class* fiftyone.operators.types.FieldView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Displays a text input.

#### NOTE
Must be used with [`String`](#fiftyone.operators.types.String) or [`Number`](#fiftyone.operators.types.Number) properties.

**Methods:**

| [`clone`](#fiftyone.operators.types.FieldView.clone)()                   |    |
|--------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.FieldView.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.FieldView.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.LazyFieldView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Displays a lazy text input which only apply input field changes on blur
or when user clicks the save button within the field.

#### NOTE
Must be used with [`String`](#fiftyone.operators.types.String) or [`Number`](#fiftyone.operators.types.Number) properties.

* **Parameters:**
  **save_on_blur** (*True*) – when set to False, changes in input field will not
  be automatically applied when user moves mouse out of the changed
  field. To apply changes, user must click the save button.

**Methods:**

| [`to_json`](#fiftyone.operators.types.LazyFieldView.to_json)()               |    |
|------------------------------------------------------------------------------|----|
| [`clone`](#fiftyone.operators.types.LazyFieldView.clone)()                   |    |
| [`kwargs_to_json`](#fiftyone.operators.types.LazyFieldView.kwargs_to_json)() |    |

#### to_json()

#### clone()

#### kwargs_to_json()

### *class* fiftyone.operators.types.DropdownView(\*\*kwargs)

Bases: [`Dropdown`](#fiftyone.operators.types.Dropdown)

Displays a dropdown selector input.

**Methods:**

| [`add_choice`](#fiftyone.operators.types.DropdownView.add_choice)(value, \*\*kwargs)   | Adds a choice value to this instance.                                          |
|----------------------------------------------------------------------------------------|--------------------------------------------------------------------------------|
| [`append`](#fiftyone.operators.types.DropdownView.append)(choice)                      | Appends a [`Choice`](#fiftyone.operators.types.Choice) to the list of choices. |
| [`clone`](#fiftyone.operators.types.DropdownView.clone)()                              |                                                                                |
| [`kwargs_to_json`](#fiftyone.operators.types.DropdownView.kwargs_to_json)()            |                                                                                |
| [`to_json`](#fiftyone.operators.types.DropdownView.to_json)()                          |                                                                                |
| [`values`](#fiftyone.operators.types.DropdownView.values)()                            | Returns the choice values for this instance.                                   |

**Attributes:**

| [`choices`](#fiftyone.operators.types.DropdownView.choices)   |    |
|---------------------------------------------------------------|----|

#### add_choice(value, \*\*kwargs)

Adds a choice value to this instance.

* **Parameters:**
  **value** – a choice value
* **Returns:**
  the [`Choice`](#fiftyone.operators.types.Choice) that was added

#### append(choice)

Appends a [`Choice`](#fiftyone.operators.types.Choice) to the list of choices.

* **Parameters:**
  **choice** – a [`Choice`](#fiftyone.operators.types.Choice) instance

#### *property* choices

#### clone()

#### kwargs_to_json()

#### to_json()

#### values()

Returns the choice values for this instance.

* **Returns:**
  a list of values

### *class* fiftyone.operators.types.DateTimeView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Displays a date/time input - response in epoch time

Examples::
: start_datetime_selector = types.DateTimeView(date_only=True)
  inputs.int(
  <br/>
  > “start_datetime”,
  > required=True,
  > label=”Start Date/time”,
  > description=”Start date/time…”,
  > view=start_datetime_selector,
  <br/>
  )
  <br/>
  end_datetime_selector = types.DateTimeView()
  inputs.int(
  <br/>
  > “end_datetime”,
  > required=False,
  > label=”End Date/time”,
  > description=”End date/time…”,
  > view=end_datetime_selector,
  <br/>
  )
  <br/>
  …
  <br/>
  start_datetime = ctx.params.get(“start_datetime”, None)
  end_datetime = ctx.params.get(“end_datetime”, None)
  <br/>
  if start_datetime:
  : start = fou.timestamp_to_datetime(start_datetime)
    print(f”start: {start}”)
  <br/>
  if end_datetime:
  : end = fou.timestamp_to_datetime(end_datetime)
    print(f”end: {end}”)

* **Parameters:**
  **date_only** (*False*) – whether to display a date only input
  and not require HH:MM:SS

**Methods:**

| [`clone`](#fiftyone.operators.types.DateTimeView.clone)()                   |    |
|-----------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.DateTimeView.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.DateTimeView.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.LabelValueView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Displays a label-value component. Used for displaying a label and a
corresponding value.

#### NOTE
Must be used with [`String`](#fiftyone.operators.types.String), [`Number`](#fiftyone.operators.types.Number), or [`Boolean`](#fiftyone.operators.types.Boolean)
properties, or lists of such properties. Also this view is not supported
for input properties.

**Methods:**

| [`clone`](#fiftyone.operators.types.LabelValueView.clone)()                   |    |
|-------------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.LabelValueView.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.LabelValueView.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.PrimitiveView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Displays a primitive value component.

#### NOTE
Must be used with [`String`](#fiftyone.operators.types.String), [`Number`](#fiftyone.operators.types.Number), or [`Boolean`](#fiftyone.operators.types.Boolean)
properties.

**Methods:**

| [`clone`](#fiftyone.operators.types.PrimitiveView.clone)()                   |    |
|------------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.PrimitiveView.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.PrimitiveView.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.SliderView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Displays a slider component.

#### NOTE
This view must be used with [`Number`](#fiftyone.operators.types.Number) properties.

**Methods:**

| [`clone`](#fiftyone.operators.types.SliderView.clone)()                   |    |
|---------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.SliderView.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.SliderView.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.TagsView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Displays a list of tags component.

#### NOTE
Must be used with [`List`](#fiftyone.operators.types.List) properties whose items are
[`String`](#fiftyone.operators.types.String), `Number:, or :class:`Boolean` instances

**Methods:**

| [`clone`](#fiftyone.operators.types.TagsView.clone)()                   |    |
|-------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.TagsView.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.TagsView.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.Success(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Represents a success in a [`View`](#fiftyone.operators.types.View).

**Methods:**

| [`clone`](#fiftyone.operators.types.Success.clone)()                   |    |
|------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.Success.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.Success.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.ButtonView(\*\*kwargs)

Bases: [`Button`](#fiftyone.operators.types.Button)

Represents a button in a [`Button`](#fiftyone.operators.types.Button).

**Methods:**

| [`clone`](#fiftyone.operators.types.ButtonView.clone)()                   |    |
|---------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.ButtonView.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.ButtonView.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.MarkdownView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Renders a markdown string as HTML.

**Methods:**

| [`clone`](#fiftyone.operators.types.MarkdownView.clone)()                   |    |
|-----------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.MarkdownView.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.MarkdownView.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.StatusButtonView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Renders a status button.

* **Parameters:**
  * **severity** (*None*) – the severity of the alert displayed, one of
    `("info", "success", "warning", "error", "enabled", "disabled")`
  * **on_click** (*None*) – an operator to execute when the button is clicked
  * **params** (*None*) – the parameters to pass to the operator
  * **disabled** – whether the button is disabled
  * **title** – tooltip title for the button

**Methods:**

| [`clone`](#fiftyone.operators.types.StatusButtonView.clone)()                   |    |
|---------------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.StatusButtonView.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.StatusButtonView.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.MediaPlayerView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Renders a media player for audio and video files.

* **Parameters:**
  * **name** – the name of the property
  * **url** – the URL of the media to display
  * **on_start** (*None*) – the operator to execute when the media starts
  * **on_play** (*None*) – the operator to execute when the media is played
  * **on_pause** (*None*) – the operator to execute when the media is paused
  * **on_buffer** (*None*) – the operator to execute when the media is buffering
  * **on_buffer_end** (*None*) – the operator to execute when the media stops buffering
  * **on_ended** (*None*) – the operator to execute when the media ends
  * **on_error** (*None*) – the operator to execute when the media errors
  * **on_duration** (*None*) – the operator to execute when the media duration is loaded
  * **on_seek** (*None*) – the operator to execute when the media is seeked
  * **on_progress** (*None*) – the operator to execute when the media progresses

**Methods:**

| [`clone`](#fiftyone.operators.types.MediaPlayerView.clone)()                   |    |
|--------------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.MediaPlayerView.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.MediaPlayerView.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.FileExplorerView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Displays a file explorer for interacting with files.

Examples:

```default
import os
import fiftyone.operators.types as types

inputs = types.Object()

# Create an explorer that allows the user to choose a directory
file_explorer = types.FileExplorerView(
    choose_dir=True,
    button_label="Choose a directory...",
    choose_button_label="Accept"
)

# Define a types.File property
file_prop = inputs.file(
    "directory",
    required=True,
    label="Directory",
    description="Choose a directory",
    view=file_explorer,
)

directory = ctx.params.get("directory", {}).get("absolute_path", None)
```

**Methods:**

| [`clone`](#fiftyone.operators.types.FileExplorerView.clone)()                   |    |
|---------------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.FileExplorerView.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.FileExplorerView.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.PromptView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Customizes how a prompt is rendered.

Examples:

```default
import fiftyone.operators.types as types

# in resolve_input
prompt = types.PromptView(
    label="This is the title",
    submit_button_label="Click me",
    cancel_button_label="Abort"
)
inputs = types.Object()
inputs.md("Hello world!")
return types.Property(inputs, view=prompt)
```

* **Parameters:**
  * **label** (*None*) – the title for the prompt
  * **submit_button_label** (*None*) – the label for the submit button
  * **cancel_button_label** (*None*) – the label for the cancel button

**Methods:**

| [`clone`](#fiftyone.operators.types.PromptView.clone)()                   |    |
|---------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.PromptView.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.PromptView.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.ViewTargetOptions(choices_view, action_description='Process', include_base_view=False, include_current_view=False, include_dataset=True, include_dataset_view=False, include_selected_labels=False, include_selected_samples=False, dataset_label='Dataset', dataset_description=None, base_view_label='Base view', base_view_description=None, current_view_label='Current view', current_view_description=None, dataset_view_label='Dataset', dataset_view_description=None, selected_samples_label='Current selection', selected_samples_description=None, selected_labels_label='Selected labels', selected_labels_description=None, scope_description=None, dataset_scope_description=None, unavailable=None, \*\*\_)

Bases: `object`

Represents the options for a [`ViewTargetProperty`](#fiftyone.operators.types.ViewTargetProperty).

#### choices_view

a [`Choices`](#fiftyone.operators.types.Choices) for the view target choices

**Attributes:**

| [`unavailable`](#fiftyone.operators.types.ViewTargetOptions.unavailable)   | A dict mapping the offered view targets that the operation cannot process to the reason why.   |
|----------------------------------------------------------------------------|------------------------------------------------------------------------------------------------|

**Methods:**

| [`values`](#fiftyone.operators.types.ViewTargetOptions.values)()                     |                                                                |
|--------------------------------------------------------------------------------------|----------------------------------------------------------------|
| [`available_values`](#fiftyone.operators.types.ViewTargetOptions.available_values)() | The offered view target values that the operation can process. |

#### *property* unavailable

A dict mapping the offered view targets that the operation cannot
process to the reason why.

#### values()

#### available_values()

The offered view target values that the operation can process.

### *class* fiftyone.operators.types.ViewTargetProperty(ctx, view_type=<class 'fiftyone.operators._types.types.RadioGroup'>, action_description='Process', allow_selected_samples=True, allow_selected_labels=False, allow_dataset_view=False, default_target=None, dataset_label='Dataset', dataset_description=None, base_view_label='Base view', base_view_description=None, current_view_label='Current view', current_view_description=None, dataset_view_label='Dataset', dataset_view_description=None, selected_samples_label='Current selection', selected_samples_description=None, selected_labels_label='Selected labels', selected_labels_description=None, require_flat=False, \*\*kwargs)

Bases: [`Property`](#fiftyone.operators.types.Property)

Property that displays a view target selector.

This property has an enum input that allows the user to select which view
to process. The available choices depend on the current context and the
provided flags.

The choices include:

- All samples (if the current view is not a generated view)
- Base view (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)), which 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")`
- Dataset view (if `allow_dataset_view` is `True`)
- Current view (if the current view is different from the dataset view)
- Current selection (if `allow_selected_samples` is `True` and there are
  selected samples)
- Selected labels (if `allow_selected_labels` is `True` and there are
  selected labels)

If there’s no view or selected items, the only option is entire dataset,
so the view target selector is hidden and “DATASET” will be returned.

The resolved target view can be accessed in the operator’s
[`execute()`](fiftyone.operators.md#fiftyone.operators.Operator.execute) method
via [`ctx.target_view()`](fiftyone.operators.md#fiftyone.operators.ExecutionContext.target_view).

The target view descriptions are generated based on the provided
`action_description` and the various description parameters. If a
description parameter is not `None`, it will be used as the
description for the corresponding target view choice. Otherwise, a
default description will be generated such as
`f"{action_description} the entire dataset"`.

Examples:

```default
import fiftyone.operators as foo

class MyTargetViewOperator(foo.Operator):
    @property
    def config(self):
        return foo.OperatorConfig(
            name="target_view_operator",
            label="Testing Target View Operator",
            dynamic=True,
        )

    def resolve_input(self, ctx):
        inputs = types.Object()

        view_target_prop = inputs.view_target(ctx)

        return types.Property(
            inputs, view=types.View(label="Target View Operator")
        )

    def execute(self, ctx):
        target_view = ctx.target_view()
        # Do something with the target view
        print("Sample collection size", len(target_view))
```

#### options

a [`ViewTargetOptions`](#fiftyone.operators.types.ViewTargetOptions) instance

**Attributes:**

| [`options`](#id0)   |    |
|---------------------|----|

**Methods:**

| [`to_json`](#fiftyone.operators.types.ViewTargetProperty.to_json)()   |    |
|-----------------------------------------------------------------------|----|

#### *property* options

#### to_json()

### *class* fiftyone.operators.types.GridView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Displays properties of an object as a grid of components in horizontal
or vertical orientation.

#### NOTE
Must be used with [`Object`](#fiftyone.operators.types.Object) properties.

* **Parameters:**
  * **orientation** ( *"2d"*) – the orientation of the stack. Can be either `"2d"`,
    `"horizontal"` or `"vertical"`
  * **gap** (*1*) – the gap between the components
  * **align_x** ( *"left"*) – the alignment of the components. Can be either `"left"`, `"center"`,
    or `"right"`
  * **align_y** ( *"top"*) – the alignment of the components. Can be either `"top"`, `"center"`,
    or `"bottom"`
  * **variant** (*None*) – the variant of the grid. Can be either `"paper"` or `"outline"`
  * **elevation** (*None*) – the elevation of the grid. Only applicable when `variant="paper"`

**Methods:**

| [`to_json`](#fiftyone.operators.types.GridView.to_json)()               |    |
|-------------------------------------------------------------------------|----|
| [`clone`](#fiftyone.operators.types.GridView.clone)()                   |    |
| [`kwargs_to_json`](#fiftyone.operators.types.GridView.kwargs_to_json)() |    |

#### to_json()

#### clone()

#### kwargs_to_json()

### *class* fiftyone.operators.types.DashboardView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Defines a Dashboard view.

* **Parameters:**
  * **layout** (*None*) – the layout of the dashboard.
  * **on_save_layout** (*None*) – event triggered when the layout changes
  * **on_add_item** (*None*) – event triggered when an item is added
  * **on_remove_item** (*None*) – event triggered when an item is closed
  * **on_edit_item** (*None*) – event triggered when an item is edited
  * **allow_addition** (*True*) – whether to allow adding items
  * **allow_deletion** (*True*) – whether to allow deleting items
  * **allow_edit** (*True*) – whether to allow editing items
  * **cta_title** (*None*) – the title of the call to action
  * **cta_body** (*None*) – the body of the call to action
  * **cta_button_label** (*None*) – the label of the call to action button
  * **rows** (*None*) – the number of rows in the dashboard
  * **cols** (*None*) – the number of columns in the dashboard
  * **items** (*None*) – the custom layout of the dashboard
  * **auto_layout** (*True*) – whether to automatically layout the dashboard

**Methods:**

| [`to_json`](#fiftyone.operators.types.DashboardView.to_json)()               |    |
|------------------------------------------------------------------------------|----|
| [`clone`](#fiftyone.operators.types.DashboardView.clone)()                   |    |
| [`kwargs_to_json`](#fiftyone.operators.types.DashboardView.kwargs_to_json)() |    |

#### to_json()

#### clone()

#### kwargs_to_json()

### *class* fiftyone.operators.types.DrawerView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Renders an operator prompt as a left or right side drawer.

Examples:

```default
import fiftyone.operators.types as types

# in resolve_input
inputs = types.Object()
inputs.str("message", label="Message")
prompt = types.DrawerView(placement="left")
return types.Property(inputs, view=prompt)
```

* **Parameters:**
  **placement** (*None*) – 

  the placement of the drawer. Can be one of the
  following
  - `'left'`: display to the left of the main or expanded view
  - `'right'`: display to the right of the main or expanded view

**Methods:**

| [`clone`](#fiftyone.operators.types.DrawerView.clone)()                   |    |
|---------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.DrawerView.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.DrawerView.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.IconButtonView(\*\*kwargs)

Bases: [`Button`](#fiftyone.operators.types.Button)

Represents a button in a [`View`](#fiftyone.operators.types.View).

Examples:

```default
import fiftyone.operators.types as types

iconButtonView = types.IconButtonView(
    icon="waving_hand",
    operator="print_stdout",
    params={"msg": "Hi!"},
)

inputs = types.Object()
inputs.view("icon_btn", iconButtonView)
```

* **Parameters:**
  * **icon** (*None*) – a icon for the button. See [https://github.com/marella/material-icons?tab=readme-ov-file#available-icons](https://github.com/marella/material-icons?tab=readme-ov-file#available-icons)
  * **variant** (*None*) – the optional variant of the icon button. Can be `"round"`, `"square"`,
    `"outlined"`, or `"contained"`.
  * **label** (*None*) – a label for the button
  * **description** (*None*) – a description for the button
  * **caption** (*None*) – a caption for the button
  * **operator** (*None*) – the name of the operator to execute when the button is
    clicked
  * **params** (*None*) – the parameters to pass to the operator
  * **href** (*None*) – the URL to navigate to when the button is clicked

**Methods:**

| [`clone`](#fiftyone.operators.types.IconButtonView.clone)()                   |    |
|-------------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.IconButtonView.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.IconButtonView.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.ModalView(\*\*kwargs)

Bases: [`Button`](#fiftyone.operators.types.Button)

Represents a button in a [`View`](#fiftyone.operators.types.View) that opens up an interactive modal.

Examples:

```default
import fiftyone.operators.types as types

schema = {
    "modal": {"icon": "local_offer", "iconVariant": "outlined", "title": "Modal Title", "subtitle": "Modal Subtitle", "body": "Modal Body", textAlign: {title: "center", subtitle: "left", body: "right"}},
    "primaryButton": {"primaryText": "This is the primary button", "primaryColor": "primary", "params": {"foo": "bar", "multiple": True}},
    "secondaryButton": {"secondaryText": "This is the secondary button", "secondaryColor": "secondary"},
    "primaryCallback": self.do_something(),
    "secondaryCallback": self.do_nothing(),
    "functionality": "tagging",
}
modal = types.ModalView(**schema, label="This is a modal", variant="outlined", icon="local_offer")

.. note::
    The primary callback is called when the primary button is clicked and the secondary callback is called when the secondary button is clicked.
    Secondary callback defaults to a closure of the modal unless defined.
    Buttons of ModalView inherit all functionality of ButtonView.

inputs = types.Object()
inputs.view("modal_btn", modal)
```

* **Parameters:**
  * **modal** – the textual content of the modal
  * **primaryButton** (*None*) – the properties of the primary button
  * **secondaryButton** (*None*) – the properties of the secondary button
  * **primaryCallback** (*None*) – the function to execute when the primary button is clicked
  * **secondaryCallback** (*None*) – the function to execute when the secondary button is clicked
  * **functionality** (*None*) – the name of the functionality to execute when the primary button is clicked. Available options are ‘tagging’

**Methods:**

| [`clone`](#fiftyone.operators.types.ModalView.clone)()                   |    |
|--------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.ModalView.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.ModalView.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.HStackView(orientation='horizontal', \*\*kwargs)

Bases: [`GridView`](#fiftyone.operators.types.GridView)

Displays properties of an object as a horizontal stack of components.

#### NOTE
Must be used with [`Object`](#fiftyone.operators.types.Object) properties.

**Methods:**

| [`clone`](#fiftyone.operators.types.HStackView.clone)()                   |    |
|---------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.HStackView.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.HStackView.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.VStackView(orientation='vertical', \*\*kwargs)

Bases: [`GridView`](#fiftyone.operators.types.GridView)

Displays properties of an object as a vertical stack of components.

#### NOTE
Must be used with [`Object`](#fiftyone.operators.types.Object) properties.

**Methods:**

| [`to_json`](#fiftyone.operators.types.VStackView.to_json)()               |    |
|---------------------------------------------------------------------------|----|
| [`clone`](#fiftyone.operators.types.VStackView.clone)()                   |    |
| [`kwargs_to_json`](#fiftyone.operators.types.VStackView.kwargs_to_json)() |    |

#### to_json()

#### clone()

#### kwargs_to_json()

### *class* fiftyone.operators.types.ButtonGroupView(orientation='horizontal', \*\*kwargs)

Bases: [`GridView`](#fiftyone.operators.types.GridView)

Displays a group of buttons in a horizontal stack.

#### NOTE
Must be used with [`Button`](#fiftyone.operators.types.Button) properties.

**Methods:**

| [`to_json`](#fiftyone.operators.types.ButtonGroupView.to_json)()               |    |
|--------------------------------------------------------------------------------|----|
| [`clone`](#fiftyone.operators.types.ButtonGroupView.clone)()                   |    |
| [`kwargs_to_json`](#fiftyone.operators.types.ButtonGroupView.kwargs_to_json)() |    |

#### to_json()

#### clone()

#### kwargs_to_json()

### *class* fiftyone.operators.types.MenuView(orientation='horizontal', \*\*kwargs)

Bases: [`GridView`](#fiftyone.operators.types.GridView)

Displays a menu of options in a vertical stack.

#### NOTE
Can be used for an [`Button`](#fiftyone.operators.types.Button) type with properties whose views are one of
[`Button`](#fiftyone.operators.types.Button), [`Dropdown`](#fiftyone.operators.types.Dropdown), [`DropdownView`](#fiftyone.operators.types.DropdownView), and :class;\`Choices\`. The variant
and color of the items can be set using the `variant` and `color` parameters.

* **Parameters:**
  * **name** – the name of the property
  * **variant** (*None*) – the variant for the items of the menu. Can be `"contained"`,
    `"outlined"`, `"round"` or `"square"`
  * **color** (*None*) – the color for the items of the menu.
  * **overlay** (*None*) – whether to display the menu as an overlay. Can be `"top-left"`,
  * **"top-center"**
  * **"top-right"**
  * **"bottom-left"**
  * **"bottom-center"\`**
  * **or**
  * **of** ( *"bottom-right". Overlay is useful when you want to display a floating menu on top*)
  * **content** (*another*)
  * **icon** (*None*) – when set, the icon button will be displayed as the menu trigger,
  * **"MoreVertIcon"** (*instead* *of* *the selected value. Can be "SettingsIcon" or*)
* **Returns:**
  a [`Object`](#fiftyone.operators.types.Object)

**Methods:**

| [`to_json`](#fiftyone.operators.types.MenuView.to_json)()               |    |
|-------------------------------------------------------------------------|----|
| [`clone`](#fiftyone.operators.types.MenuView.clone)()                   |    |
| [`kwargs_to_json`](#fiftyone.operators.types.MenuView.kwargs_to_json)() |    |

#### to_json()

#### clone()

#### kwargs_to_json()

### *class* fiftyone.operators.types.ArrowNavView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Displays a floating navigation arrows.

* **Parameters:**
  * **forward** (*True*) – Whether to display the forward arrow
  * **backward** (*True*) – Whether to display the backward arrow
  * **on_forward** (*None*) – The operator to execute when the forward arrow is clicked
  * **on_backward** (*None*) – The operator to execute when the backward arrow is clicked
  * **position** ( *"center"*) – The position of the arrows. Can be either `"top"`, `center`,
    `"bottom"`, `"left"`, `middle` (center horizontally), or ``"right"`

**Methods:**

| [`to_json`](#fiftyone.operators.types.ArrowNavView.to_json)()               |    |
|-----------------------------------------------------------------------------|----|
| [`clone`](#fiftyone.operators.types.ArrowNavView.clone)()                   |    |
| [`kwargs_to_json`](#fiftyone.operators.types.ArrowNavView.kwargs_to_json)() |    |

#### to_json()

#### clone()

#### kwargs_to_json()

### *class* fiftyone.operators.types.FrameLoaderView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Utility for animating panel state based on the given timeline_name.

Examples:

```default
def on_load(self, ctx):
    panel.state.plot = {
        "type": "scatter",
        "x": [1, 2, 3],
        "y": [1, 2, 3],
    }

def render(self, ctx):
    panel.obj(
        "frame_data",
        view=types.FrameLoaderView(
            on_load_range=self.on_load_range,
            target="plot.selectedpoints",
        ),
    )
    panel.plot("plot")

def load_range(self, ctx, range_to_load):
    r = ctx.params.get("range")

    chunk = {}
    for i in range(r[0], r[1]):
        rendered_frame = [i]
        chunk[f"frame_data.frames[{i}]"] = rendered_frame

    ctx.panel.set_data(chunk)
    current_field = ctx.panel.state.selected_field or "default_field"
    ctx.panel.set_state("frame_data.signature", current_field + str(r))
```

* **Parameters:**
  * **timeline_name** (*None*) – the name of the timeline to load if provided, otherwise the default timeline
  * **on_load_range** (*None*) – the operator to execute when the frame is loading
  * **target** – the path to the property to animate

**Methods:**

| [`clone`](#fiftyone.operators.types.FrameLoaderView.clone)()                   |    |
|--------------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.FrameLoaderView.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.FrameLoaderView.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.TimelineView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Represents a timeline for playing animations.

* **Parameters:**
  * **timeline_name** (*None*) – the name of the timeline
  * **total_frames** (*None*) – the total number of frames in the timeline
  * **loop** (*False*) – whether to loop the timeline

**Methods:**

| [`clone`](#fiftyone.operators.types.TimelineView.clone)()                   |    |
|-----------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.TimelineView.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.TimelineView.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.TimerView(\*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Supports a timer for executing operators/events after a specified duration or interval.

* **Parameters:**
  * **timeout** (*None*) – the duration in milliseconds to wait before executing the operator
  * **interval** (*None*) – the interval in milliseconds to wait before executing the operator
  * **on_timeout** (*None*) – the operator to execute when the timeout is reached
  * **on_interval** (*None*) – the operator to execute at the interval
  * **params** (*None*) – the params passed to the on_interval or on_timeout operator

**Methods:**

| [`clone`](#fiftyone.operators.types.TimerView.clone)()                   |    |
|--------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.TimerView.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.TimerView.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.ComponentView(name, \*\*kwargs)

Bases: [`View`](#fiftyone.operators.types.View)

Represents a custom component view.

* **Parameters:**
  **name** – the name of the component to render. This should correspond to a
  registered custom plugin component.

**Methods:**

| [`clone`](#fiftyone.operators.types.ComponentView.clone)()                   |    |
|------------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.ComponentView.kwargs_to_json)() |    |
| [`to_json`](#fiftyone.operators.types.ComponentView.to_json)()               |    |

#### clone()

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.Container(\*\*kwargs)

Bases: [`BaseType`](#fiftyone.operators.types.BaseType)

Represents a base container for a container types.

**Methods:**

| [`kwargs_to_json`](#fiftyone.operators.types.Container.kwargs_to_json)()   |    |
|----------------------------------------------------------------------------|----|
| [`to_json`](#fiftyone.operators.types.Container.to_json)()                 |    |

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.PaperContainer(elevation=1, rounded=True, \*\*kwargs)

Bases: [`Container`](#fiftyone.operators.types.Container)

Represents an elevated block for a view.

* **Parameters:**
  * **elevation** (*1*) – the elevation of the container. Can be a value between 0 and 24
  * **rounded** (*True*) – whether to display the paper container with rounded corners

**Methods:**

| [`to_json`](#fiftyone.operators.types.PaperContainer.to_json)()               |    |
|-------------------------------------------------------------------------------|----|
| [`kwargs_to_json`](#fiftyone.operators.types.PaperContainer.kwargs_to_json)() |    |

#### to_json()

#### kwargs_to_json()

### *class* fiftyone.operators.types.OutlinedContainer(rounded=True, \*\*kwargs)

Bases: [`Container`](#fiftyone.operators.types.Container)

Represents an elevated block for a view.

* **Parameters:**
  **rounded** (*True*) – whether to display the outlined container with rounded corners

**Methods:**

| [`kwargs_to_json`](#fiftyone.operators.types.OutlinedContainer.kwargs_to_json)()   |    |
|------------------------------------------------------------------------------------|----|
| [`to_json`](#fiftyone.operators.types.OutlinedContainer.to_json)()                 |    |

#### kwargs_to_json()

#### to_json()

### *class* fiftyone.operators.types.RiskLevel(\*values)

Bases: `Enum`

Risk levels that operators can declare.

**Attributes:**

| [`LOW`](#fiftyone.operators.types.RiskLevel.LOW)             |    |
|--------------------------------------------------------------|----|
| [`MEDIUM`](#fiftyone.operators.types.RiskLevel.MEDIUM)       |    |
| [`HIGH`](#fiftyone.operators.types.RiskLevel.HIGH)           |    |
| [`DANGEROUS`](#fiftyone.operators.types.RiskLevel.DANGEROUS) |    |

#### LOW *= 'low'*

#### MEDIUM *= 'medium'*

#### HIGH *= 'high'*

#### DANGEROUS *= 'dangerous'*
