Metadata-Version: 2.4
Name: rboto-sfn
Version: 0.3.0
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Framework :: AsyncIO
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Programming Language :: Rust
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Dist: rboto==0.3.0
License-File: LICENSE
Summary: rboto: async-only, typed Python client for AWS Step Functions, powered by Rust. Alpha preview.
Keywords: rboto,aws,sfn,asyncio,typing,rust
Home-Page: https://github.com/ferrumio/rboto
Author-email: Leandro Cavalcante Damascena <leandro.damascena@gmail.com>
License-Expression: Apache-2.0
Requires-Python: >=3.12
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Changelog, https://github.com/ferrumio/rboto/releases
Project-URL: Documentation, https://ferrumio.github.io/rboto/guides/application-services/
Project-URL: Homepage, https://ferrumio.github.io/rboto/
Project-URL: Issues, https://github.com/ferrumio/rboto/issues
Project-URL: Repository, https://github.com/ferrumio/rboto

<!-- Generated by rboto-codegen. Edit the descriptor, template, or example source. -->
# rboto-sfn

rboto is an independent project maintained by [Ferrumio](https://github.com/ferrumio).
It is not affiliated with, sponsored by, or endorsed by Amazon Web Services (AWS).

**Preview (Alpha).** rboto is under active development. APIs may change between releases.

rboto provides an **async-only, typed Python client for AWS Step Functions**,
powered by Rust. This package contains `StepFunctionsClient` and
**37 operations**.

## Installation

Requires Python 3.12 or newer and a native wheel for your Python version and platform.

```bash
python -m pip install "rboto[sfn]"
```

You can also install `rboto-sfn` directly; it installs the matching
`rboto` package. Only the selected service is installed.

These are the package names to use when a release is available on your package index.
If your index has no release yet, follow the
[source installation instructions](https://ferrumio.github.io/rboto/getting-started/).

## Usage

Configure credentials through your environment, shared profile, or workload role.
The example uses `us-east-1`; select a region where your service and resources are available.
Resource names, identifiers, input files, and model IDs in the example are placeholders
to replace with your own.

```python
import asyncio

from rboto import StepFunctionsClient


async def main() -> None:
    client = StepFunctionsClient(region="us-east-1")
    response = await client.start_execution(
        state_machine_arn="arn:aws:states:us-east-1:123456789012:stateMachine:example",
        input='{"order_id":"123"}',
    )
    print(response.execution_arn)


if __name__ == "__main__":
    asyncio.run(main())
```

In an application with an event loop, call `await main()` instead of `asyncio.run(main())`.
Reuse the client across calls. Constructing a client does not send a request.
Use `async with` or `await client.aclose()` to close it. Returned streams have
their own `aclose()` and async contexts; see
[client and stream lifetimes](https://ferrumio.github.io/rboto/guides/lifecycle/).

## API conventions

- Import the client with `from rboto import StepFunctionsClient`.
- Every operation is asynchronous: use `await client.method(...)`.
- Operation arguments are keyword-only and use the Python names listed below.
- Structured inputs use typed dictionaries and tagged unions from `rboto_sfn.types`.
- Regular responses expose typed attributes; `response.to_dict()` converts them to a dictionary.
- Event-stream responses may be typed dictionaries containing async iterators. Follow the
  declared return type; consume event streams with `async for`.
- Byte streams are consumed asynchronously. `await stream.read()` buffers the complete body;
  iterate the stream when processing a large response.
- Direct operation calls return one page.
- Use `async for page in client.paginators.method(...)` for supported paginated operations.
  Paginators accept the same typed arguments as the corresponding client method.

- Catch modeled exceptions from `rboto_sfn.exceptions`. Their `error_code`,
  `message`, and `operation_name` identify service failures.

Clients also accept `profile`, `endpoint_url`, or shared `Session` settings.
See [configuration](https://ferrumio.github.io/rboto/guides/configuration/),
[errors](https://ferrumio.github.io/rboto/guides/errors/), and
[streaming](https://ferrumio.github.io/rboto/guides/streaming/).

## Operations

The [operation reference](https://ferrumio.github.io/rboto/reference/sfn/)
documents arguments, nested types, Output fields, errors and pagination.
Method and type docstrings link to their reference pages.

This is the complete operation catalog for this generated package. “Required arguments”
lists arguments without defaults in the Python signature. Service-side conditions may
require additional arguments. Each method links to its complete signature, including
optional arguments. Nested input definitions are in `rboto_sfn.types`;
native response definitions are in the package's `_native.pyi`.

| Method | Required arguments | Return type |
|---|---|---|
| [`create_activity`](#create_activity) | <code>name: str</code> | <code>CreateActivityOutput</code> |
| [`create_state_machine`](#create_state_machine) | <code>name: str</code>, <code>definition: str</code>, <code>role_arn: str</code> | <code>CreateStateMachineOutput</code> |
| [`create_state_machine_alias`](#create_state_machine_alias) | <code>name: str</code>, <code>routing_configuration: Sequence[RoutingConfigurationListItem]</code> | <code>CreateStateMachineAliasOutput</code> |
| [`delete_activity`](#delete_activity) | <code>activity_arn: str</code> | <code>DeleteActivityOutput</code> |
| [`delete_state_machine`](#delete_state_machine) | <code>state_machine_arn: str</code> | <code>DeleteStateMachineOutput</code> |
| [`delete_state_machine_alias`](#delete_state_machine_alias) | <code>state_machine_alias_arn: str</code> | <code>DeleteStateMachineAliasOutput</code> |
| [`delete_state_machine_version`](#delete_state_machine_version) | <code>state_machine_version_arn: str</code> | <code>DeleteStateMachineVersionOutput</code> |
| [`describe_activity`](#describe_activity) | <code>activity_arn: str</code> | <code>DescribeActivityOutput</code> |
| [`describe_execution`](#describe_execution) | <code>execution_arn: str</code> | <code>DescribeExecutionOutput</code> |
| [`describe_map_run`](#describe_map_run) | <code>map_run_arn: str</code> | <code>DescribeMapRunOutput</code> |
| [`describe_state_machine`](#describe_state_machine) | <code>state_machine_arn: str</code> | <code>DescribeStateMachineOutput</code> |
| [`describe_state_machine_alias`](#describe_state_machine_alias) | <code>state_machine_alias_arn: str</code> | <code>DescribeStateMachineAliasOutput</code> |
| [`describe_state_machine_for_execution`](#describe_state_machine_for_execution) | <code>execution_arn: str</code> | <code>DescribeStateMachineForExecutionOutput</code> |
| [`get_activity_task`](#get_activity_task) | <code>activity_arn: str</code> | <code>GetActivityTaskOutput</code> |
| [`get_execution_history`](#get_execution_history) | <code>execution_arn: str</code> | <code>GetExecutionHistoryOutput</code> |
| [`list_activities`](#list_activities) | None | <code>ListActivitiesOutput</code> |
| [`list_executions`](#list_executions) | None | <code>ListExecutionsOutput</code> |
| [`list_map_runs`](#list_map_runs) | <code>execution_arn: str</code> | <code>ListMapRunsOutput</code> |
| [`list_state_machine_aliases`](#list_state_machine_aliases) | <code>state_machine_arn: str</code> | <code>ListStateMachineAliasesOutput</code> |
| [`list_state_machine_versions`](#list_state_machine_versions) | <code>state_machine_arn: str</code> | <code>ListStateMachineVersionsOutput</code> |
| [`list_state_machines`](#list_state_machines) | None | <code>ListStateMachinesOutput</code> |
| [`list_tags_for_resource`](#list_tags_for_resource) | <code>resource_arn: str</code> | <code>ListTagsForResourceOutput</code> |
| [`publish_state_machine_version`](#publish_state_machine_version) | <code>state_machine_arn: str</code> | <code>PublishStateMachineVersionOutput</code> |
| [`redrive_execution`](#redrive_execution) | <code>execution_arn: str</code> | <code>RedriveExecutionOutput</code> |
| [`send_task_failure`](#send_task_failure) | <code>task_token: str</code> | <code>SendTaskFailureOutput</code> |
| [`send_task_heartbeat`](#send_task_heartbeat) | <code>task_token: str</code> | <code>SendTaskHeartbeatOutput</code> |
| [`send_task_success`](#send_task_success) | <code>task_token: str</code>, <code>output: str</code> | <code>SendTaskSuccessOutput</code> |
| [`start_execution`](#start_execution) | <code>state_machine_arn: str</code> | <code>StartExecutionOutput</code> |
| [`start_sync_execution`](#start_sync_execution) | <code>state_machine_arn: str</code> | <code>StartSyncExecutionOutput</code> |
| [`stop_execution`](#stop_execution) | <code>execution_arn: str</code> | <code>StopExecutionOutput</code> |
| [`tag_resource`](#tag_resource) | <code>resource_arn: str</code>, <code>tags: Sequence[Tag]</code> | <code>TagResourceOutput</code> |
| [`test_state`](#test_state) | <code>definition: str</code> | <code>TestStateOutput</code> |
| [`untag_resource`](#untag_resource) | <code>resource_arn: str</code>, <code>tag_keys: Sequence[str]</code> | <code>UntagResourceOutput</code> |
| [`update_map_run`](#update_map_run) | <code>map_run_arn: str</code> | <code>UpdateMapRunOutput</code> |
| [`update_state_machine`](#update_state_machine) | <code>state_machine_arn: str</code> | <code>UpdateStateMachineOutput</code> |
| [`update_state_machine_alias`](#update_state_machine_alias) | <code>state_machine_alias_arn: str</code> | <code>UpdateStateMachineAliasOutput</code> |
| [`validate_state_machine_definition`](#validate_state_machine_definition) | <code>definition: str</code> | <code>ValidateStateMachineDefinitionOutput</code> |

## Complete signatures

### create_activity

```python
async def create_activity(
    *,
    name: str,
    tags: Sequence[Tag] | None = None,
    encryption_configuration: EncryptionConfiguration | None = None,
) -> CreateActivityOutput: ...
```


### create_state_machine

```python
async def create_state_machine(
    *,
    name: str,
    definition: str,
    role_arn: str,
    type: StateMachineType | None = None,
    logging_configuration: LoggingConfiguration | None = None,
    tags: Sequence[Tag] | None = None,
    tracing_configuration: TracingConfiguration | None = None,
    publish: bool | None = None,
    version_description: str | None = None,
    encryption_configuration: EncryptionConfiguration | None = None,
) -> CreateStateMachineOutput: ...
```


### create_state_machine_alias

```python
async def create_state_machine_alias(
    *,
    name: str,
    routing_configuration: Sequence[RoutingConfigurationListItem],
    description: str | None = None,
) -> CreateStateMachineAliasOutput: ...
```


### delete_activity

```python
async def delete_activity(
    *,
    activity_arn: str,
) -> DeleteActivityOutput: ...
```


### delete_state_machine

```python
async def delete_state_machine(
    *,
    state_machine_arn: str,
) -> DeleteStateMachineOutput: ...
```


### delete_state_machine_alias

```python
async def delete_state_machine_alias(
    *,
    state_machine_alias_arn: str,
) -> DeleteStateMachineAliasOutput: ...
```


### delete_state_machine_version

```python
async def delete_state_machine_version(
    *,
    state_machine_version_arn: str,
) -> DeleteStateMachineVersionOutput: ...
```


### describe_activity

```python
async def describe_activity(
    *,
    activity_arn: str,
) -> DescribeActivityOutput: ...
```


### describe_execution

```python
async def describe_execution(
    *,
    execution_arn: str,
    included_data: IncludedData | None = None,
) -> DescribeExecutionOutput: ...
```


### describe_map_run

```python
async def describe_map_run(
    *,
    map_run_arn: str,
) -> DescribeMapRunOutput: ...
```


### describe_state_machine

```python
async def describe_state_machine(
    *,
    state_machine_arn: str,
    included_data: IncludedData | None = None,
) -> DescribeStateMachineOutput: ...
```


### describe_state_machine_alias

```python
async def describe_state_machine_alias(
    *,
    state_machine_alias_arn: str,
) -> DescribeStateMachineAliasOutput: ...
```


### describe_state_machine_for_execution

```python
async def describe_state_machine_for_execution(
    *,
    execution_arn: str,
    included_data: IncludedData | None = None,
) -> DescribeStateMachineForExecutionOutput: ...
```


### get_activity_task

```python
async def get_activity_task(
    *,
    activity_arn: str,
    worker_name: str | None = None,
) -> GetActivityTaskOutput: ...
```


### get_execution_history

```python
async def get_execution_history(
    *,
    execution_arn: str,
    max_results: int | None = None,
    reverse_order: bool | None = None,
    next_token: str | None = None,
    include_execution_data: bool | None = None,
) -> GetExecutionHistoryOutput: ...
```

Also available as `client.paginators.get_execution_history(...)`, returning an
async iterator of the response type above.


### list_activities

```python
async def list_activities(
    *,
    max_results: int | None = None,
    next_token: str | None = None,
) -> ListActivitiesOutput: ...
```

Also available as `client.paginators.list_activities(...)`, returning an
async iterator of the response type above.


### list_executions

```python
async def list_executions(
    *,
    state_machine_arn: str | None = None,
    status_filter: ExecutionStatus | None = None,
    max_results: int | None = None,
    next_token: str | None = None,
    map_run_arn: str | None = None,
    redrive_filter: ExecutionRedriveFilter | None = None,
) -> ListExecutionsOutput: ...
```

Also available as `client.paginators.list_executions(...)`, returning an
async iterator of the response type above.


### list_map_runs

```python
async def list_map_runs(
    *,
    execution_arn: str,
    max_results: int | None = None,
    next_token: str | None = None,
) -> ListMapRunsOutput: ...
```

Also available as `client.paginators.list_map_runs(...)`, returning an
async iterator of the response type above.


### list_state_machine_aliases

```python
async def list_state_machine_aliases(
    *,
    state_machine_arn: str,
    next_token: str | None = None,
    max_results: int | None = None,
) -> ListStateMachineAliasesOutput: ...
```


### list_state_machine_versions

```python
async def list_state_machine_versions(
    *,
    state_machine_arn: str,
    next_token: str | None = None,
    max_results: int | None = None,
) -> ListStateMachineVersionsOutput: ...
```


### list_state_machines

```python
async def list_state_machines(
    *,
    max_results: int | None = None,
    next_token: str | None = None,
) -> ListStateMachinesOutput: ...
```

Also available as `client.paginators.list_state_machines(...)`, returning an
async iterator of the response type above.


### list_tags_for_resource

```python
async def list_tags_for_resource(
    *,
    resource_arn: str,
) -> ListTagsForResourceOutput: ...
```


### publish_state_machine_version

```python
async def publish_state_machine_version(
    *,
    state_machine_arn: str,
    revision_id: str | None = None,
    description: str | None = None,
) -> PublishStateMachineVersionOutput: ...
```


### redrive_execution

```python
async def redrive_execution(
    *,
    execution_arn: str,
    client_token: str | None = None,
) -> RedriveExecutionOutput: ...
```


### send_task_failure

```python
async def send_task_failure(
    *,
    task_token: str,
    error: str | None = None,
    cause: str | None = None,
) -> SendTaskFailureOutput: ...
```


### send_task_heartbeat

```python
async def send_task_heartbeat(
    *,
    task_token: str,
) -> SendTaskHeartbeatOutput: ...
```


### send_task_success

```python
async def send_task_success(
    *,
    task_token: str,
    output: str,
) -> SendTaskSuccessOutput: ...
```


### start_execution

```python
async def start_execution(
    *,
    state_machine_arn: str,
    name: str | None = None,
    input: str | None = None,
    trace_header: str | None = None,
) -> StartExecutionOutput: ...
```


### start_sync_execution

```python
async def start_sync_execution(
    *,
    state_machine_arn: str,
    name: str | None = None,
    input: str | None = None,
    trace_header: str | None = None,
    included_data: IncludedData | None = None,
) -> StartSyncExecutionOutput: ...
```


### stop_execution

```python
async def stop_execution(
    *,
    execution_arn: str,
    error: str | None = None,
    cause: str | None = None,
) -> StopExecutionOutput: ...
```


### tag_resource

```python
async def tag_resource(
    *,
    resource_arn: str,
    tags: Sequence[Tag],
) -> TagResourceOutput: ...
```


### test_state

```python
async def test_state(
    *,
    definition: str,
    role_arn: str | None = None,
    input: str | None = None,
    inspection_level: InspectionLevel | None = None,
    reveal_secrets: bool | None = None,
    variables: str | None = None,
    state_name: str | None = None,
    mock: MockInput | None = None,
    context: str | None = None,
    state_configuration: TestStateConfiguration | None = None,
) -> TestStateOutput: ...
```


### untag_resource

```python
async def untag_resource(
    *,
    resource_arn: str,
    tag_keys: Sequence[str],
) -> UntagResourceOutput: ...
```


### update_map_run

```python
async def update_map_run(
    *,
    map_run_arn: str,
    max_concurrency: int | None = None,
    tolerated_failure_percentage: float | None = None,
    tolerated_failure_count: int | None = None,
) -> UpdateMapRunOutput: ...
```


### update_state_machine

```python
async def update_state_machine(
    *,
    state_machine_arn: str,
    definition: str | None = None,
    role_arn: str | None = None,
    logging_configuration: LoggingConfiguration | None = None,
    tracing_configuration: TracingConfiguration | None = None,
    publish: bool | None = None,
    version_description: str | None = None,
    encryption_configuration: EncryptionConfiguration | None = None,
) -> UpdateStateMachineOutput: ...
```


### update_state_machine_alias

```python
async def update_state_machine_alias(
    *,
    state_machine_alias_arn: str,
    description: str | None = None,
    routing_configuration: Sequence[RoutingConfigurationListItem] | None = None,
) -> UpdateStateMachineAliasOutput: ...
```


### validate_state_machine_definition

```python
async def validate_state_machine_definition(
    *,
    definition: str,
    type: StateMachineType | None = None,
    severity: ValidateStateMachineDefinitionSeverity | None = None,
    max_results: int | None = None,
) -> ValidateStateMachineDefinitionOutput: ...
```


## Links

- [Service guide](https://ferrumio.github.io/rboto/guides/application-services/)
- [Repository](https://github.com/ferrumio/rboto)
- [Issues](https://github.com/ferrumio/rboto/issues)
- [Releases](https://github.com/ferrumio/rboto/releases)

Licensed under Apache-2.0.

