# flytekitplugins.perian_job.agent

## Directory

### Classes

| Class | Description |
|-|-|
| [`PerianAgent`](https://www.union.ai/docs/v1/flyte/api-reference/plugins/perian/packages/flytekitplugins.perian_job.agent/page.md#flytekitpluginsperian_jobagentperianagent) | Flyte Agent for executing tasks on PERIAN Job Platform. |
| [`PerianMetadata`](https://www.union.ai/docs/v1/flyte/api-reference/plugins/perian/packages/flytekitplugins.perian_job.agent/page.md#flytekitpluginsperian_jobagentperianmetadata) | Metadata for PERIAN jobs. |

### Variables

| Property | Type | Description |
|-|-|-|
| `PERIAN_API_URL` | `str` |  |

## flytekitplugins.perian_job.agent.PerianAgent

Flyte Agent for executing tasks on PERIAN Job Platform

```python
def PerianAgent()
```
### Methods

| Method | Description |
|-|-|
| [`create()`](#create) | Return a resource meta that can be used to get the status of the task. |
| [`delete()`](#delete) | Delete the task. |
| [`get()`](#get) | Return the status of the task, and return the outputs in some cases. |

#### create()

```python
def create(
    task_template: flytekit.models.task.TaskTemplate,
    inputs: typing.Optional[flytekit.models.literals.LiteralMap],
    output_prefix: typing.Optional[str],
    kwargs,
) -> flytekitplugins.perian_job.agent.PerianMetadata
```
Return a resource meta that can be used to get the status of the task.

| Parameter | Type |
|-|-|
| `task_template` | `flytekit.models.task.TaskTemplate` |
| `inputs` | `typing.Optional[flytekit.models.literals.LiteralMap]` |
| `output_prefix` | `typing.Optional[str]` |
| `kwargs` | ``**kwargs`` |

#### delete()

```python
def delete(
    resource_meta: flytekitplugins.perian_job.agent.PerianMetadata,
    kwargs,
)
```
Delete the task. This call should be idempotent. It should raise an error if fails to delete the task.

| Parameter | Type |
|-|-|
| `resource_meta` | `flytekitplugins.perian_job.agent.PerianMetadata` |
| `kwargs` | ``**kwargs`` |

#### get()

```python
def get(
    resource_meta: flytekitplugins.perian_job.agent.PerianMetadata,
    kwargs,
) -> flytekit.extend.backend.base_agent.Resource
```
Return the status of the task, and return the outputs in some cases. For example, bigquery job
can't write the structured dataset to the output location, so it returns the output literals to the propeller,
and the propeller will write the structured dataset to the blob store.

| Parameter | Type |
|-|-|
| `resource_meta` | `flytekitplugins.perian_job.agent.PerianMetadata` |
| `kwargs` | ``**kwargs`` |

### Properties

| Property | Type | Description |
|-|-|-|
| `metadata_type` |  |  |
| `task_category` |  | task category that the agent supports |

## flytekitplugins.perian_job.agent.PerianMetadata

Metadata for PERIAN jobs

```python
class PerianMetadata(
    job_id: str,
)
```
| Parameter | Type |
|-|-|
| `job_id` | `str` |

### Methods

| Method | Description |
|-|-|
| [`decode()`](#decode) | Decode the resource meta from bytes. |
| [`encode()`](#encode) | Encode the resource meta to bytes. |

#### decode()

```python
def decode(
    data: bytes,
) -> ResourceMeta
```
Decode the resource meta from bytes.

| Parameter | Type |
|-|-|
| `data` | `bytes` |

#### encode()

```python
def encode()
```
Encode the resource meta to bytes.

---
**Source**: https://github.com/unionai/unionai-docs/blob/main/content/api-reference/plugins/perian/packages/flytekitplugins.perian_job.agent.md
**HTML**: https://www.union.ai/docs/v1/flyte/api-reference/plugins/perian/packages/flytekitplugins.perian_job.agent/
