Duo Universal Python SDK
This SDK allows a web developer to quickly add Duo's interactive, self-service, two-factor authentication to any Python web login form. Both Python 2 and Python 3 are supported.
What's here:
duo_universal- The Python Duo SDK for interacting with the Duo Universal Promptdemo- An example web application with Duo integratedtests- Test cases
Getting Started
To use the SDK in your existing development environment, install it from pypi (https://pypi.org/project/duo_universal).
pip install duo_universal
Once it's installed, see our developer documentation at https://duo.com/docs/duoweb-v4 and demo/app.py in this repo for guidance on integrating Duo 2FA into your web application.
Contribute
To contribute, fork this repo and make a pull request with your changes when they're ready.
If you're not already working from a dedicated development environment, it's recommended a virtual environment is used. Assuming a virtual environment named env, create and activate the environment:
# Python 3
python -m venv env
source env/bin/activate
# Python 2
virtualenv env
source env/bin/activate
Build and install the SDK from source:
pip install -r requirements.txt
pip install .
Tests
Install the test requirements:
cd tests
pip install -r requirements.txt
Then run tests from the test directory:
# Run an individual test file
python <test_name>.py
# Run all tests with nose
nose2
# Run all tests with unittest
python -m unittest
Lint
flake8
Support
Please report any bugs, feature requests, or issues to us directly at support@duosecurity.com.
Thank you for using Duo!
Metadata
Release files for duo-universal 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| duo_universal-1.0.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Release files / duo_universal-1.0.1-py2.py3-none-any.whl
| Download URL | duo_universal-1.0.1-py2.py3-none-any.whl |
|---|---|
| Size | 14.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
d614de1a7cf13f804a4f5c72a3b57f0fbcf3d64aacd1377654db63ab0a2cfe20
|
|
BLAKE2b-256 checksum How to use checksums |
36d50b996b5bdb46a1df573f9d60890b61d292494e301fa64a8c002b71a757e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.0 requests/2.22.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6
|