--- id: pyu2f version: "0.1.5" license: Apache 2.0 license_treatment: permissive maintenance: abandoned --- # pyu2f — U2F host library for interacting with a U2F device over USB. License: permissive · Maintenance: abandoned · Downloads: 442.6K/mo ## What it is and what it does pyu2f is a Python library for communicating with U2F (Universal 2nd Factor) security keys over USB. It uses ctypes to call system USB HID APIs directly, avoiding the need for platform-specific compiled libraries. The library implements a U2F stack for signing authentication challenges and supports pluggable authenticators via the SK_SIGNING_PLUGIN environment variable. The package is no longer maintained; its repository is archived and the authors explicitly recommend migrating to python-fido2, which supports the newer FIDO2 standard and provides backward-compatible U2F support. U2F itself is considered an outdated FIDO specification. If you are starting a new project, this library should not be your first choice. Use it for: - Authenticate users with legacy U2F security keys in existing Python applications on Windows, macOS, or Linux. - Integrate U2F device support into a Python authentication system without requiring compiled platform-specific libraries. - Offload U2F signing operations to an external command-line tool via the SK_SIGNING_PLUGIN mechanism. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. pyu2f provides U2F (Universal 2nd Factor) device authentication over USB on Linux, Windows, and macOS using ctypes-based system calls without compiled dependencies. No. The package is abandoned, its repository archived, and the maintainers explicitly recommend python-fido2 instead. U2F is an outdated FIDO spec. Install only if you must maintain legacy code already using pyu2f; for new projects, use python-fido2. ## Install pip install pyu2f uv add pyu2f poetry add pyu2f ## Installing pyu2f Before you install: High install friction due to source distribution only. Maintenance is abandoned as of 2020-10-30; the repository is archived and the maintainers recommend migrating to python-fido2 for FIDO2 support and ongoing security updates. License in practice: Apache 2.0 is permissive; you may use, modify, and distribute this code freely provided you retain license notices and do not hold the authors liable. Quickstart: from pyu2f import model from pyu2f.convenience import authenticator registered_key = model.RegisteredKey(b64_encoded_key) challenge_data = [{'key': registered_key, 'challenge': raw_challenge_data}] api = authenticator.CreateCompositeAuthenticator(origin) response = api.Authenticate(app_id, challenge_data) Requires a U2F-compatible USB device connected to the system; SK_SIGNING_PLUGIN environment variable can optionally redirect signing to an external tool. Verify before relying: - Whether the ctypes-based USB HID calls work reliably on modern versions of Windows, macOS, and Linux kernels. - Current compatibility with modern U2F devices and whether deprecated U2F protocol support poses a security risk in production use. ## Package facts - License: Apache 2.0 (permissive) - Python support: unspecified - Install friction: high - Maintenance: abandoned - Downloads: 442.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags U2F authentication library, USB security key support, two-factor authentication device, FIDO U2F host library, hardware security token python, deprecated, u2f, security-key [View on SkillFed](https://skillfed.io/packages/pyu2f) · [View on PyPI](https://pypi.org/project/pyu2f/)