discord-rut-transformer
A small, typed discord.py app-command transformer that validates Chilean RUT values before your command callback runs. It is built on rut-validator.
Installation
python -m pip install discord-rut-transformer
Python 3.12 through 3.14 are supported.
Quick start
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.
Development
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 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 for release notes.
License
Distributed under the MIT License. See LICENSE.md.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file discord_rut_transformer-1.0.1.tar.gz.
File metadata
- Download URL: discord_rut_transformer-1.0.1.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4fa85458595d75e1502e8bae57b77f75deb4a2729eb7a639cea0ddf73fa095e6
|
|
| MD5 |
0ef07d94020565e3bf7cf32d9660aca9
|
|
| BLAKE2b-256 |
a8acf7614e32f3a6137f49d0a56e8557656667551716592c2d656a65f0bb071d
|
Provenance
The following attestation bundles were made for discord_rut_transformer-1.0.1.tar.gz:
Publisher:
publish.yml on ezer-mackenzie/discord-rut-transformer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
discord_rut_transformer-1.0.1.tar.gz -
Subject digest:
4fa85458595d75e1502e8bae57b77f75deb4a2729eb7a639cea0ddf73fa095e6 - Sigstore transparency entry: 2720302303
- Sigstore integration time:
-
Permalink:
ezer-mackenzie/discord-rut-transformer@4c8b08e7710755f58bd268b52653a37d564de6e6 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/ezer-mackenzie
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4c8b08e7710755f58bd268b52653a37d564de6e6 -
Trigger Event:
release
-
Statement type:
File details
Details for the file discord_rut_transformer-1.0.1-py3-none-any.whl.
File metadata
- Download URL: discord_rut_transformer-1.0.1-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
886c6753e100f60739008f4bb022dd7fe518711b068f2937a401025907dfab00
|
|
| MD5 |
c8c5467e782c9df006168d9485b4655a
|
|
| BLAKE2b-256 |
b1d34c3b19d8ec5bb1201d2b2083fe67498e6542a11d0291b85fdc4cee96d621
|
Provenance
The following attestation bundles were made for discord_rut_transformer-1.0.1-py3-none-any.whl:
Publisher:
publish.yml on ezer-mackenzie/discord-rut-transformer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
discord_rut_transformer-1.0.1-py3-none-any.whl -
Subject digest:
886c6753e100f60739008f4bb022dd7fe518711b068f2937a401025907dfab00 - Sigstore transparency entry: 2720302490
- Sigstore integration time:
-
Permalink:
ezer-mackenzie/discord-rut-transformer@4c8b08e7710755f58bd268b52653a37d564de6e6 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/ezer-mackenzie
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4c8b08e7710755f58bd268b52653a37d564de6e6 -
Trigger Event:
release
-
Statement type: