https://github.com/duosecurity/duo_client_python
Python library for interacting with the Duo Auth, Admin, and Accounts APIs
https://github.com/duosecurity/duo_client_python
duo-security mfa python python3
Last synced: 22 days ago
JSON representation
Python library for interacting with the Duo Auth, Admin, and Accounts APIs
- Host: GitHub
- URL: https://github.com/duosecurity/duo_client_python
- Owner: duosecurity
- License: other
- Created: 2012-11-27T15:49:33.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2025-05-13T15:02:04.000Z (23 days ago)
- Last Synced: 2025-05-13T16:25:16.365Z (23 days ago)
- Topics: duo-security, mfa, python, python3
- Language: Python
- Homepage: https://duo.com/docs/
- Size: 642 KB
- Stars: 141
- Watchers: 38
- Forks: 145
- Open Issues: 25
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# Overview
[](https://github.com/duosecurity/duo_client_python/actions)
[](https://github.com/duosecurity/duo_client_python/issues)
[](https://github.com/duosecurity/duo_client_python/network/members)
[](https://github.com/duosecurity/duo_client_python/stargazers)
[](https://github.com/duosecurity/duo_client_python/blob/master/LICENSE)**Auth** - https://www.duosecurity.com/docs/authapi
**Admin** - https://www.duosecurity.com/docs/adminapi
**Accounts** - https://www.duosecurity.com/docs/accountsapi
**Activity** - The activity endpoint is in public preview and subject to change
## Tested Against Python Versions
* 3.7
* 3.8
* 3.9
* 3.10
* 3.11## Requirements
Duo_client_python supports Python 3.7 and higher## TLS 1.2 and 1.3 Support
Duo_client_python uses Python's ssl module and OpenSSL for TLS operations. Python versions 3.7 (and higher) have both TLS 1.2 and TLS 1.3 support.
# Installing
Development:
```
$ git clone https://github.com/duosecurity/duo_client_python.git
$ cd duo_client_python
$ virtualenv .env
$ source .env/bin/activate
$ pip install --requirement requirements.txt
$ pip install --requirement requirements-dev.txt
$ python setup.py install
```System:
Install from [PyPi](https://pypi.org/project/duo-client/)
```
$ pip install duo-client
```# Using
See the `examples` folder for how to use this library.
To run an example query, execute a command like the following from the repo root:
```
$ python examples/report_users_and_phones.py
```# Testing
```
$ nose2Example: `cd tests/admin && nose2`
```# Linting
```
$ flake8
```