# flytekit.core.reference_entity

## Directory

### Classes

| Class | Description |
|-|-|
| [`LaunchPlanReference`](https://www.union.ai/docs/v1/union/api-reference/flytekit-sdk/packages/flytekit.core.reference_entity/page.md#flytekitcorereference_entitylaunchplanreference) | A reference object containing metadata that points to a remote launch plan. |
| [`Reference`](https://www.union.ai/docs/v1/union/api-reference/flytekit-sdk/packages/flytekit.core.reference_entity/page.md#flytekitcorereference_entityreference) |  |
| [`ReferenceEntity`](https://www.union.ai/docs/v1/union/api-reference/flytekit-sdk/packages/flytekit.core.reference_entity/page.md#flytekitcorereference_entityreferenceentity) |  |
| [`ReferenceSpec`](https://www.union.ai/docs/v1/union/api-reference/flytekit-sdk/packages/flytekit.core.reference_entity/page.md#flytekitcorereference_entityreferencespec) |  |
| [`ReferenceTemplate`](https://www.union.ai/docs/v1/union/api-reference/flytekit-sdk/packages/flytekit.core.reference_entity/page.md#flytekitcorereference_entityreferencetemplate) |  |
| [`TaskReference`](https://www.union.ai/docs/v1/union/api-reference/flytekit-sdk/packages/flytekit.core.reference_entity/page.md#flytekitcorereference_entitytaskreference) | A reference object containing metadata that points to a remote task. |
| [`WorkflowReference`](https://www.union.ai/docs/v1/union/api-reference/flytekit-sdk/packages/flytekit.core.reference_entity/page.md#flytekitcorereference_entityworkflowreference) | A reference object containing metadata that points to a remote workflow. |

## flytekit.core.reference_entity.LaunchPlanReference

A reference object containing metadata that points to a remote launch plan.

### Parameters

```python
class LaunchPlanReference(
    project: str,
    domain: str,
    name: str,
    version: str,
)
```
| Parameter | Type | Description |
|-|-|-|
| `project` | `str` | |
| `domain` | `str` | |
| `name` | `str` | |
| `version` | `str` | |

### Properties

| Property | Type | Description |
|-|-|-|
| `id` | `None` |  |
| `resource_type` | `None` |  |

## flytekit.core.reference_entity.Reference

### Parameters

```python
class Reference(
    project: str,
    domain: str,
    name: str,
    version: str,
)
```
| Parameter | Type | Description |
|-|-|-|
| `project` | `str` | |
| `domain` | `str` | |
| `name` | `str` | |
| `version` | `str` | |

### Properties

| Property | Type | Description |
|-|-|-|
| `id` | `None` |  |
| `resource_type` | `None` |  |

## flytekit.core.reference_entity.ReferenceEntity

### Parameters

```python
class ReferenceEntity(
    reference: typing.Union[flytekit.core.reference_entity.WorkflowReference, flytekit.core.reference_entity.TaskReference, flytekit.core.reference_entity.LaunchPlanReference],
    inputs: typing.Dict[str, typing.Type],
    outputs: typing.Dict[str, typing.Type],
)
```
| Parameter | Type | Description |
|-|-|-|
| `reference` | `typing.Union[flytekit.core.reference_entity.WorkflowReference, flytekit.core.reference_entity.TaskReference, flytekit.core.reference_entity.LaunchPlanReference]` | |
| `inputs` | `typing.Dict[str, typing.Type]` | |
| `outputs` | `typing.Dict[str, typing.Type]` | |

### Properties

| Property | Type | Description |
|-|-|-|
| `id` | `None` |  |
| `interface` | `None` |  |
| `name` | `None` |  |
| `python_interface` | `None` |  |
| `reference` | `None` |  |

### Methods

| Method | Description |
|-|-|
| [`compile()`](#compile) |  |
| [`construct_node_metadata()`](#construct_node_metadata) |  |
| [`execute()`](#execute) |  |
| [`local_execute()`](#local_execute) | Please see the local_execute comments in the main task. |
| [`local_execution_mode()`](#local_execution_mode) |  |
| [`unwrap_literal_map_and_execute()`](#unwrap_literal_map_and_execute) | Please see the implementation of the dispatch_execute function in the real task. |

#### compile()

```python
def compile(
    ctx: flytekit.core.context_manager.FlyteContext,
    args,
    kwargs,
)
```
| Parameter | Type | Description |
|-|-|-|
| `ctx` | `flytekit.core.context_manager.FlyteContext` | |
| `args` | `*args` | |
| `kwargs` | `**kwargs` | |

#### construct_node_metadata()

```python
def construct_node_metadata()
```
#### execute()

```python
def execute(
    kwargs,
) -> typing.Any
```
| Parameter | Type | Description |
|-|-|-|
| `kwargs` | `**kwargs` | |

#### local_execute()

```python
def local_execute(
    ctx: flytekit.core.context_manager.FlyteContext,
    kwargs,
) -> typing.Union[typing.Tuple[flytekit.core.promise.Promise], flytekit.core.promise.Promise, flytekit.core.promise.VoidPromise, NoneType]
```
Please see the local_execute comments in the main task.

| Parameter | Type | Description |
|-|-|-|
| `ctx` | `flytekit.core.context_manager.FlyteContext` | |
| `kwargs` | `**kwargs` | |

#### local_execution_mode()

```python
def local_execution_mode()
```
#### unwrap_literal_map_and_execute()

```python
def unwrap_literal_map_and_execute(
    ctx: flytekit.core.context_manager.FlyteContext,
    input_literal_map: flytekit.models.literals.LiteralMap,
) -> flytekit.models.literals.LiteralMap
```
Please see the implementation of the dispatch_execute function in the real task.

| Parameter | Type | Description |
|-|-|-|
| `ctx` | `flytekit.core.context_manager.FlyteContext` | |
| `input_literal_map` | `flytekit.models.literals.LiteralMap` | |

## flytekit.core.reference_entity.ReferenceSpec

### Parameters

```python
class ReferenceSpec(
    template: flytekit.core.reference_entity.ReferenceTemplate,
)
```
| Parameter | Type | Description |
|-|-|-|
| `template` | `flytekit.core.reference_entity.ReferenceTemplate` | |

### Properties

| Property | Type | Description |
|-|-|-|
| `template` | `None` |  |

## flytekit.core.reference_entity.ReferenceTemplate

### Parameters

```python
class ReferenceTemplate(
    id: flytekit.models.core.identifier.Identifier,
    resource_type: int,
)
```
A reference template encapsulates all the information necessary to use reference entities within other
workflows or dynamic tasks.

| Parameter | Type | Description |
|-|-|-|
| `id` | `flytekit.models.core.identifier.Identifier` | |
| `resource_type` | `int` | |

### Properties

| Property | Type | Description |
|-|-|-|
| `id` | `None` | User-specified information that uniquely identifies this reference. |
| `resource_type` | `None` | The type of reference. |

## flytekit.core.reference_entity.TaskReference

A reference object containing metadata that points to a remote task.

### Parameters

```python
class TaskReference(
    project: str,
    domain: str,
    name: str,
    version: str,
)
```
| Parameter | Type | Description |
|-|-|-|
| `project` | `str` | |
| `domain` | `str` | |
| `name` | `str` | |
| `version` | `str` | |

### Properties

| Property | Type | Description |
|-|-|-|
| `id` | `None` |  |
| `resource_type` | `None` |  |

## flytekit.core.reference_entity.WorkflowReference

A reference object containing metadata that points to a remote workflow.

### Parameters

```python
class WorkflowReference(
    project: str,
    domain: str,
    name: str,
    version: str,
)
```
| Parameter | Type | Description |
|-|-|-|
| `project` | `str` | |
| `domain` | `str` | |
| `name` | `str` | |
| `version` | `str` | |

### Properties

| Property | Type | Description |
|-|-|-|
| `id` | `None` |  |
| `resource_type` | `None` |  |

---
**Source**: https://github.com/unionai/unionai-docs/blob/main/content/api-reference/flytekit-sdk/packages/flytekit.core.reference_entity.md
**HTML**: https://www.union.ai/docs/v1/union/api-reference/flytekit-sdk/packages/flytekit.core.reference_entity/
