Skip to main content

discord-rut-transformer

CI Codecov Documentation Python PyPI

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.

Metadata

Release files for discord-rut-transformer 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for discord-rut-transformer 1.0.1
File Size Uploaded Provenance Actions
discord_rut_transformer-1.0.1.tar.gz 3.8 kB With provenance Details for discord_rut_transformer-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for discord-rut-transformer 1.0.1
File Interpreter ABI Platform Actions
discord_rut_transformer-1.0.1-py3-none-any.whl Python 3 none any Details for discord_rut_transformer-1.0.1-py3-none-any.whl

Total release size: 8.9 kB

Release files / discord_rut_transformer-1.0.1.tar.gz

Download URL discord_rut_transformer-1.0.1.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
4fa85458595d75e1502e8bae57b77f75deb4a2729eb7a639cea0ddf73fa095e6
BLAKE2b-256 checksum
How to use checksums
a8acf7614e32f3a6137f49d0a56e8557656667551716592c2d656a65f0bb071d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 5, 2026.

Transparency log

Release files / discord_rut_transformer-1.0.1-py3-none-any.whl

Download URL discord_rut_transformer-1.0.1-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
886c6753e100f60739008f4bb022dd7fe518711b068f2937a401025907dfab00
BLAKE2b-256 checksum
How to use checksums
b1d34c3b19d8ec5bb1201d2b2083fe67498e6542a11d0291b85fdc4cee96d621
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 5, 2026.

Transparency log

Security for discord-rut-transformer 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for discord_rut_transformer-1.0.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page