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.3
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.3.tar.gz | 20.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| duo_universal-2.0.3-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 35.7 kB
Release files / duo_universal-2.0.3.tar.gz
| Download URL | duo_universal-2.0.3.tar.gz |
|---|---|
| Size | 20.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e57b099f03e5739d27dac333a73955e5c542e354b3b23bf9319bed2ed2a72e45
|
|
BLAKE2b-256 checksum How to use checksums |
2d66b4fbfaa211eda3547695c7aae0781d9b462b5e84b4280f4cfa4001dccd27
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.5
|
Release files / duo_universal-2.0.3-py2.py3-none-any.whl
| Download URL | duo_universal-2.0.3-py2.py3-none-any.whl |
|---|---|
| Size | 14.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
2db053553dbac6881c8a0739d44c6190816355acaba1deef182f8338eb2f0f67
|
|
BLAKE2b-256 checksum How to use checksums |
6dfb1b3a03def97052d523ce95cf112f085edb8b86663b5ac5cc7a8edd83ed87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.5
|