Skip to main content

Guatemalan CUI and NIT validators

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.9)

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.1.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.1.0-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cui_gt-0.1.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.1.0.tar.gz
Algorithm Hash digest
SHA256 b8c1dc28e0050f269e574c5ce40bbb7d9bca1951195807bbd40f9fe0d2fdbf0c
MD5 8c10d38f479742dca6fb414327a4c37a
BLAKE2b-256 f40878225f39e8f42f829146115b738c4de079966f877b9e2ca429523fe82be3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cui_gt-0.1.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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c276fcb519eab741b0c295769773d8053da3cbf4555f88c39b911a062f26a0cb
MD5 e1ba4465851471162bb3587126363fb1
BLAKE2b-256 a802b09cd1886c11b61e316cb33e88e9b13fd13add7763ed36fd7d88aed07643

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