skillfed

duo-client

Reference client for Duo Security APIs

duo-client v5.6.1 600.2K downloads/30d#5,822 on PyPI150
Permissive license BSD Active released

What it is and what it does

Duo-client is the official Python reference implementation for Duo Security's cloud-based authentication and identity management APIs. It provides a unified interface to interact with Duo's Auth API (for authentication flows), Admin API (for user and device management), Accounts API (for account configuration), and Activity API (currently in public preview). The library handles HTTP communication, request signing, and response parsing, abstracting away the low-level details of Duo's REST endpoints.

The package is designed for developers integrating Duo's two-factor authentication or identity services into Python applications—whether for building custom authentication workflows, managing users and devices programmatically, or querying activity logs. It supports Python 3.7 and higher, uses TLS 1.2/1.3 via Python's ssl module and OpenSSL, and has minimal dependencies, making it straightforward to add to existing projects.

Use it for:

  • Build custom authentication flows by integrating Duo's Auth API into a web application or service.
  • Automate user and device provisioning by managing Duo accounts programmatically via the Admin API.
  • Query and audit authentication activity and user behavior through the Activity API.
  • Implement multi-factor authentication for internal tools or third-party integrations.
  • Sync user directories or device inventories with Duo's backend via bulk Admin API operations.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Python client library for Duo Security's authentication, admin, accounts, and activity APIs, enabling integration with Duo's two-factor authentication and identity management services.

Yes. Duo-client is actively maintained, has low install friction, carries no known vulnerabilities, and is the official library for Duo Security integration. Install it if you need to integrate Duo authentication or identity management into a Python application. The activity endpoint is in public preview, so verify its stability for your use case if you plan to rely on it.

Install

duo-client on PyPI

pip

pip install duo-client

uv

uv add duo-client

poetry

poetry add duo-client

Installing duo-client

Before you install

Low install friction with a single pure-Python dependency (setuptools). Actively maintained with a recent release 169 days ago and ongoing repository activity. Tested against Python 3.7 through 3.12.

License in practice

BSD permissive license allows use in both open-source and proprietary projects with minimal restrictions.

Quickstart

pip install duo-client

import duo_client

# Example: initialize an Admin API client
admin_api = duo_client.Admin(
    ikey='your_integration_key',
    skey='your_secret_key',
    host='api-xxxxxxxx.duosecurity.com'
)

Requires valid Duo Security API credentials (integration key, secret key, and API host) to authenticate with Duo's services.

Verify before relying

  • Whether the activity endpoint preview is stable enough for production use, given its documented 'subject to change' status.
  • Performance characteristics and rate-limiting behavior for high-volume API calls.
  • Whether all four API modules (Auth, Admin, Accounts, Activity) are equally mature and production-ready.

Package facts

License BSD (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 1 — setuptools
Maintenance actively maintained — 169 days since the last release
Last repo commit
First released
Downloads 600,207/month — #5,822 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: duo_client-5.6.1-py3-none-any.whl

License :: OSI Approved :: BSD LicenseProgramming Language :: Python

Tags

duo security api clienttwo-factor authentication integrationduo admin api pythonduo auth api clientidentity management apiduo accounts apimfa integration library
authenticationmfaidentity-management

More Security packages