Thai Citizen ID validation library
Project description
konjingjing
Thai Citizen ID validation library for Python (Rust-powered).
The library name 'kon-jing-jing' (คนจริงจริง) means 'real person' in Thai.
Installation
pip install konjingjing
Or with uv:
uv add konjingjing
Usage
Verify ID
from konjingjing import verify_id
assert verify_id('1112034563562') # Valid
assert not verify_id('1112034563563') # Invalid checksum
assert not verify_id('11120345635') # Too short
Extract ID Meaning
from konjingjing import get_id_meaning
result = get_id_meaning('1101700230703')
# {
# 'person_type_code': 1,
# 'person_type_description': 'คนไทยที่แจ้งเกิดภายในกำหนด',
# 'person_type_description_en': 'Thai citizen, birth registered on time',
# 'province_code': 10,
# 'province_name_th': 'กรุงเทพมหานคร',
# 'province_name_en': 'Bangkok',
# 'amphoe_code': 1017,
# 'amphoe_name': 'ห้วยขวาง',
# 'is_valid': True
# }
get_id_meaning('invalid') # None
License
ISC
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
konjingjing-1.0.0.tar.gz
(30.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file konjingjing-1.0.0.tar.gz.
File metadata
- Download URL: konjingjing-1.0.0.tar.gz
- Upload date:
- Size: 30.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d16843549d67599d7b9d146945fe05d7d6d57ed564206646c0ec6791d07286b
|
|
| MD5 |
6c9e85ef10e495d46f9a3ffdadd71203
|
|
| BLAKE2b-256 |
c90d0d28d4f0acd85b98d7bd287a5609b25e377957a454770a2f22936f92029c
|
File details
Details for the file konjingjing-1.0.0-cp39-abi3-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: konjingjing-1.0.0-cp39-abi3-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 222.7 kB
- Tags: CPython 3.9+, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.10.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4aa13270a262d22cafa4a9deda5888a104c1887a66a25c4ecfb6be03c3cb6c5
|
|
| MD5 |
90ffa52a6180c528f1305f01df6d4ad3
|
|
| BLAKE2b-256 |
a7d7872ceb4fee8b971c5b770640f3cc2117a11b5d96776e8fae31d2cf4f3026
|