💡 Before you start: if you just want to play with an online demo, visit our playground.
python3
and pip3
commands should be used instead of python
and pip
.
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 ./
Execute example:
cd example
python example.py
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
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.