Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Regula Document Reader web API Python 3.5+ client

💡 Before you start: if you just want to play with an online demo, visit our playground.

⚠️ NOTE: for some systems, python3 and pip3 commands should be used instead of python and pip.

⚠️ NOTE: If a custom Document Reader endpoint is not specified, demo web API will be used by default. By sending requests to demo Regula Document Reader web API, you agree with our Privacy Policy and License Agreement.

Requirements:

  • installed python 3.5 or higher
  • installed pip

Verify Python and pip versions:

python --version  
> Python 3.8.2
pip --version     
> pip 20.2.1 from /home/user/.local/lib/python3.8/site-packages/pip (python 3.8)

Cloning example:

git clone https://github.com/regulaforensics/DocumentReader-web-python-client.git
cd DocumentReader-web-python-client

Setup project and download dependencies:

pip install -e ./

Running the client with demo Regula Document Reader web API

Execute example:

cd example
python example.py

Running the client with local Regula Document Reader web API installation

Get your free trial here. When you receive the regula.license file, copy it to the example folder. Now you are ready for start!

Follow the instructions to run Regula Document Reader web API. If the instance has been launched successfully, use the following line command to run the example:

cd example
API_BASE_PATH="http://127.0.0.1:8080" python example.py

Output

This sample generates the following text output:

    ---------------------------------------------------------------------------
                   Document Overall Status: not valid
                    Document Number Visual: OO0000000
                       Document Number MRZ: OO0000000
        Validity Of Document Number Visual: 0
           Validity Of Document Number MRZ: 0
              MRZ-Visual values comparison: 1
    ---------------------------------------------------------------------------

Also, it stores portrait and document image images in the current folder. You can modify this example and re-run it to get your own results.