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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

discord_rut_transformer-1.0.1.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

discord_rut_transformer-1.0.1-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

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

Hashes for discord_rut_transformer-1.0.1.tar.gz
Algorithm Hash digest
SHA256 4fa85458595d75e1502e8bae57b77f75deb4a2729eb7a639cea0ddf73fa095e6
MD5 0ef07d94020565e3bf7cf32d9660aca9
BLAKE2b-256 a8acf7614e32f3a6137f49d0a56e8557656667551716592c2d656a65f0bb071d

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file discord_rut_transformer-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for discord_rut_transformer-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 886c6753e100f60739008f4bb022dd7fe518711b068f2937a401025907dfab00
MD5 c8c5467e782c9df006168d9485b4655a
BLAKE2b-256 b1d34c3b19d8ec5bb1201d2b2083fe67498e6542a11d0291b85fdc4cee96d621

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 files

1.0.0

2 files

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