skillfed

yubico-client

Library for verifying Yubikey One Time Passwords (OTPs)

yubico-client v1.13.0 87.6K downloads/30d#13,785 on PyPI83
Permissive license BSD Abandoned released

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-client

uv

uv add yubico-client

poetry

poetry add yubico-client

Installing 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

Development Status :: 4 - BetaEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: System AdministratorsLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2.7Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: Implementation :: PyPyTopic :: SecurityTopic :: Software Development :: Libraries :: Python Modules

Tags

yubikey otp verificationone time password validationyubikey authenticationotp client libraryyubico api integrationhardware token verificationtwo-factor authentication otp
authenticationhardware-tokenabandoned

More Python Modules packages