--- id: duo-client version: "5.6.1" license: BSD license_treatment: permissive maintenance: active --- # duo-client — Reference client for Duo Security APIs License: permissive · Maintenance: active · Downloads: 600.2K/mo ## 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 above — 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 pip install duo-client uv add duo-client 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: unspecified - Install friction: low - Maintenance: active - Downloads: 600.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags duo security api client, two-factor authentication integration, duo admin api python, duo auth api client, identity management api, duo accounts api, mfa integration library, authentication, mfa, identity-management [View on SkillFed](https://skillfed.io/packages/duo-client) · [View on PyPI](https://pypi.org/project/duo-client/)