yubico-client
Library for verifying Yubikey One Time Passwords (OTPs)
What it is and what it does
Yubico Client is a Python library that validates one-time passwords (OTPs) generated by Yubico hardware tokens (YubiKeys) using Yubico's validation protocol version 2.0. It wraps HTTP communication with Yubico's API servers, handling OTP verification, retry logic for transient server errors, and SSL certificate validation. The library is designed for developers integrating YubiKey authentication into Python applications.
The package depends only on requests for HTTP communication and offers a simple constructor-based API where you provide a client ID and secret key, then call verify() with an OTP string. It supports querying custom internal validation servers if you run your own infrastructure. However, the project has been abandoned since 2020 with no maintenance activity; it was last tested against Python 3.8 and requests 2.22.0, so compatibility with newer Python versions and dependency versions is unverified.
Use it for:
- Integrate YubiKey two-factor authentication into a Python web application or service.
- Validate OTPs from hardware tokens in a legacy system still running Python 2.7 or early Python 3.
- Build a custom authentication layer that queries Yubico's validation API servers.
- Operate an internal YubiKey validation server and use this client to communicate with it.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Verifies Yubico One Time Passwords (OTPs) using the validation protocol version 2.0, communicating with Yubico's API servers to authenticate hardware tokens.
No, unless you are maintaining legacy code already using this package. The project is abandoned (no releases since 2020-05-21, last commit 2022-09-07) and has not been tested with Python versions beyond 3.8 or requests versions beyond 2.22.0. For new YubiKey integrations, evaluate current Yubico SDKs or maintained authentication libraries. If you must use it, verify compatibility with your Python and dependency versions before deploying.
Install
yubico-client on PyPI
pip
pip install yubico-clientuv
uv add yubico-clientpoetry
poetry add yubico-clientInstalling yubico-client
Before you install
Low install friction with a single runtime dependency (requests). However, the package is in abandoned maintenance status with no releases since 2020-05-21; the last repository commit was 2022-09-07. Use only if you are locked into an existing integration or running legacy systems.
License in practice
Distributed under the BSD 3-Clause License (permissive), which allows commercial and private use with minimal restrictions—you may use, modify, and distribute the code provided you include the original license notice.
Quickstart
pip install yubico-client
from yubico_client import Yubico
client = Yubico(client_id='your_client_id', secret_key='your_secret_key')
result = client.verify('otp_string')
You must obtain a Yubico client ID and secret key from Yubico's developer portal before calling verify().
Verify before relying
- Whether the package works reliably with modern versions of requests beyond 2.22.0 (last tested in 2020).
- Whether Yubico's API servers still accept requests from this client version or if protocol changes have occurred.
- Current compatibility with Python 3.9+ (package was last tested through Python 3.8).
Package facts
| License | BSD (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — requests |
| Maintenance | abandoned — 2,276 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 87,575/month — #13,785 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: yubico_client-1.13.0-py2.py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
PyOTPPyOTP generates and verifies one-time passwords…
permissive · top 1,000 on PyPI
fido2Implements FIDO2 and WebAuthn protocols for…
unclear · top 5,000 on PyPI
django-otpAdds one-time password (OTP) support to Django…
permissive · top 5,000 on PyPI
django-two-factor-authAdds complete two-factor authentication to…
permissive · top 5,000 on PyPI
authyPython client for the Twilio Authy two-factor…
permissive · top 15,000 on PyPI
oathtoolGenerates one-time passwords (TOTP codes) from…
permissive · top 15,000 on PyPI
pyu2fpyu2f provides U2F (Universal 2nd Factor)…
permissive · top 15,000 on PyPI
secure-smtplibProvides secure SMTP subclasses with TLS/SSL…
unclear · top 15,000 on PyPI
django-otp-webauthnAdds WebAuthn Passkey support to Django OTP,…
permissive · top 15,000 on PyPI
vonage-verify-legacyProvides Python bindings for Vonage's legacy…
permissive · top 15,000 on PyPI