Skip to content

Commit 89d73e6

Browse files
authored
Merge pull request #25 from getyoti/SDK-303-StructuredPostalAddress
SDK-303 SDK-340: Structured Postal Address
2 parents b226c20 + 5c541c4 commit 89d73e6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+892
-1801
lines changed

CHANGELOG.md

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,36 @@
1-
# Change Log #
2-
1+
# Changelog
32
All notable changes to this project will be documented in this file.
43

5-
The format is based on [Keep a Changelog](http://keepachangelog.com/)
6-
and this project adheres to [Semantic Versioning](http://semver.org/).
4+
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5+
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6+
7+
## [2.2.0] - 2018-03-29
8+
### Added
9+
- IsAgeVerified helper
10+
11+
## [2.1.0] - 2018-03-13
12+
### Added
13+
- AML check functionality
14+
15+
## [2.0.4] - 2017-12-13
16+
### Changed
17+
- location of config file
718

19+
## [2.0.3] - 2017-11-15
20+
### Removed
21+
- tests from package output
22+
23+
## [2.0.2] - 2017-10-17
24+
### Changed
25+
- license to MIT
26+
27+
## [2.0.1] - 2017-10-16
28+
### Changed
29+
- `X-SDK` header to be `X-Yoti-SDK`
30+
31+
## [2.0.0] - 2017-10-09
32+
### Added
33+
- `X-SDK` header to HTTP requests
834

935
## [1.2.0] - 2017-04-20
1036
### Changed

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,10 +236,6 @@ Both example applications utilise the env variables described in [Configuration]
236236
1. Install requirements with `pip install -r requirements.txt`
237237
1. Run: `python app.py`
238238

239-
### Plugins ###
240-
241-
Plugins for both Django and Flask are in the `plugins/` dir. Their purpose is to make it as easy as possible to use the Yoti SDK with those frameworks. See the [Django](/plugins/django_yoti/README.md) and [Flask](/plugins/flask_yoti/README.md) README files for further details.
242-
243239
## Running the Tests
244240

245241
Running the tests is done by the following process, ensuring you are using Python 3.0+:

examples/aml/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import sys
22
from os import environ
3-
from os.path import join, dirname
43

54
from dotenv import load_dotenv
5+
from os.path import join, dirname
66

77
from yoti_python_sdk import Client
88
from yoti_python_sdk import aml
@@ -40,4 +40,4 @@ def cli_exception(exception_type, value, tb):
4040
print("AML Result for {0} {1}:".format(given_names, family_name))
4141
print("On PEP list: " + str(aml_result.on_pep_list))
4242
print("On fraud list: " + str(aml_result.on_fraud_list))
43-
print("On watchlist: " + str(aml_result.on_watch_list))
43+
print("On watchlist: " + str(aml_result.on_watch_list))

examples/yoti_example_django/docker-compose.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,4 @@ services:
88
YOTI_CLIENT_SDK_ID: "${YOTI_CLIENT_SDK_ID}"
99
YOTI_KEY_FILE_PATH: "${YOTI_KEY_FILE_PATH}"
1010
ports:
11-
- "5000:5000"
12-
restart: always
11+
- "5000:5000"

examples/yoti_example_django/yoti_example/templates/index.html

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,17 @@
88
</head>
99

1010
<body>
11-
<!-- Your website content -->
11+
<!-- Your website content -->
1212

13-
<!-- This span will create the Yoti button -->
14-
<span data-yoti-application-id="{{app_id}}">
13+
<!-- This span will create the Yoti button -->
14+
<span data-yoti-application-id="{{app_id}}">
1515
Log in with Yoti
1616
</span>
1717

18-
<!-- This script snippet will also be required in your HTML body -->
19-
<script>
18+
<!-- This script snippet will also be required in your HTML body -->
19+
<script>
2020
_ybg.init()
21-
</script>
21+
22+
</script>
2223
</body>
2324
</html>

examples/yoti_example_django/yoti_example/templates/profile.html

Lines changed: 89 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -5,95 +5,105 @@
55
<title>Yoti Profile</title>
66
</head>
77
<body>
8-
<h3><a href="/">Home</a></h3>
9-
<table>
10-
{% if user_id %}
11-
<tr>
12-
<td>User ID:</td>
13-
<td>{{user_id}}</td>
14-
</tr>
15-
{% endif %}
8+
<h3><a href="/">Home</a></h3>
9+
<table>
10+
{% if user_id %}
11+
<tr>
12+
<td>User ID:</td>
13+
<td>{{user_id}}</td>
14+
</tr>
15+
{% endif %}
1616

17-
{% if base64_selfie_uri %}
18-
<tr>
19-
<td>Selfie in base64 format:</td>
20-
<td><img width="200" alt="base64photo" src="{{base64_selfie_uri}}" /></td>
21-
</tr>
22-
<tr>
23-
<td>Selfie from saved image:</td>
24-
<td><img width="200" alt="saved image" src="/static/YotiSelfie.jpg" /></td>
25-
</tr>
26-
{% endif %}
17+
{% if base64_selfie_uri %}
18+
<tr>
19+
<td>Selfie in base64 format:</td>
20+
<td><img width="200" alt="base64photo" src="{{base64_selfie_uri}}"/></td>
21+
</tr>
22+
<tr>
23+
<td>Selfie from saved image:</td>
24+
<td><img width="200" alt="saved image" src="/static/YotiSelfie.jpg"/></td>
25+
</tr>
26+
{% endif %}
2727

28-
{% if given_names %}
29-
<tr>
30-
<td>Given Names:</td>
31-
<td>{{given_names}}</td>
32-
</tr>
33-
{% endif %}
28+
{% if given_names %}
29+
<tr>
30+
<td>Given Names:</td>
31+
<td>{{given_names}}</td>
32+
</tr>
33+
{% endif %}
3434

35-
{% if family_name %}
36-
<tr>
37-
<td>Family Name:</td>
38-
<td>{{family_name}}</td>
39-
</tr>
40-
{% endif %}
35+
{% if family_name %}
36+
<tr>
37+
<td>Family Name:</td>
38+
<td>{{family_name}}</td>
39+
</tr>
40+
{% endif %}
4141

42-
{% if full_name %}
43-
<tr>
44-
<td>Full Name:</td>
45-
<td>{{full_name}}</td>
46-
</tr>
47-
{% endif %}
42+
{% if full_name %}
43+
<tr>
44+
<td>Full Name:</td>
45+
<td>{{full_name}}</td>
46+
</tr>
47+
{% endif %}
4848

49-
{% if phone_number %}
50-
<tr>
51-
<td>Phone Number:</td>
52-
<td>{{phone_number}}</td>
53-
</tr>
54-
{% endif %}
49+
{% if phone_number %}
50+
<tr>
51+
<td>Phone Number:</td>
52+
<td>{{phone_number}}</td>
53+
</tr>
54+
{% endif %}
5555

56-
{% if date_of_birth %}
57-
<tr>
58-
<td>Date of Birth:</td>
59-
<td>{{date_of_birth}}</td>
60-
</tr>
61-
{% endif %}
56+
{% if date_of_birth %}
57+
<tr>
58+
<td>Date of Birth:</td>
59+
<td>{{date_of_birth}}</td>
60+
</tr>
61+
{% endif %}
6262

63-
{% if is_age_verified is not None %}
64-
<tr>
65-
<td>Age Verified:</td>
66-
<td>{{is_age_verified}}</td>
67-
</tr>
68-
{% endif %}
63+
{% if is_age_verified is not None %}
64+
<tr>
65+
<td>Age Verified:</td>
66+
<td>{{is_age_verified}}</td>
67+
</tr>
68+
{% endif %}
6969

70-
{% if postal_address %}
71-
<tr>
72-
<td>Postal Address:</td>
73-
<td>{{postal_address}}</td>
74-
</tr>
75-
{% endif %}
70+
{% if postal_address %}
71+
<tr>
72+
<td>Postal Address:</td>
73+
<td>{{postal_address}}</td>
74+
</tr>
75+
{% endif %}
7676

77-
{% if email_address %}
78-
<tr>
79-
<td>Email Address:</td>
80-
<td>{{email_address}}</td>
81-
</tr>
82-
{% endif %}
77+
{% if email_address %}
78+
<tr>
79+
<td>Email Address:</td>
80+
<td>{{email_address}}</td>
81+
</tr>
82+
{% endif %}
8383

84-
{% if nationality %}
85-
<tr>
86-
<td>Nationality:</td>
87-
<td>{{nationality}}</td>
88-
</tr>
89-
{% endif %}
84+
{% if nationality %}
85+
<tr>
86+
<td>Nationality:</td>
87+
<td>{{nationality}}</td>
88+
</tr>
89+
{% endif %}
9090

91-
{% if gender %}
92-
<tr>
93-
<td>Gender:</td>
94-
<td>{{gender}}</td>
95-
</tr>
96-
{% endif %}
97-
</table>
91+
{% if gender %}
92+
<tr>
93+
<td>Gender:</td>
94+
<td>{{gender}}</td>
95+
</tr>
96+
{% endif %}
97+
98+
{% if structured_postal_address %}
99+
<td>Structured Postal Address:</td>
100+
{% for key, value in structured_postal_address.items %}
101+
<tr>
102+
<th> {{ key }}</th>
103+
<td> {{ value }}</td>
104+
</tr>
105+
{% endfor %}
106+
{% endif %}
107+
</table>
98108
</body>
99109
</html>

examples/yoti_example_django/yoti_example/views.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from django.views.generic import TemplateView
22
from dotenv import load_dotenv, find_dotenv
3+
34
load_dotenv(find_dotenv())
45

56
from yoti_python_sdk import Client

examples/yoti_example_flask/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# noinspection PyPackageRequirements
22
import os
3-
from os.path import join, dirname
43

54
from dotenv import load_dotenv
65
from flask import Flask, render_template, request
6+
from os.path import join, dirname
77

88
from yoti_python_sdk import Client
99

examples/yoti_example_flask/docker-compose.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,4 @@ services:
88
YOTI_CLIENT_SDK_ID: "${YOTI_CLIENT_SDK_ID}"
99
YOTI_KEY_FILE_PATH: "${YOTI_KEY_FILE_PATH}"
1010
ports:
11-
- "5000:5000"
12-
13-
restart: always
11+
- "5000:5000"

examples/yoti_example_flask/templates/index.html

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,17 @@
88
</head>
99

1010
<body>
11-
<!-- Your website content -->
11+
<!-- Your website content -->
1212

13-
<!-- This span will create the Yoti button -->
14-
<span data-yoti-application-id="{{app_id}}">
13+
<!-- This span will create the Yoti button -->
14+
<span data-yoti-application-id="{{app_id}}">
1515
Log in with Yoti
16-
</span>
16+
</span>
1717

18-
<!-- This script snippet will also be required in your HTML body -->
19-
<script>
18+
<!-- This script snippet will also be required in your HTML body -->
19+
<script>
2020
_ybg.init()
21-
</script>
21+
22+
</script>
2223
</body>
2324
</html>

0 commit comments

Comments
 (0)