Git Product home page Git Product logo

audhiaprilliant / indonesian-id-card-identification Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 5.0 95 KB

API for Indonesian ID card (KTP) identification. It will provide the validity and information about ID card, such as administrative area data, date of birth, age, gender, computerized last digits, etc

Home Page: https://id-card-identification.herokuapp.com/

Dockerfile 0.94% Python 21.08% Jupyter Notebook 77.98%
api ktp indonesia flask python ktp-el

indonesian-id-card-identification's Introduction

API for Indonesia ID Card Identification

Prerequisites

  • Python3 and pip3

How to run this API

  • Open your favourite terminal
  • Install module dependencies pip install -r requirements.txt
  • Export the flask app export FLASK_APP=app.py
  • Run the flask API flask run

Deployment using Docker

Dockerfile is at ./Dockerfile


Request body

{
    "nik": [
        "1234567891234567"
    ],
    "process": "full"
}
  • nik contains list of ID card (KTP)
  • process as method how the ID card information will be returned. You can choose limited for the limited information or full for the rich information

Response API

If you choose limited, the response API will be as the following output

{
    "message": "success",
    "errors": [],    
    "data": {
        "1234567891234567": false
    },
    "summary": {
        "number": 1,
        "number_processed": 1,
        "error": 0,
        "valid": {
            "all_section": 0,
            "section": {
                "length": 1,
                "area": 0,
                "dob": 0,
                "gender": 1,
                "computerized": 1
            }
        }
    }
}

If you choose full, the response API will be as the following output

{
    "message": "success",
    "errors": [],
    "data": {
        "1234567891234567": {
            "data": {
                "length": {
                    "value": "1234567891234567",
                    "valid": true
                },
                "area": {
                    "value": {
                        "province": "None",
                        "district": "None",
                        "subdistrict": "None"
                    },
                    "valid": false
                },
                "dob": {
                    "value": {
                        "dob": "None", 
                        "age": "None"
                    }, 
                    "valid": false
                },
                "gender": {
                    "value": "Woman", 
                    "valid": true
                },
                "computerized": {
                    "value": "4567", 
                    "valid": true
                }
            },
            "valid": false
        }
    },
    "summary": {
        "number": 1,
        "number_processed": 1,
        "error": 0,
        "valid": {
            "all_section": 0,
            "section": {
                "length": 1,
                "area": 0,
                "dob": 0,
                "gender": 1,
                "computerized": 1
            }
        }
    }
}

But, if something error in the process, the following response will appear.

{
    "message": "failed",
    "data": [
        "1234567891234567"
    ]
}

indonesian-id-card-identification's People

Contributors

audhiaprilliant avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.