Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions .github/workflows/sonar.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
name: Sonar Scan
on: [push, pull_request_target]
on: [push, pull_request]

jobs:
sonar:
name: Sonar Scan
runs-on: ubuntu-latest
# always run on push events
# only run on pull_request_target event when pull request pulls from fork repository
if: >
github.event_name == 'push' ||
github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
Expand All @@ -22,7 +17,7 @@ jobs:

- run: pip install -r requirements.txt

- run: pip install -e .[dev]
- run: pip install -e ".[dev]"

- run: pytest --cov=yoti_python_sdk yoti_python_sdk/tests --cov-report=xml:coverage-reports/coverage-new.xml

Expand Down
16 changes: 5 additions & 11 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
name: Unit Tests
on: [push, pull_request_target]
on: [push, pull_request]

jobs:
test:
name: Test (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
# always run on push events
# only run on pull_request_target event when pull request pulls from fork repository
if: >
github.event_name == 'push' ||
github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9, "3.10"]
python-version: [3.9, "3.10","3.11","3.12"]

steps:
- uses: actions/checkout@v2
Expand All @@ -32,10 +27,7 @@ jobs:

examples:
name: Check Examples
runs-on: ubuntu-latest
if: >
github.event_name == 'push' ||
github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
Expand All @@ -46,6 +38,8 @@ jobs:

- run: pip install --upgrade setuptools

- run: pip install -e .

- run: pushd examples/aml && pip install -r requirements.txt && popd

