Giter VIP home page Giter VIP logo

rest_thai_id_card's Introduction

REST server for fetching information from Thai national ID card

สร้าง REST server เพื่ออ่านค่าจากบัตรประชาชนไทย โดยใช้ Python 3.x This project is reimplemented to read information from Thai national ID card by using Python 3.x.

ผมทดลองCodeของผมบน Windows 10 และใช้ Python 3.7 This project has been tested on Windows 10. In addition, it has been implemented with Python 3.7.

Smartcard reader: https://online.advice.co.th/product/barcode-product/scanner/barcode-scanner-smart-card-reader-scr-n3300-

หาก Advice เห็นว่า Code ส่งเสริมการขายของคุณ ส่งของเล่นสนุกๆมาให้ผมบ้างก็ดีนะครับ :D

Refs:

Dependencies:

  • flask
  • flask_cors
  • pyscard

Quick guide:

  1. main.py ใช้เพื่อดึงข้อมูลและรูปภาพและเขียนลงบน photo.jpeg และ temp.txt run main.py for fetching photo and information from Thai national ID card.

  2. run.bat ใช้เพื่อนการสร้าง REST server run run.bat in CMD for serving REST server

  • /get_status คืนค่าสถานะของเครื่องอ่าน (return the status of smartcard reader)
  • /get_data คืนข้อมูลทุกอย่างบน smartcard (return all text information)
  • /get_photo_byte คืนค่ารูปภาพเป็น bytes (return jpeg photo as bytes)
  • /get_photo_json คืนค่ารูปภาพเป็น array of ints (return jpeg photo as array of integers)

ผมเป็นมือใหม่หากมีข้อสงสัยหรืออยากแนะนำวิธีการเขียนCodeให้ปลอดภัยขึ้นหรือประสิทธิภาพดีขึ้นหรืออยากชวนทำไปทำอะไรสนุกๆติดต่อมาที่ [email protected] ครับ Contact me via email ([email protected])

I hope my code contribute to something new.

Cheers,

PlainFatBoy

Asura Dev Team

rest_thai_id_card's People

Contributors

plainfatboy avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.