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
10 changes: 10 additions & 0 deletions .claude/settings.local.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"permissions": {
"allow": [
"Bash(git checkout *)",
"Bash(git pull *)",
"Bash(git ls-tree *)",
"Bash(awk '{print $4}')"
]
Comment on lines +3 to +8
}
}
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
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
6 changes: 6 additions & 0 deletions examples/doc_scan/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def create_session():
.with_preset_issuing_country("GBR")
.with_success_url("{url}/success".format(url=YOTI_APP_BASE_URL))
.with_error_url("{url}/error".format(url=YOTI_APP_BASE_URL))
.with_privacy_policy_url("{url}/privacy-policy".format(url=YOTI_APP_BASE_URL))
.build()
)

Expand Down Expand Up @@ -173,5 +174,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" %}
Loading
Loading