Skip to main content

RUTCL

Libreria en Python para validar, formatear y calcular RUT chileno. Sin dependencias externas.

Instalacion

pip install rutcl

Funciones

validar_rut(rut)

Valida si un RUT es correcto comparando el digito verificador.

from rutcl import validar_rut

validar_rut("12.345.678-5")  # True
validar_rut("12.345.678-9")  # False
validar_rut("60803000-K")    # True (Ministerio de Hacienda)

calcular_dv(rut)

Calcula el digito verificador de un RUT.

from rutcl import calcular_dv

calcular_dv("12345678")   # "5"
calcular_dv("60803000")   # "K"

formatear_rut(rut)

Formatea un RUT con puntos y guion.

from rutcl import formatear_rut

formatear_rut("123456785")  # "12.345.678-5"
formatear_rut("12345678K")  # "12.345.678-K"

limpiar_rut(rut)

Elimina puntos, guiones y espacios de un RUT.

from rutcl import limpiar_rut

limpiar_rut("12.345.678-5")  # "123456785"

Licencia

MIT

Download files

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

Source Distribution

rutcl-0.1.1.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

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

rutcl-0.1.1-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file rutcl-0.1.1.tar.gz.

File metadata

  • Download URL: rutcl-0.1.1.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for rutcl-0.1.1.tar.gz
Algorithm Hash digest
SHA256 88ae6cab9a7945026200418ea197e8d81386902b605fc1c556c58aeabd417d04
MD5 d7c0debd52992a15f994de0ca98d3b40
BLAKE2b-256 2c7991f6b3d273ad5b1e5a267bf05f7969c4e9bb52475b5d35cbb8c9c15d1f52

See more details on using hashes here.

Provenance

The following attestation bundles were made for rutcl-0.1.1.tar.gz:

Publisher: flujodetrabajo.yml on NachoOFC/RUTCL

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

File details

Details for the file rutcl-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: rutcl-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for rutcl-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 eae230ae4a23b53946f0db1e0201c4c3cac19e19d2a7e75a369f0d95d0da06c3
MD5 2e60a1171c3678e4af3467cbf9896b51
BLAKE2b-256 ae4f82b5bf8063be4a2aedf056cfda2173f928115c08549ccf0d21c4f7cd3a11

See more details on using hashes here.

Provenance

The following attestation bundles were made for rutcl-0.1.1-py3-none-any.whl:

Publisher: flujodetrabajo.yml on NachoOFC/RUTCL

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page