Skip to content

Commit dfb3929

Browse files
api.rf.com as default example server (#32)
Co-authored-by: GitHub Action <action@github.com>
1 parent d50ddbd commit dfb3929

File tree

2 files changed

+25
-22
lines changed

2 files changed

+25
-22
lines changed

example/README.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22

33
:bulb: Before you start: if you just want to play with an online demo, visit our [playground](https://api.regulaforensics.com).
44

5-
:warning: NOTE: for some systems `python3` and `pip3` commands should be used, instead of `python` and `pip`.
5+
:warning: NOTE: for some systems, `python3` and `pip3` commands should be used instead of `python` and `pip`.
6+
7+
:warning: NOTE: If a custom Document Reader endpoint is not specified, demo web API will be used by default.
8+
By sending requests to demo Regula Document Reader web API,
9+
you agree with our [Privacy Policy](https://api.regulaforensics.com/terms)
10+
and [License Agreement](https://downloads.regulaforensics.com/work/SDK/doc/Eula.pdf).
611

712
Requirements:
813
- installed python 3.5 or higher
@@ -27,31 +32,29 @@ Setup project and download dependencies:
2732
pip install -e ./
2833
```
2934

30-
### Running with local Regula Document Reader web API installation
35+
### Running the client with demo Regula Document Reader web API
3136

32-
Follow [the instructions](https://docs.regulaforensics.com/web/quick-start-guide) to run Regula Document Reader web API.
33-
Assuming you have successfully launched instance, use next line command to run example:
37+
Execute example:
3438
```bash
3539
cd example
3640
python example.py
37-
38-
# If Regula Document Reader web API is running not on localhost, specify host via env variable:
39-
API_BASE_PATH="http://192.168.0.101:8080" python example.py
4041
```
4142

42-
### Running using Regula Document Reader web API test SaaS
43+
### Running the client with local Regula Document Reader web API installation
4344

44-
Get your [free trial here](https://mobile.regulaforensics.com/). You should obtain `regula.license` file.
45-
Copy it to **example** folder. You are ready for running!
45+
Get your [free trial here](https://mobile.regulaforensics.com/). When you receive the `regula.license` file,
46+
copy it to the [example](../example) folder. Now you are ready for start!
47+
48+
Follow [the instructions](https://docs.regulaforensics.com/web-service/quick-start-guide) to run Regula Document Reader web API.
49+
If the instance has been launched successfully, use the following line command to run the example:
4650

47-
Execute example:
4851
```bash
4952
cd example
50-
API_BASE_PATH="https://test-api.regulaforensics.com" python example.py
53+
API_BASE_PATH="http://127.0.0.1:8080" python example.py
5154
```
5255

5356
### Output
54-
This sample generates next text output:
57+
This sample generates the following text output:
5558
```text
5659
---------------------------------------------------------------------------
5760
Document Overall Status: not valid
@@ -62,5 +65,5 @@ This sample generates next text output:
6265
MRZ-Visual values comparison: 1
6366
---------------------------------------------------------------------------
6467
```
65-
Also, it creates [portrait](portrait.jpg) and [document image](document-image.jpg) pictures inside current folder.
66-
Edit on your own [example.py](./example.py), and re-run to see your results.
68+
Also, it stores [portrait](portrait.jpg) and [document image](document-image.jpg) images in the current folder.
69+
You can modify [this example](../example/example.py) and re-run it to get your own results.

regula/documentreader/webclient/gen/configuration.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def __init__(self, host=None,
9090
):
9191
"""Constructor
9292
"""
93-
self._base_path = "http://localhost:8080" if host is None else host
93+
self._base_path = "https://api.regulaforensics.com" if host is None else host
9494
"""Default Base url
9595
"""
9696
self.server_index = 0 if server_index is None and host is None else server_index
@@ -384,17 +384,17 @@ def get_host_settings(self):
384384
:return: An array of host settings
385385
"""
386386
return [
387-
{
388-
'url': "http://localhost:8080/",
389-
'description': "Local on-premise installation",
390-
},
391387
{
392388
'url': "https://api.regulaforensics.com/",
393-
'description': "Regula document reader SaaS",
389+
'description': "Latest stable Regula Document Reader demo endpoint",
394390
},
395391
{
396392
'url': "https://test-api.regulaforensics.com/",
397-
'description': "Regula document reader test SaaS",
393+
'description': "Nightly Regula document reader demo endpoint",
394+
},
395+
{
396+
'url': "http://localhost:8080/",
397+
'description': "Local on-premise installation",
398398
}
399399
]
400400

0 commit comments

Comments
 (0)