Metadata-Version: 2.4
Name: duo_universal
Version: 2.0.3
Summary: Duo Web SDK for two-factor authentication
Home-page: https://github.com/duosecurity/duo_universal_python
Author: Duo Security, Inc.
Author-email: support@duosecurity.com
License: BSD
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: BSD License
Requires-Python: >=3
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: cryptography>=3.2
Requires-Dist: PyJWT>=2.0
Requires-Dist: pyOpenSSL>=19.0.0
Requires-Dist: requests>=2.22.0
Requires-Dist: wheel>=0.35.1
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Duo Universal Python SDK

[![Build Status](https://github.com/duosecurity/duo_universal_python/workflows/Python%20CI/badge.svg)](https://github.com/duosecurity/duo_universal_python/actions)
[![Issues](https://img.shields.io/github/issues/duosecurity/duo_universal_python)](https://github.com/duosecurity/duo_universal_python/issues)
[![Forks](https://img.shields.io/github/forks/duosecurity/duo_universal_python)](https://github.com/duosecurity/duo_universal_python/network/members)
[![Stars](https://img.shields.io/github/stars/duosecurity/duo_universal_python)](https://github.com/duosecurity/duo_universal_python/stargazers)
[![License](https://img.shields.io/badge/License-View%20License-orange)](https://github.com/duosecurity/duo_universal_python/blob/master/LICENSE)


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 Prompt
* `demo` - An example web application with Duo integrated
* `tests` - 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!

https://duo.com/
