# flytekit.models.concurrency

## Directory

### Classes

| Class | Description |
|-|-|
| [`ConcurrencyLimitBehavior`](https://www.union.ai/docs/v1/union/api-reference/flytekit-sdk/packages/flytekit.models.concurrency/page.md#flytekitmodelsconcurrencyconcurrencylimitbehavior) |  |
| [`ConcurrencyPolicy`](https://www.union.ai/docs/v1/union/api-reference/flytekit-sdk/packages/flytekit.models.concurrency/page.md#flytekitmodelsconcurrencyconcurrencypolicy) | Defines the concurrency policy for a launch plan. |

## flytekit.models.concurrency.ConcurrencyLimitBehavior

### Methods

| Method | Description |
|-|-|
| [`enum_to_string()`](#enum_to_string) |  |

#### enum_to_string()

```python
def enum_to_string(
    val,
)
```
| Parameter | Type | Description |
|-|-|-|
| `val` |  | |

**Returns:** Text

## flytekit.models.concurrency.ConcurrencyPolicy

Defines the concurrency policy for a launch plan.

### Parameters

```python
class ConcurrencyPolicy(
    max_concurrency: int,
    behavior: flytekit.models.concurrency.ConcurrencyLimitBehavior,
)
```
| Parameter | Type | Description |
|-|-|-|
| `max_concurrency` | `int` | |
| `behavior` | `flytekit.models.concurrency.ConcurrencyLimitBehavior` | |

### Properties

| Property | Type | Description |
|-|-|-|
| `behavior` | `None` | Policy behavior when concurrency limit is reached. |
| `is_empty` | `None` |  |
| `max_concurrency` | `None` | Maximum number of concurrent workflows allowed. |

### Methods

| Method | Description |
|-|-|
| [`from_flyte_idl()`](#from_flyte_idl) |  |
| [`serialize_to_string()`](#serialize_to_string) |  |
| [`short_string()`](#short_string) |  |
| [`to_flyte_idl()`](#to_flyte_idl) |  |

#### from_flyte_idl()

```python
def from_flyte_idl(
    pb2_object: flyteidl.admin.launch_plan_pb2.ConcurrencyPolicy,
) -> ConcurrencyPolicy
```
| Parameter | Type | Description |
|-|-|-|
| `pb2_object` | `flyteidl.admin.launch_plan_pb2.ConcurrencyPolicy` | |

**Returns:** ConcurrencyPolicy

#### serialize_to_string()

```python
def serialize_to_string()
```
#### short_string()

```python
def short_string()
```
**Returns:** Text

#### to_flyte_idl()

```python
def to_flyte_idl()
```
**Returns:** flyteidl.admin.launch_plan_pb2.ConcurrencyPolicy

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