Metadata-Version: 2.4
Name: rboto-sqs
Version: 0.1.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.1.0
License-File: LICENSE
Summary: rboto: async-only, typed Python client for Amazon SQS, powered by Rust. Alpha preview.
Keywords: rboto,aws,sqs,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/messaging/
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-sqs

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 Amazon SQS**,
powered by Rust. This package contains `SQSClient` and
**23 operations**.

## Installation

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

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

You can also install `rboto-sqs` 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 SQSClient


async def main() -> None:
    client = SQSClient(region="us-east-1")
    response = await client.send_message(
        queue_url="https://sqs.us-east-1.amazonaws.com/123456789012/orders",
        message_body='{"order_id":"123"}',
    )
    print(response.message_id)


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.

## API conventions

- Import the client with `from rboto import SQSClient`.
- 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_sqs.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_sqs.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

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_sqs.types`;
native response definitions are in the package's `_native.pyi`.

| Method | Required arguments | Return type |
|---|---|---|
| [`add_permission`](#add_permission) | <code>queue_url: str</code>, <code>label: str</code>, <code>aws_account_ids: Sequence[str]</code>, <code>actions: Sequence[str]</code> | <code>None</code> |
| [`cancel_message_move_task`](#cancel_message_move_task) | <code>task_handle: str</code> | <code>CancelMessageMoveTaskOutput</code> |
| [`change_message_visibility`](#change_message_visibility) | <code>queue_url: str</code>, <code>receipt_handle: str</code>, <code>visibility_timeout: int</code> | <code>None</code> |
| [`change_message_visibility_batch`](#change_message_visibility_batch) | <code>queue_url: str</code>, <code>entries: Sequence[ChangeMessageVisibilityBatchRequestEntry]</code> | <code>ChangeMessageVisibilityBatchOutput</code> |
| [`create_queue`](#create_queue) | <code>queue_name: str</code> | <code>CreateQueueOutput</code> |
| [`delete_message`](#delete_message) | <code>queue_url: str</code>, <code>receipt_handle: str</code> | <code>None</code> |
| [`delete_message_batch`](#delete_message_batch) | <code>queue_url: str</code>, <code>entries: Sequence[DeleteMessageBatchRequestEntry]</code> | <code>DeleteMessageBatchOutput</code> |
| [`delete_queue`](#delete_queue) | <code>queue_url: str</code> | <code>None</code> |
| [`get_queue_attributes`](#get_queue_attributes) | <code>queue_url: str</code> | <code>GetQueueAttributesOutput</code> |
| [`get_queue_url`](#get_queue_url) | <code>queue_name: str</code> | <code>GetQueueUrlOutput</code> |
| [`list_dead_letter_source_queues`](#list_dead_letter_source_queues) | <code>queue_url: str</code> | <code>ListDeadLetterSourceQueuesOutput</code> |
| [`list_message_move_tasks`](#list_message_move_tasks) | <code>source_arn: str</code> | <code>ListMessageMoveTasksOutput</code> |
| [`list_queue_tags`](#list_queue_tags) | <code>queue_url: str</code> | <code>ListQueueTagsOutput</code> |
| [`list_queues`](#list_queues) | None | <code>ListQueuesOutput</code> |
| [`purge_queue`](#purge_queue) | <code>queue_url: str</code> | <code>None</code> |
| [`receive_message`](#receive_message) | <code>queue_url: str</code> | <code>ReceiveMessageOutput</code> |
| [`remove_permission`](#remove_permission) | <code>queue_url: str</code>, <code>label: str</code> | <code>None</code> |
| [`send_message`](#send_message) | <code>queue_url: str</code>, <code>message_body: str</code> | <code>SendMessageOutput</code> |
| [`send_message_batch`](#send_message_batch) | <code>queue_url: str</code>, <code>entries: Sequence[SendMessageBatchRequestEntry]</code> | <code>SendMessageBatchOutput</code> |
| [`set_queue_attributes`](#set_queue_attributes) | <code>queue_url: str</code>, <code>attributes: dict[QueueAttributeName, str]</code> | <code>None</code> |
| [`start_message_move_task`](#start_message_move_task) | <code>source_arn: str</code> | <code>StartMessageMoveTaskOutput</code> |
| [`tag_queue`](#tag_queue) | <code>queue_url: str</code>, <code>tags: dict[str, str]</code> | <code>None</code> |
| [`untag_queue`](#untag_queue) | <code>queue_url: str</code>, <code>tag_keys: Sequence[str]</code> | <code>None</code> |

## Complete signatures

### add_permission

```python
async def add_permission(
    *,
    queue_url: str,
    label: str,
    aws_account_ids: Sequence[str],
    actions: Sequence[str],
) -> None: ...
```


### cancel_message_move_task

```python
async def cancel_message_move_task(
    *,
    task_handle: str,
) -> CancelMessageMoveTaskOutput: ...
```


### change_message_visibility

```python
async def change_message_visibility(
    *,
    queue_url: str,
    receipt_handle: str,
    visibility_timeout: int,
) -> None: ...
```


### change_message_visibility_batch

```python
async def change_message_visibility_batch(
    *,
    queue_url: str,
    entries: Sequence[ChangeMessageVisibilityBatchRequestEntry],
) -> ChangeMessageVisibilityBatchOutput: ...
```


### create_queue

```python
async def create_queue(
    *,
    queue_name: str,
    attributes: dict[QueueAttributeName, str] | None = None,
    tags: dict[str, str] | None = None,
) -> CreateQueueOutput: ...
```


### delete_message

```python
async def delete_message(
    *,
    queue_url: str,
    receipt_handle: str,
) -> None: ...
```


### delete_message_batch

```python
async def delete_message_batch(
    *,
    queue_url: str,
    entries: Sequence[DeleteMessageBatchRequestEntry],
) -> DeleteMessageBatchOutput: ...
```


### delete_queue

```python
async def delete_queue(
    *,
    queue_url: str,
) -> None: ...
```


### get_queue_attributes

```python
async def get_queue_attributes(
    *,
    queue_url: str,
    attribute_names: Sequence[QueueAttributeName] | None = None,
) -> GetQueueAttributesOutput: ...
```


### get_queue_url

```python
async def get_queue_url(
    *,
    queue_name: str,
    queue_owner_aws_account_id: str | None = None,
) -> GetQueueUrlOutput: ...
```


### list_dead_letter_source_queues

```python
async def list_dead_letter_source_queues(
    *,
    queue_url: str,
    next_token: str | None = None,
    max_results: int | None = None,
) -> ListDeadLetterSourceQueuesOutput: ...
```

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


### list_message_move_tasks

```python
async def list_message_move_tasks(
    *,
    source_arn: str,
    max_results: int | None = None,
) -> ListMessageMoveTasksOutput: ...
```


### list_queue_tags

```python
async def list_queue_tags(
    *,
    queue_url: str,
) -> ListQueueTagsOutput: ...
```


### list_queues

```python
async def list_queues(
    *,
    queue_name_prefix: str | None = None,
    next_token: str | None = None,
    max_results: int | None = None,
) -> ListQueuesOutput: ...
```

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


### purge_queue

```python
async def purge_queue(
    *,
    queue_url: str,
) -> None: ...
```


### receive_message

```python
async def receive_message(
    *,
    queue_url: str,
    attribute_names: Sequence[QueueAttributeName] | None = None,
    message_system_attribute_names: Sequence[MessageSystemAttributeName] | None = None,
    message_attribute_names: Sequence[str] | None = None,
    max_number_of_messages: int | None = None,
    visibility_timeout: int | None = None,
    wait_time_seconds: int | None = None,
    receive_request_attempt_id: str | None = None,
) -> ReceiveMessageOutput: ...
```


### remove_permission

```python
async def remove_permission(
    *,
    queue_url: str,
    label: str,
) -> None: ...
```


### send_message

```python
async def send_message(
    *,
    queue_url: str,
    message_body: str,
    delay_seconds: int | None = None,
    message_attributes: dict[str, MessageAttributeValue] | None = None,
    message_system_attributes: dict[MessageSystemAttributeNameForSends, MessageSystemAttributeValue] | None = None,
    message_deduplication_id: str | None = None,
    message_group_id: str | None = None,
) -> SendMessageOutput: ...
```


### send_message_batch

```python
async def send_message_batch(
    *,
    queue_url: str,
    entries: Sequence[SendMessageBatchRequestEntry],
) -> SendMessageBatchOutput: ...
```


### set_queue_attributes

```python
async def set_queue_attributes(
    *,
    queue_url: str,
    attributes: dict[QueueAttributeName, str],
) -> None: ...
```


### start_message_move_task

```python
async def start_message_move_task(
    *,
    source_arn: str,
    destination_arn: str | None = None,
    max_number_of_messages_per_second: int | None = None,
) -> StartMessageMoveTaskOutput: ...
```


### tag_queue

```python
async def tag_queue(
    *,
    queue_url: str,
    tags: dict[str, str],
) -> None: ...
```


### untag_queue

```python
async def untag_queue(
    *,
    queue_url: str,
    tag_keys: Sequence[str],
) -> None: ...
```


## Links

- [Service guide](https://ferrumio.github.io/rboto/guides/messaging/)
- [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.

