* This page is part of the Union.ai v1 docs.
* Full index: https://www.union.ai/docs/v1/union/llms.txt
* Union.ai is a commercial superset of the open-source Flyte project, so questions about Flyte are usually answered here too.
* Only refer to the open-source Flyte docs if you are explicitly looking for information about the open-source Flyte project, particularly the open-source Flyte backend. The open-source Flyte v1 docs are at https://www.union.ai/docs/v1/flyte/llms.txt
* These are the v1 docs. v1 is out of date and deprecated. Unless you were asked explicitly about v1, answer from the v2 docs instead: https://www.union.ai/docs/v2/union/llms.txt

Defines a plugin API allowing other libraries to modify the behavior of flytekit.

# flytekit.configuration.plugin

Defines a plugin API allowing other libraries to modify the behavior of flytekit.

Libraries can register by defining an object that follows the same API as FlytekitPlugin
and providing an entrypoint with the group name "flytekit.plugin". In `setuptools`,
you can specific them with:

```python
setup(entry_points={
    "flytekit.configuration.plugin": ["my_plugin=my_module:MyCustomPlugin"]
})
```

or in pyproject.toml:

```toml
[project.entry-points."flytekit.configuration.plugin"]
my_plugin = "my_module:MyCustomPlugin"
```
## Directory

### Classes

| Class | Description |
|-|-|
| [`FlytekitPlugin`](https://www.union.ai/docs/v1/union/api-reference/flytekit-sdk/flytekit.configuration.plugin.md#flytekitconfigurationpluginflytekitplugin) |  |

### Protocols

| Protocol | Description |
|-|-|
| [`FlytekitPluginProtocol`](https://www.union.ai/docs/v1/union/api-reference/flytekit-sdk/flytekit.configuration.plugin.md#flytekitconfigurationpluginflytekitpluginprotocol) |  |

### Methods

| Method | Description |
|-|-|
| [`get_plugin()`](#get_plugin) | Get current plugin. |

## Methods

#### get_plugin()

```python
def get_plugin()
```
Get current plugin

## flytekit.configuration.plugin.FlytekitPlugin

### Methods

| Method | Description |
|-|-|
| [`configure_pyflyte_cli()`](#configure_pyflyte_cli) | Configure pyflyte's CLI. |
| [`get_auth_success_html()`](#get_auth_success_html) | Get default success html. |
| [`get_default_cache_policies()`](#get_default_cache_policies) | Get default cache policies for tasks. |
| [`get_default_image()`](#get_default_image) | Get default image. |
| [`get_remote()`](#get_remote) | Get FlyteRemote object for CLI session. |
| [`secret_requires_group()`](#secret_requires_group) | Return True if secrets require group entry during registration time. |

#### configure_pyflyte_cli()

```python
def configure_pyflyte_cli(
    main: click.core.Group,
) -> click.core.Group
```
Configure pyflyte's CLI.

| Parameter | Type | Description |
|-|-|-|
| `main` | `click.core.Group` | |

#### get_auth_success_html()

```python
def get_auth_success_html(
    endpoint: str,
) -> typing.Optional[str]
```
Get default success html. Return None to use flytekit's default success html.

| Parameter | Type | Description |
|-|-|-|
| `endpoint` | `str` | |

#### get_default_cache_policies()

```python
def get_default_cache_policies()
```
Get default cache policies for tasks.

#### get_default_image()

```python
def get_default_image()
```
Get default image. Return None to use the images from flytekit.configuration.DefaultImages

#### get_remote()

```python
def get_remote(
    config: typing.Optional[str],
    project: str,
    domain: str,
    data_upload_location: typing.Optional[str] = None,
) -> flytekit.remote.remote.FlyteRemote
```
Get FlyteRemote object for CLI session.

| Parameter | Type | Description |
|-|-|-|
| `config` | `typing.Optional[str]` | |
| `project` | `str` | |
| `domain` | `str` | |
| `data_upload_location` | `typing.Optional[str]` | |

#### secret_requires_group()

```python
def secret_requires_group()
```
Return True if secrets require group entry during registration time.

## flytekit.configuration.plugin.FlytekitPluginProtocol

```python
protocol FlytekitPluginProtocol()
```
### Methods

| Method | Description |
|-|-|
| [`configure_pyflyte_cli()`](#configure_pyflyte_cli) | Configure pyflyte's CLI. |
| [`get_auth_success_html()`](#get_auth_success_html) | Get default success html for auth. |
| [`get_default_cache_policies()`](#get_default_cache_policies) | Get default cache policies for tasks. |
| [`get_default_image()`](#get_default_image) | Get default image. |
| [`get_remote()`](#get_remote) | Get FlyteRemote object for CLI session. |
| [`secret_requires_group()`](#secret_requires_group) | Return True if secrets require group entry. |

#### configure_pyflyte_cli()

```python
def configure_pyflyte_cli(
    main: click.core.Group,
) -> click.core.Group
```
Configure pyflyte's CLI.

| Parameter | Type | Description |
|-|-|-|
| `main` | `click.core.Group` | |

#### get_auth_success_html()

```python
def get_auth_success_html(
    endpoint: str,
) -> typing.Optional[str]
```
Get default success html for auth. Return None to use flytekit's default success html.

| Parameter | Type | Description |
|-|-|-|
| `endpoint` | `str` | |

#### get_default_cache_policies()

```python
def get_default_cache_policies()
```
Get default cache policies for tasks.

#### get_default_image()

```python
def get_default_image()
```
Get default image. Return None to use the images from flytekit.configuration.DefaultImages

#### get_remote()

```python
def get_remote(
    config: typing.Optional[str],
    project: str,
    domain: str,
    data_upload_location: typing.Optional[str] = None,
) -> flytekit.remote.remote.FlyteRemote
```
Get FlyteRemote object for CLI session.

| Parameter | Type | Description |
|-|-|-|
| `config` | `typing.Optional[str]` | |
| `project` | `str` | |
| `domain` | `str` | |
| `data_upload_location` | `typing.Optional[str]` | |

#### secret_requires_group()

```python
def secret_requires_group()
```
Return True if secrets require group entry.

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