Duo Universal Python SDK
This SDK allows a web developer to quickly add Duo's interactive, self-service, two-factor authentication to any Python3 web login form. Only Python 3 is 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).
pip3 install duo_universal
Once it's installed, see our developer documentation at https://duo.com/docs/duoweb 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:
python3 -m venv env
source env/bin/activate
Build and install the SDK from source:
pip3 install -r requirements.txt
pip3 install .
Tests
Install the test requirements:
cd tests
pip3 install -r requirements.txt
Then run tests from the test directory:
# Run an individual test file
python3 <test_name>.py
# Run all tests with unittest
python3 -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 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| duo_universal-2.0.1.tar.gz | 15.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| duo_universal-2.0.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 30.4 kB
Release files / duo_universal-2.0.1.tar.gz
| Download URL | duo_universal-2.0.1.tar.gz |
|---|---|
| Size | 15.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
09d51732af1a729acefd8dc5efbc9b31288fc976c4417fe33fd4ae4bb56b90f0
|
|
BLAKE2b-256 checksum How to use checksums |
d692cc5b265b94e35aeeb29b96b6238378be97930fc855ad8745b86bb926e5b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
|
Release files / duo_universal-2.0.1-py2.py3-none-any.whl
| Download URL | duo_universal-2.0.1-py2.py3-none-any.whl |
|---|---|
| Size | 14.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
ad3187f899ca6bafc7e0ee2ecc5d58fe308795bb2a34e845566e8f9aabe52f64
|
|
BLAKE2b-256 checksum How to use checksums |
441ee13340a903f344425cedc54592563db20b9f3139c3f80cdb91d491b2a964
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
|