Skip to main content

No project description provided

Project description

django-dreiattest

dreiattest leverages pyttest and integrates it into django. It handles routing, different config options and persistence of tokens and public keys. To use dreiAttest you need to use the corresponing libraries for iOS and Android / Kotlin Multiplatform.

Installation

dreiAttest is available on PyPI and can be installed via $ python -m pip install dreiattest-django.

After the installation make sure to add dreiattest to your INSTALLED_APPS and trigger all migrations with python manage.py migrate dreiattest. Also, you need to register the default endpoints in your urls.py

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', include('dreiattest.urls')),
    ...
]

Usage

In your settings.py, make sure to set the correct Apple AppId as well as the environment you want to test in.


DREIATTEST_APPLE_APPID = '5LVDC4HW22.ch.dreipol.dreiattestTestHost' DREIATTEST_PRODUCTION = False

There are more advanced settings you can find in dreiattest/settings.py

All that's left is to add the signature_required view decorator

from dreiattest.decorators import signature_required


@signature_required()
def demo(request: WSGIRequest):
    return JsonResponse({'foo': 'bar'})

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-dreiattest-0.0.13.tar.gz (9.5 kB view hashes)

Uploaded Source

Built Distribution

django_dreiattest-0.0.13-py2.py3-none-any.whl (13.5 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page