Skip to main content

Validador de NIT colombiano con detección de patrones sospechosos

Project description

dian-utils

Librería en Python para calcular el dígito de verificación del NIT/RUT según la DIAN en Colombia.

Incluye utilidades para consultar códigos CIIU empaquetados en dian_utils/data/ciiu.json.

Tomado del PDF de la resolución 000114 del 21-12-2020: https://www.dian.gov.co/normatividad/Normatividad/Resoluci%C3%B3n%20000114%20de%2021-12-2020.pdf

Instalación

pip install dian-utils

Pruebas

python -m unittest discover tests

Códigos CIIU

Ejemplos de uso:

from dian_utils import (
    list_ciiu,
    get_ciiu_by_id,
    search_ciiu_by_prefix,
    search_ciiu_by_name,
)

# Listar todo
all_items = list_ciiu()

# Buscar por id exacto
item = get_ciiu_by_id('0111')

# Buscar por prefijo de id
items_pref = search_ciiu_by_prefix('011')

# Buscar por nombre (insensible a acentos y mayúsculas)
items_name = search_ciiu_by_name('cafe')  # encuentra "Cultivo de café"

Licencia

Este proyecto se encuentra bajo la 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

dian_utils-1.0.1.tar.gz (16.8 kB view details)

Uploaded Source

Built Distribution

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

dian_utils-1.0.1-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file dian_utils-1.0.1.tar.gz.

File metadata

  • Download URL: dian_utils-1.0.1.tar.gz
  • Upload date:
  • Size: 16.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for dian_utils-1.0.1.tar.gz
Algorithm Hash digest
SHA256 51cdea25f35e0a69a9585435feef046c6de50e19ef50a61e07943602f80e73dc
MD5 294f658b4b4b1ba65644041c7143fce1
BLAKE2b-256 859a091f1504a102dd440f0bbe4562195f906fceb874e58d5f9f8de9c0e300a3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dian_utils-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for dian_utils-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 435151ac97ebaee666e433f639eaca972854f7a831662b486514c43ae782c948
MD5 5cd157fa94bdd9fe8113020753cd53f9
BLAKE2b-256 cf3de22222eeea6d3a88627e8fe97d868820f3a49e8c647359c0a8794a08f57e

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