Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/wasdee/konjingjing

thai id validator written in rust
https://github.com/wasdee/konjingjing

Last synced: 2 months ago
JSON representation

thai id validator written in rust

Awesome Lists containing this project

README

        

# konjingjing
A hyper-fast Python module for validating Thai Citizen Card ID written in Rust.

The library name, 'kon-jing-jing' (คนจริงจริง) means 'real person' in Thai.

## Get Started
```bash
$ pip install konjingjing
```

```python
from konjingjing import verify_id

assert verify_id('1112034563562') # true
assert verify_id('1112034563563') == False # false, fail checksum
assert verify_id('11120345635') == False # false digit is less than 13
assert verify_id('1112034563s62') == False # false mix with alpha
```

## Notes 😋
This is my first python library written in rust. This is another weekend project.

![](https://i.imgflip.com/4p243t.jpg)

### Idea-Fork from
1. [one in npm](https://github.com/jukbot/thai-citizen-id-validator)

### Sensei And Inspiration
1. https://www.youtube.com/watch?v=D9r__qxtRMQ
2. https://github.com/mre/hyperjson