Skip to main content

Python için TCKN (TC Kimlik No) ve VKN (Vergi Kimlik No) doğrulama kütüphanesi.

Project description

tcknvkn (Python)

tcknvkn, Türkiye Cumhuriyeti Kimlik Numarası (TCKN) ve Vergi Kimlik Numarası (VKN) doğrulaması için geliştirilmiş hafif bir Python kütüphanesidir.

Bu paket yalnızca algoritmik/format doğrulaması yapar; resmi kurum sorgusu yapmaz.

Kurulum

pip install tcknvkn

Hızlı başlangıç

from tcknvkn import (
    validate_tckn,
    validate_multiple_tckn,
    validate_vkn,
    validate_multiple_vkn,
)

tekil_tckn = validate_tckn("10000000146")
print(tekil_tckn.valid)   # True
print(tekil_tckn.errors)  # []

tekil_vkn = validate_vkn("1000036109")
print(tekil_vkn.valid)    # True

sonuclar = validate_multiple_tckn(["10000000146", "10000000145", "11111111111"])
for sonuc in sonuclar:
    print(sonuc.value, sonuc.valid, sonuc.errors)

API özeti

  • validate_tckn(value: str) -> ValidationResult
  • validate_multiple_tckn(values: list[str]) -> list[ValidationResult]
  • validate_vkn(value: str) -> ValidationResult
  • validate_multiple_vkn(values: list[str]) -> list[ValidationResult]

ValidationResult

from dataclasses import dataclass

@dataclass(frozen=True)
class ValidationResult:
    valid: bool
    value: str
    errors: list[str]

Test çalıştırma

python -m unittest discover -s tests

İlgili bağlantılar

Lisans

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

tcknvkn-1.0.2.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

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

tcknvkn-1.0.2-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file tcknvkn-1.0.2.tar.gz.

File metadata

  • Download URL: tcknvkn-1.0.2.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tcknvkn-1.0.2.tar.gz
Algorithm Hash digest
SHA256 d04939ee8a73950a534708e2f5a576f9b866dcb9b4440246d3bcbbdc93009fcc
MD5 d9bc4b711a2c207fd572af95b29bf835
BLAKE2b-256 8a2ebeeb0e521da3c3afdb2b2568f707e75d503ce051c95c3706254411bf5ba7

See more details on using hashes here.

Provenance

The following attestation bundles were made for tcknvkn-1.0.2.tar.gz:

Publisher: ci.yml on tcknvkn/tcknvkn-python

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

File details

Details for the file tcknvkn-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: tcknvkn-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tcknvkn-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8a67ef897b415bd91f2b9965275b72e23203a200cfdd8d19ae14cba16c90b82d
MD5 81a8322f7fd6b91eb4fcd2e581f9edde
BLAKE2b-256 fa6c93daf41a92c12d6130874988623be132f13231274a7cabacb63e134b4da4

See more details on using hashes here.

Provenance

The following attestation bundles were made for tcknvkn-1.0.2-py3-none-any.whl:

Publisher: ci.yml on tcknvkn/tcknvkn-python

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 Pingdom Monitoring Sentry Error logging StatusPage Status page