Skip to main content

Validador de CUI de Guatemala

Project description

CUI‑GT

Valida el Código Único de Identificación (CUI) de Guatemala desde Python o JavaScript/TypeScript con una sola función.

Repo oficial: https://github.com/aalonzolu/cui-gt


1 · Instalación rápida

Python (≥3.8)

pip install cui-gt   # desde PyPI

JavaScript / TypeScript (Node ≥18)

npm i cui-gt        # o  yarn add cui-gt / pnpm add cui-gt

El nombre del paquete es el mismo en ambos ecosistemas: cui-gt.


2 · Ejemplos de uso

Python

from cui_gt import is_valid_cui

print(is_valid_cui("5486270650101"))   # True o False

JavaScript / TypeScript

import { isValidCui } from "cui-gt";

console.log(isValidCui("5486270650101")); // true / false

3 · Cómo funciona (resumen)

  • Comprueba que el CUI tenga 13 dígitos.
  • Valida que el departamento (01‑22) y municipio existan.
  • Calcula el dígito verificador con módulo 11.

Todo se hace localmente; no se llama a ningún servicio externo.


4 · Contribuir

  1. Haz fork del repo y crea una rama.
  2. Corre pytest (Python) y npm test (JS).
  3. Abre un Pull Request.

5 · Licencia

MIT.

Project details


Download files

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

Source Distribution

cui_gt-0.2.0.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

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

cui_gt-0.2.0-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file cui_gt-0.2.0.tar.gz.

File metadata

  • Download URL: cui_gt-0.2.0.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for cui_gt-0.2.0.tar.gz
Algorithm Hash digest
SHA256 6ebdf606b6aa3e094b16002cf8c6f08a033177ca515f85ddc602b532c1bc719b
MD5 786f1a17aa261cd1040b6960f487193c
BLAKE2b-256 e08d032a69080f5c9242cc906c1d453d5642d0c0c706ccfe3cdfbf37e2d97f28

See more details on using hashes here.

File details

Details for the file cui_gt-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: cui_gt-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for cui_gt-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cfa5c29fe77b3273cefde860faa9b43909f08df727e58681201e1a2bc18d9036
MD5 ca9116c908de81b82578b2e4265f3cf4
BLAKE2b-256 af8bc5c813ff88505cb11525d1a0f80e886eb48a2239ef7c02776316a39d620b

See more details on using hashes here.

Supported by

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