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.0.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.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file discord_rut_transformer-1.0.0.tar.gz.

File metadata

  • Download URL: discord_rut_transformer-1.0.0.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.0.tar.gz
Algorithm Hash digest
SHA256 23d2c9bd0d60a69d1ef2afde204bef196d0d79724e9808236c916027e82df71c
MD5 eba5d9401bfb6295ac094ea33f4f2b9f
BLAKE2b-256 8a61cf3aa2c38b49ba45c92540d8a8f79d6752a1b40c70306e7493ed667114f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for discord_rut_transformer-1.0.0.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.0-py3-none-any.whl.

File metadata

File hashes

Hashes for discord_rut_transformer-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e189f0b432cfcf8a1b97dea97f7c7660f1154ec6e20fe91f10455e9d8c9f78a8
MD5 34e5e9af4a5f654b2b4b82039b20eb18
BLAKE2b-256 d6a4de5ec3888446f48f308f72cbdc3304a1a9c41f2e644f835e92f0ed3c2c5c

See more details on using hashes here.

Provenance

The following attestation bundles were made for discord_rut_transformer-1.0.0-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

1.0.1

2 files

This release

1.0.0 This release

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