- run: pushd examples/yoti_example_django && pip install --upgrade pip && pip install -r requirements.txt && popd
Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ timestamp = activity_details.timestamp
base64_selfie_uri = activity_details.base64_selfie_uri
```


You can retrieve the anchors, sources and verifiers for each attribute as follows:
```python
given_names_attribute = profile.given_names
Expand Down Expand Up @@ -238,3 +239,4 @@ set LIB=C:\OpenSSL-Win64\lib;%LIB%
set INCLUDE=C:\OpenSSL-Win64\include;%INCLUDE%
```
Where `OpenSSL-Win64` is the location that you have installed OpenSSL to. See [here](https://cryptography.io/en/latest/installation/#building-cryptography-on-windows) for more information.

2 changes: 2 additions & 0 deletions examples/aml/requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
yoti>=2.14.0
python-dotenv>=0.7.1
48 changes: 46 additions & 2 deletions examples/aml/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,46 @@
yoti>=2.13.0
python-dotenv>=0.7.1
#
# This file is autogenerated by pip-compile with python 3.10
# To update, run:
#
# pip-compile --output-file=requirements.txt requirements.in
#
asn1==2.2.0
# via yoti
certifi==2021.10.8
# via requests
cffi==1.15.0
# via cryptography
charset-normalizer==2.0.10
# via requests
cryptography==36.0.1
# via
# pyopenssl
# yoti
deprecated==1.2.10
# via yoti
future==0.18.2
# via yoti
idna==3.3
# via requests
iso8601==0.1.13
# via yoti
protobuf==3.19.3
# via yoti
pycparser==2.21
# via cffi
pyopenssl==21.0.0
# via yoti
python-dotenv==0.19.2
# via -r requirements.in
pytz==2020.4
# via yoti
requests==2.27.1
# via yoti
six==1.16.0
# via pyopenssl
urllib3==1.26.8
# via requests
wrapt==1.13.3
# via deprecated
yoti==2.14.0
# via -r requirements.in
5 changes: 5 additions & 0 deletions examples/doc_scan/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,5 +173,10 @@ def media():
)


@app.route("/privacy-policy")
def privacy_policy():
return render_template("privacy.html")


if __name__ == "__main__":
app.run()
29 changes: 25 additions & 4 deletions examples/doc_scan/requirements.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
flask>=1.1.2
python-dotenv>=0.13.0
yoti>=2.13.0
# Core requirements
flask>=2.2.0
python-dotenv>=0.21.0
# yoti will be installed separately in CI from local source
filetype>=1.0.7
pyopenssl>=19.1.0
pyopenssl>=24.0.0
click>=8.0
future>=1.0.0

# Required for yoti compatibility
deprecated>=1.2.14
iso8601>=1.1.0
pytz>=2025.2ements
flask>=2.2.0
python-dotenv>=0.21.0
yoti>=2.14.0
filetype>=1.0.7
pyopenssl>=24.0.0
click>=8.0
future>=1.0.0

# Required for yoti compatibility
deprecated>=1.2.14
iso8601>=1.1.0
pytz>=2025.2

101 changes: 74 additions & 27 deletions examples/doc_scan/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,34 +1,81 @@
#
# This file is autogenerated by pip-compile
# To update, run:
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# pip-compile --output-file=requirements.txt requirements.in
#
asn1==2.2.0 # via yoti
certifi==2020.4.5.1 # via requests
cffi==1.14.0 # via cryptography
chardet==3.0.4 # via requests
click==7.1.2 # via flask
cryptography==3.2 # via pyopenssl, yoti
deprecated==1.2.10 # via yoti
filetype==1.0.7 # via -r requirements.in
flask==1.1.2 # via -r requirements.in
future==0.18.2 # via yoti
idna==2.9 # via requests
iso8601==0.1.13 # via yoti
itsdangerous==1.1.0 # via flask
jinja2==2.11.2 # via flask
markupsafe==1.1.1 # via jinja2
protobuf==3.11.3 # via yoti
pycparser==2.20 # via cffi
pyopenssl==19.1.0 # via -r requirements.in, yoti
python-dotenv==0.13.0 # via -r requirements.in
requests==2.23.0 # via yoti
six==1.14.0 # via cryptography, protobuf, pyopenssl
urllib3==1.25.9 # via requests
werkzeug==1.0.1 # via flask
wrapt==1.12.1 # via deprecated
yoti==2.13.0 # via -r requirements.in
asn1==2.2.0
# via yoti

blinker==1.9.0
# via flask
certifi==2020.4.5.1
# via requests
cffi==1.17.1
# via cryptography
chardet==3.0.4
# via requests
click==8.1.8
# via
# -r requirements.in
# flask
cryptography==41.0.7

# via
# pyopenssl
# yoti
deprecated>=1.2.14
# via
# -r requirements.in
# yoti
filetype==1.0.7
# via -r requirements.in
flask>=2.2.0
# via -r requirements.in
future>=1.0.0
# via
# -r requirements.in
# yoti
idna==2.9
# via requests
iso8601>=1.1.0
# via
# -r requirements.in
# yoti
itsdangerous==2.2.0
# via flask
jinja2==3.1.6
# via flask
markupsafe==3.0.2
# via
# jinja2
# werkzeug

protobuf==4.21.12
# via yoti
pycparser==2.22
# via cffi
pyopenssl>=24.0.0
# via
# -r requirements.in
# yoti
python-dotenv==1.1.0
# via -r requirements.in
pytz>=2025.2
# via
# -r requirements.in
# yoti
requests>=2.31.0
# via yoti
six>=1.16.0
# via protobuf
urllib3==1.25.9
# via requests
werkzeug==3.1.3
# via flask
wrapt==1.17.2
# via deprecated
# yoti will be installed separately in CI from local source

# The following packages are considered to be unsafe in a requirements file:
# setuptools
10 changes: 10 additions & 0 deletions examples/doc_scan/templates/privacy.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{% include "layout/header.html" %}
<div class="container">
<div class="row pt-4">
<div class="col">
<h1>Privacy Policy</h1>
<p>Demo privacy policy</p>
</div>
</div>
</div>
{% include "layout/footer.html" %}
6 changes: 4 additions & 2 deletions examples/yoti_example_django/requirements.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
django>=3.0.7
django>=4.0.1
django-sslserver>=0.22.0
python-dotenv>=0.7.1
requests>=2.20.0
urllib3>=1.24.2
yoti>=2.13.0
yoti>=2.14.0
six>=1.16.0
cffi>=1.15.0
21 changes: 13 additions & 8 deletions examples/yoti_example_django/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile
# This file is autogenerated by pip-compile with python 3.10
# To update, run:
#
# pip-compile --output-file=requirements.txt requirements.in
Expand All @@ -8,10 +8,14 @@ asgiref==3.4.1
# via django
asn1==2.2.0
# via yoti
backports.zoneinfo==0.2.1
# via django
certifi==2018.4.16
# via requests
cffi==1.14.0
# via cryptography
cffi==1.15.0
# via
# -r requirements.in
# cryptography
chardet==3.0.4
# via requests
cryptography==3.2
Expand All @@ -20,7 +24,7 @@ cryptography==3.2
# yoti
deprecated==1.2.10
# via yoti
django==3.1.12
django==4.0.1
# via
# -r requirements.in
# django-sslserver
Expand All @@ -40,14 +44,15 @@ pyopenssl==18.0.0
# via yoti
python-dotenv==0.8.2
# via -r requirements.in
pytz==2018.4
# via django
pytz==2020.4
# via yoti
requests==2.21.0
# via
# -r requirements.in
# yoti
six==1.11.0
six==1.16.0
# via
# -r requirements.in
# cryptography
# protobuf
# pyopenssl
Expand All @@ -59,7 +64,7 @@ urllib3==1.24.2
# requests
wrapt==1.12.1
# via deprecated
yoti==2.13.0
yoti==2.14.0
# via -r requirements.in

# The following packages are considered to be unsafe in a requirements file:
Expand Down
12 changes: 6 additions & 6 deletions examples/yoti_example_django/yoti_example/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@
1. Import the include() function: from django.conf.urls import url, include
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url
from django.urls import re_path
from django.contrib import admin

from .views import IndexView, AuthView, DynamicShareView, SourceConstraintsView

urlpatterns = [
url(r"^$", IndexView.as_view(), name="index"),
url(r"^yoti/auth/$", AuthView.as_view(), name="auth"),
url(r"^admin/", admin.site.urls),
url(r"^dynamic-share/$", DynamicShareView.as_view(), name="dynamic-share"),
url(
re_path(r"^$", IndexView.as_view(), name="index"),
re_path(r"^yoti/auth/$", AuthView.as_view(), name="auth"),
re_path(r"^admin/", admin.site.urls),
re_path(r"^dynamic-share/$", DynamicShareView.as_view(), name="dynamic-share"),
re_path(
r"^source-constraint/$",
SourceConstraintsView.as_view(),
name="source-constraints",
Expand Down
Loading
Loading