Skip to content

Commit

Permalink
Changing package name
Browse files Browse the repository at this point in the history
  • Loading branch information
anatoliis authored and drudkiewicz committed Jan 11, 2017
1 parent 3da57c6 commit 5f48d38
Show file tree
Hide file tree
Showing 43 changed files with 40 additions and 37 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ securely verify users' identities.

## Example ##

from yoti import Client
from yoti_python_sdk import Client

@app.route('/callback')
def callback():
Expand All @@ -14,7 +14,7 @@ securely verify users' identities.
return activity_details.user_profile

For more details and working [Flask](http://flask.pocoo.org/) and [Django](https://www.djangoproject.com/)
applications see [examples/](https://github.com/lampkicking/yoti-sdk-server-python/tree/development/examples).
applications see [examples/](https://github.com/getyoti/yoti-python-sdk/tree/master/examples).


## The Flow ##
Expand All @@ -28,7 +28,7 @@ For details see [Yoti Developers Docs](https://www.yoti.com/developers/).

## Installation ##

$ pip install yoti
$ pip install yoti-python-sdk

This SDK works with Python 2.6+ and Python 3.3+ .

Expand Down
2 changes: 1 addition & 1 deletion plugins/django_yoti/django_yoti/tests/test_views.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from django.test import TestCase, Client, RequestFactory
from django.http.response import HttpResponse, HttpResponseRedirectBase
from django.contrib.sessions.middleware import SessionMiddleware
from yoti.activity_details import ActivityDetails
from yoti_python_sdk.activity_details import ActivityDetails

from ..views import profile

Expand Down
2 changes: 1 addition & 1 deletion plugins/django_yoti/django_yoti/views.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from yoti import Client
from yoti_python_sdk import Client
from django.shortcuts import render, redirect
from django.urls import reverse

Expand Down
2 changes: 1 addition & 1 deletion plugins/django_yoti/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
yoti>=0.1.0
yoti-python-sdk>=0.1.0
Django>=1.8
2 changes: 1 addition & 1 deletion plugins/django_yoti/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
url='https://github.com/lampkicking/yoti-sdk-server-python/plugins/django_yoti',
author='',
author_email='',
install_requires=['django>=1.8', 'yoti>=0.1.0'],
install_requires=['django>=1.8', 'yoti-python-sdk>=0.1.0'],
classifiers=[
'Development Status :: 3 - Alpha',
'License :: OSI Approved :: MIT License',
Expand Down
2 changes: 1 addition & 1 deletion plugins/flask_yoti/flask_yoti/flask_yoti.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
redirect,
url_for,
)
from yoti import Client
from yoti_python_sdk import Client

from .context_storage import activity_details_storage
from .decorators import yoti_authenticated
Expand Down
2 changes: 1 addition & 1 deletion plugins/flask_yoti/flask_yoti/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from flask_yoti import flask_yoti_blueprint
from flask_yoti.context_processors import yoti_context

from yoti.activity_details import ActivityDetails
from yoti_python_sdk.activity_details import ActivityDetails


@pytest.fixture(scope='module')
Expand Down
2 changes: 1 addition & 1 deletion plugins/flask_yoti/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Flask>=0.10
yoti>=0.1.0
yoti-python-sdk>=0.1.0
2 changes: 1 addition & 1 deletion plugins/flask_yoti/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
url='https://github.com/lampkicking/yoti-sdk-server-python/plugins/flask_yoti',
author='',
author_email='',
install_requires=['flask>=0.10', 'yoti>=0.1.0'],
install_requires=['flask>=0.10', 'yoti-python-sdk>=0.1.0'],
classifiers=[
'Development Status :: 3 - Alpha',
'License :: OSI Approved :: MIT License',
Expand Down
2 changes: 1 addition & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[pytest]
testpaths = yoti/tests
testpaths = yoti_python_sdk/tests
norecursedirs = venv
2 changes: 1 addition & 1 deletion pytest_integration.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[pytest]
testpaths = yoti/tests/integration
testpaths = yoti_python_sdk/tests/integration
python_functions = live_test_*
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
[metadata]
description-file = README.md

[bdist_wheel]
universal=1
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
'application in a secure and trusted way.'

setup(
name='yoti',
name='yoti-python-sdk',
version=VERSION,
packages=find_packages(),
license='OTHER',
Expand Down
2 changes: 1 addition & 1 deletion yoti/__init__.py → yoti_python_sdk/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
from os import environ

from yoti.client import Client
from yoti_python_sdk.client import Client

DEFAULTS = {
'YOTI_API_URL': 'https://api.yoti.com',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from yoti.protobuf.v1.protobuf import Protobuf
from yoti_python_sdk.protobuf.v1.protobuf import Protobuf


class ActivityDetails:
Expand Down
10 changes: 5 additions & 5 deletions yoti/client.py → yoti_python_sdk/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
import requests
from past.builtins import basestring

import yoti
from yoti.activity_details import ActivityDetails
from yoti.crypto import Crypto
from yoti.protobuf.v1 import protobuf
import yoti_python_sdk
from yoti_python_sdk.activity_details import ActivityDetails
from yoti_python_sdk.crypto import Crypto
from yoti_python_sdk.protobuf.v1 import protobuf


NO_KEY_FILE_SPECIFIED_ERROR = 'Please specify the correct private key file ' \
Expand Down Expand Up @@ -68,7 +68,7 @@ def get_activity_details(self, encrypted_request_token):

def __make_request(self, encrypted_request_token):
path = self.__get_request_path(encrypted_request_token)
url = yoti.YOTI_API_ENDPOINT + path
url = yoti_python_sdk.YOTI_API_ENDPOINT + path
headers = self.__get_request_headers(path)
response = requests.get(url=url, headers=headers)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

from cryptography.fernet import base64

import yoti.protobuf.v1.attribute_public_api.list_pb2 as attrpubapi
import yoti.protobuf.v1.common_public_api.encrypted_data_pb2 as compubapi
import yoti_python_sdk.protobuf.v1.attribute_public_api.list_pb2 as attrpubapi
import yoti_python_sdk.protobuf.v1.common_public_api.encrypted_data_pb2 as compubapi


class Protobuf(object):
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions yoti/tests/conftest.py → yoti_python_sdk/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

import pytest

from yoti import Client
from yoti.crypto import Crypto
from yoti_python_sdk import Client
from yoti_python_sdk.crypto import Crypto

FIXTURES_DIR = join(dirname(abspath(__file__)), 'fixtures')
PEM_FILE_PATH = join(FIXTURES_DIR, 'sdk-test.pem')
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from past.builtins import basestring

from yoti.activity_details import ActivityDetails
from yoti_python_sdk.activity_details import ActivityDetails


def live_test_requesting_activity_details_with_correct_data(
Expand Down
2 changes: 1 addition & 1 deletion yoti/tests/mocks.py → yoti_python_sdk/tests/mocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def __init__(self, status_code, text):
self.status_code = status_code
self.text = text

with open('yoti/tests/fixtures/response.txt', 'r') as f:
with open('yoti_python_sdk/tests/fixtures/response.txt', 'r') as f:
response = f.read()
return MockResponse(status_code=200, text=response)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
except ImportError:
import mock

from yoti import YOTI_API_ENDPOINT
from yoti import Client
from yoti.client import NO_KEY_FILE_SPECIFIED_ERROR
from yoti.activity_details import ActivityDetails
from yoti.tests.conftest import YOTI_CLIENT_SDK_ID, PEM_FILE_PATH
from yoti.tests.mocks import (
from yoti_python_sdk import YOTI_API_ENDPOINT
from yoti_python_sdk import Client
from yoti_python_sdk.client import NO_KEY_FILE_SPECIFIED_ERROR
from yoti_python_sdk.activity_details import ActivityDetails
from yoti_python_sdk.tests.conftest import YOTI_CLIENT_SDK_ID, PEM_FILE_PATH
from yoti_python_sdk.tests.mocks import (
mocked_requests_get,
mocked_timestamp,
mocked_uuid4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import pytest

from yoti.crypto import Crypto
from yoti_python_sdk.crypto import Crypto


@pytest.mark.parametrize('invalid_token', [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import pytest
from past.builtins import basestring

from yoti.protobuf.v1 import protobuf
from yoti_python_sdk.protobuf.v1 import protobuf


@pytest.fixture(scope='module')
Expand Down

0 comments on commit 5f48d38

Please sign in to comment.