# flyte.remote

Remote Entities that are accessible from the Union Server once deployed or created.
## Directory

### Classes

| Class | Description |
|-|-|
| [`Action`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/action/page.md) | A class representing an action. |
| [`ActionDetails`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/actiondetails/page.md) | A class representing an action. |
| [`ActionInputs`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/actioninputs/page.md) | A class representing the inputs of an action. |
| [`ActionOutputs`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/actionoutputs/page.md) | A class representing the outputs of an action. |
| [`App`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/app/page.md) |  |
| [`Project`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/project/page.md) | A class representing a project in the Union API. |
| [`Run`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/run/page.md) | A class representing a run of a task. |
| [`RunDetails`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/rundetails/page.md) | A class representing a run of a task. |
| [`Secret`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/secret/page.md) |  |
| [`Task`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/task/page.md) |  |
| [`TaskDetails`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/taskdetails/page.md) |  |
| [`TimeFilter`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/timefilter/page.md) | Filter for time-based fields (e. |
| [`Trigger`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/trigger/page.md) | Represents a trigger in the Flyte platform. |
| [`User`](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/user/page.md) | Represents a user in the Flyte platform. |

### Methods

| Method | Description |
|-|-|
| [`auth_metadata()`](#auth_metadata) | This context manager allows you to pass contextualized auth metadata downstream to the Flyte authentication system. |
| [`upload_dir()`](#upload_dir) | Uploads a directory to a remote location and returns the remote URI. |
| [`upload_file()`](#upload_file) | Uploads a file to a remote location and returns the remote URI. |

## Methods

#### auth_metadata()

```python
def auth_metadata(
    kv: typing.Tuple[str, str],
)
```
This context manager allows you to pass contextualized auth metadata downstream to the Flyte authentication system.

This is only useful if flyte.init_passthrough() has been called.

```python

flyte.init_passthrough("my-endpoint")

...

with auth_metadata((key1, value1), (key2, value2)):
    ...
```

| Parameter | Type | Description |
|-|-|-|
| `kv` | `typing.Tuple[str, str]` | |

#### upload_dir()

> [!NOTE] This method can be called both synchronously or asynchronously.
> Default invocation is sync and will block.
> To call it asynchronously, use the function `.aio()` on the method name itself, e.g.,:
> `result = await upload_dir.aio()`.
```python
def upload_dir(
    dir_path: pathlib.Path,
    verify: bool,
    prefix: str | None,
) -> str
```
Uploads a directory to a remote location and returns the remote URI.

| Parameter | Type | Description |
|-|-|-|
| `dir_path` | `pathlib.Path` | The directory path to upload. |
| `verify` | `bool` | Whether to verify the certificate for HTTPS requests. |
| `prefix` | `str \| None` | |

**Returns:** The remote URI of the uploaded directory.

#### upload_file()

> [!NOTE] This method can be called both synchronously or asynchronously.
> Default invocation is sync and will block.
> To call it asynchronously, use the function `.aio()` on the method name itself, e.g.,:
> `result = await upload_file.aio()`.
```python
def upload_file(
    fp: pathlib.Path,
    verify: bool,
    fname: str | None,
) -> typing.Tuple[str, str]
```
Uploads a file to a remote location and returns the remote URI.

| Parameter | Type | Description |
|-|-|-|
| `fp` | `pathlib.Path` | The file path to upload. |
| `verify` | `bool` | Whether to verify the certificate for HTTPS requests. |
| `fname` | `str \| None` | Optional file name for the remote path. |

**Returns:** Tuple of (MD5 digest hex string, remote native URL).

## Subpages

- [Action](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/action/page.md)
  - Parameters
  - Properties
  - Methods
  - abort()
  - details()
  - done()
  - get()
  - get_logs()
  - listall()
  - show_logs()
  - sync()
  - to_dict()
  - to_json()
  - wait()
  - watch()
- [ActionDetails](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/actiondetails/page.md)
  - Parameters
  - Properties
  - Methods
  - done()
  - get()
  - get_details()
  - get_phase_transitions()
  - inputs()
  - logs_available()
  - outputs()
  - to_dict()
  - to_json()
  - watch()
  - watch_updates()
- [ActionInputs](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/actioninputs/page.md)
  - Parameters
  - Methods
  - clear()
  - copy()
  - fromkeys()
  - get()
  - items()
  - keys()
  - pop()
  - popitem()
  - setdefault()
  - to_dict()
  - to_json()
  - update()
  - values()
- [ActionOutputs](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/actionoutputs/page.md)
  - Parameters
  - Properties
  - Methods
  - to_dict()
  - to_json()
- [App](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/app/page.md)
  - Parameters
  - Properties
  - Methods
  - activate()
  - create()
  - deactivate()
  - delete()
  - ephemeral_ctx()
  - ephemeral_ctx_sync()
  - get()
  - is_active()
  - is_deactivated()
  - listall()
  - replace()
  - to_dict()
  - to_json()
  - update()
  - watch()
- [Project](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/project/page.md)
  - Parameters
  - Methods
  - archive()
  - create()
  - get()
  - listall()
  - to_dict()
  - to_json()
  - unarchive()
  - update()
- [Run](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/run/page.md)
  - Parameters
  - Properties
  - Methods
  - abort()
  - details()
  - done()
  - get()
  - get_debug_url()
  - get_logs()
  - inputs()
  - listall()
  - outputs()
  - show_logs()
  - sync()
  - to_dict()
  - to_json()
  - wait()
  - watch()
- [RunDetails](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/rundetails/page.md)
  - Parameters
  - Properties
  - Methods
  - done()
  - get()
  - get_details()
  - inputs()
  - outputs()
  - to_dict()
  - to_json()
- [Secret](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/secret/page.md)
  - Parameters
  - Properties
  - Methods
  - create()
  - delete()
  - get()
  - listall()
  - to_dict()
  - to_json()
- [Task](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/task/page.md)
  - Parameters
  - Properties
  - Methods
  - get()
  - listall()
  - to_dict()
  - to_json()
- [TaskDetails](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/taskdetails/page.md)
  - Parameters
  - Properties
  - Methods
  - fetch()
  - get()
  - override()
  - to_dict()
  - to_json()
- [TimeFilter](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/timefilter/page.md)
  - Parameters
- [Trigger](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/trigger/page.md)
  - Parameters
  - Properties
  - Methods
  - create()
  - delete()
  - get()
  - get_details()
  - listall()
  - to_dict()
  - to_json()
  - update()
- [User](https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/user/page.md)
  - Parameters
  - Methods
  - get()
  - name()
  - subject()
  - to_dict()
  - to_json()

---
**Source**: https://github.com/unionai/unionai-docs/blob/main/content/api-reference/flyte-sdk/packages/flyte.remote/_index.md
**HTML**: https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/packages/flyte.remote/
