Skip to main content

OBytes Django OTP App

Build & Test pypi license downloads python docs health-check

OTP is a Django app to conduct Web-based one true pairing, for authentication, registration and changing phone number.

Quick start

  1. Install ob_dj_otp latest version pip install ob_dj_otp

  2. Add "ob_dj_otp" to your INSTALLED_APPS setting like this:

   # settings.py
   INSTALLED_APPS = [
        ...
        "ob_dj_otp.core.otp",
   ]
  1. Include the OTP URLs in your project urls.py like this::
    # urls.py
    path("otp/", include("ob_dj_otp.apis.otp.urls")),
  1. Run python manage.py migrate to create the otp models.

Configuration

OTP_FORCE_CODE Force using this code instead of generating random one, by default it's not setted

OTP_RETURN_USAGE Boolean that determine whether you want to usage in the response, by default is False

OTP_TIMEOUT Number of seconds for the code expirations, by default it's 3 minuts

OTP_USER_SERIALIZER For the registration purpuse, you need to specify th path to you user serializer so you can create the user with full data

OTP_AUTH_USAGE_ONLY Boolean that deactivate the registration

OTP_EMAIL_AS_PRIMARY_FIELD Boolean to make email required

OTP_PHONE_NUMBER_AS_PRIMARY_FIELD Boolean to make phone number required

SERIALIZERS_MIXIN Dict contain mixins paths to customize serializers behavior ( see tests for better overview)

Notifications

Since each project need it custom provider, the notification part should be sone on the project level not the package level, and it can be done easely but post_save on OneTruePairing model.

Developer Guide

  1. Clone github repo git clone [url]

  2. pipenv install --dev

  3. pre-commit install

  4. Run unit tests pytest

Metadata

Release files for ob-dj-otp 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ob-dj-otp 0.1.1
File Size Uploaded
ob-dj-otp-0.1.1.tar.gz 55.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ob-dj-otp 0.1.1
File Interpreter ABI Platform
ob_dj_otp-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 75.2 kB

Release files / ob-dj-otp-0.1.1.tar.gz

Download URL ob-dj-otp-0.1.1.tar.gz
Size 55.7 kB
Tags Source
SHA-256 checksum
How to use checksums
5f645101deeea99e43bfb52aeffcbe10975e082a344fe60418f27a77fa633bdc
BLAKE2b-256 checksum
How to use checksums
30ba5c838507387e18598a378019656ac0671e0abe02df24dc4d77a982f6a010
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / ob_dj_otp-0.1.1-py3-none-any.whl

Download URL ob_dj_otp-0.1.1-py3-none-any.whl
Size 19.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
435494634a463cafb8d8ebac3f1721c541645fb4b33c0940cc68ee6e32b594da
BLAKE2b-256 checksum
How to use checksums
525263ddb5d97f9a9c2581362b4b516a4283cdd0534a1773108acf848f771535
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

0.0.27

2 release files

0.0.26

2 release files

0.0.23

2 release files

0.0.22

2 release files

0.0.20

2 release files

0.0.19

2 release files

0.0.17

2 release files

0.0.16

2 release files

0.0.14

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.3

2 release files

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page