Metadata-Version: 2.4
Name: discord-rut-transformer
Version: 1.0.0
Summary: A typed discord.py app-command transformer for validated Chilean RUT values
License-Expression: MIT
License-File: LICENSE.md
Keywords: discord,discord.py,rut,chile,validation
Author: Eli-ezer Reuven Ramirez Ruiz
Author-email: ramirez.ruiz.eliezer.reuven@gmail.com
Requires-Python: >=3.12,<4.0
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: AsyncIO
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Typing :: Typed
Requires-Dist: discord-py (>=2.7.1,<3.0.0)
Requires-Dist: rut-validator (>=1.0.0,<2.0.0)
Project-URL: Changelog, https://github.com/ezer-mackenzie/discord-rut-transformer/blob/main/CHANGELOG.md
Project-URL: Documentation, https://discord-rut-transformer.readthedocs.io/
Project-URL: Issues, https://github.com/ezer-mackenzie/discord-rut-transformer/issues
Project-URL: Repository, https://github.com/ezer-mackenzie/discord-rut-transformer
Description-Content-Type: text/markdown

# discord-rut-transformer

[![CI](https://github.com/ezer-mackenzie/discord-rut-transformer/actions/workflows/ci.yml/badge.svg)](https://github.com/ezer-mackenzie/discord-rut-transformer/actions/workflows/ci.yml)
[![Codecov](https://codecov.io/gh/ezer-mackenzie/discord-rut-transformer/graph/badge.svg)](https://codecov.io/gh/ezer-mackenzie/discord-rut-transformer)
[![Documentation](https://readthedocs.org/projects/discord-rut-transformer/badge/?version=stable)](https://discord-rut-transformer.readthedocs.io/en/stable/)
[![Python](https://img.shields.io/pypi/pyversions/discord-rut-transformer.svg)](https://pypi.org/project/discord-rut-transformer/)
[![PyPI](https://img.shields.io/pypi/v/discord-rut-transformer.svg)](https://pypi.org/project/discord-rut-transformer/)

A small, typed [discord.py](https://discordpy.readthedocs.io/) app-command
transformer that validates Chilean RUT values before your command callback runs.
It is built on [rut-validator](https://pypi.org/project/rut-validator/).

## Installation

```bash
python -m pip install discord-rut-transformer
```

Python 3.12 through 3.14 are supported.

## Quick start

```python
import discord
from discord import app_commands

from discord_rut_transformer import RutOption


class TaxCommands(app_commands.Group):
    @app_commands.command(description="Look up a Chilean RUT")
    async def lookup(
        self,
        interaction: discord.Interaction,
        rut: RutOption,
    ) -> None:
        await interaction.response.send_message(rut.formatted, ephemeral=True)
```

The user enters a string such as `12.345.678-5`; the callback receives a
validated `rut_validator.Rut` object with `formatted`, `hyphenated`,
`normalized`, `body`, and `check_digit` properties. Invalid input raises
`RutTransformError` through discord.py's application-command error flow.

## Documentation

The complete guide, error-handling examples, API reference, and compatibility
policy are available on [Read the Docs](https://discord-rut-transformer.readthedocs.io/).

## Development

```bash
poetry install
poetry run pytest
poetry run ruff format --check .
poetry run ruff check .
poetry run mypy
poetry run mkdocs build --strict
poetry build
```

See [CONTRIBUTING.md](CONTRIBUTING.md) for the complete workflow.

## Stability

The `1.x` series is production/stable and follows Semantic Versioning. Public
imports documented in the API reference remain backward compatible throughout
the major version. See [CHANGELOG.md](CHANGELOG.md) for release notes.

## License

Distributed under the MIT License. See [LICENSE.md](LICENSE.md).

