--- id: pyotp version: "2.10.0" license: MIT license_treatment: permissive maintenance: active --- # PyOTP — Python One Time Password Library License: permissive · Maintenance: active · Popularity: top 1,000 on PyPI ## Install pip install pyotp uv add pyotp poetry add pyotp ## Description PyOTP - The Python One-Time Password Library ============================================ PyOTP is a Python library for generating and verifying one-time passwords. It can be used to implement two-factor (2FA) or multi-factor (MFA) authentication methods in web applications and in other systems that require users to log in. Open MFA standards are defined in `RFC 4226 `_ (HOTP: An HMAC-Based One-Time Password Algorithm) and in `RFC 6238 `_ (TOTP: Time-Based One-Time Password Algorithm). PyOTP implements server-side support for both of these standards. Client-side support can be enabled by sending authentication codes to users over SMS or email (HOTP) or, for TOTP, by instructing users to use `Google Authenticator `_, `Authy `_, or another compatible app. Users can set up auth tokens in their apps easily by using their phone camera to scan `otpauth:// `_ QR codes provided by PyOTP. Implementers should read and follow the `HOTP security requirements... ## AI interpretation — verify before relying PyOTP generates and verifies one-time passwords (HOTP and TOTP) for implementing two-factor and multi-factor authentication in web applications and other systems, compatible with Google Authenticator and similar OTP apps. Verdict: PyOTP is a mature, well-maintained library with zero dependencies, permissive licensing, and no known vulnerabilities. It implements RFC-standard HOTP and TOTP algorithms and integrates seamlessly with mainstream authenticator apps. Suitable for production use in authentication systems. [View on SkillFed](https://skillfed.io/packages/pyotp) · [View on PyPI](https://pypi.org/project/pyotp/)