pyscard
Smartcard module for Python.
Decision gist · record as of 2026-08-14
Yes, if you need to interact with smartcards. The library is production-stable, actively maintained, has no known vulnerabilities, and supports modern Python versions. Install friction is moderate due to platform-specific dependencies, but prebuilt wheels are available. The copyleft license (LGPLv2+) is standard for this domain and poses no barrier for most use cases.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a smartcard reader device connected to the system; the underlying smartcard subsystem must be installed and running on your platform.
- Medium install friction due to platform-specific wheels and compiled dependencies; however, prebuilt wheels are available for Windows, macOS, and Unix across Python 3.9–3.13, reducing build complexity.
- The package is actively maintained with a recent release.
License · maintenance · safety
copyleft license (copyleft) — Licensed under LGPLv2+, a copyleft license requiring derivative works to be distributed under compatible terms; acceptable for most applications but review required if you plan to distribute proprietary modifications.
last release 2025-10-29 (289 days) · last repo commit 2026-08-01 · 476 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 84,358 downloads/mo, #14,003 on PyPI
Alternatives
Verify before relying
pip install pyscard
import pyscard
# Use pyscard to enumerate and connect to smartcard readers
# See https://pyscard.sourceforge.io/pyscard-framework.html#framework-samples- Whether the package supports NFC/contactless cards or only contact-based smartcards.
- Performance characteristics and latency for high-frequency card operations.
- Compatibility with specific smartcard standards and card types beyond general support.
- Exact API surface and available methods for card communication and data access.
What it is and what it does
pyscard is a Python library that bridges your application to smartcard readers and the cards themselves. It provides both high-level and low-level APIs for reading card data, executing commands, and managing authentication workflows. The library wraps the underlying platform smartcard infrastructure and exposes it through Python, so you can enumerate readers, establish connections, and send commands without dealing directly with system-level card interfaces.
The package is production-stable and actively maintained, supporting Python 3.9 through 3.13 with prebuilt wheels for Windows, macOS, and Unix. Its single runtime dependency is typing_extensions, keeping the footprint minimal. It's useful for applications that need to interact with government ID cards, payment cards, security tokens, or other smartcards.
Use it for
- Read and verify data from government-issued ID cards or passports in identity verification workflows.
- Implement smartcard-based authentication for secure access control or two-factor authentication systems.
- Build payment or banking applications that interact with credit or debit cards.
- Develop security token management tools that communicate with hardware security modules.
- Create diagnostic or testing utilities for smartcard reader hardware and card compatibility validation.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to interact with smartcards.
The library is production-stable, actively maintained, has no known vulnerabilities, and supports modern Python versions. Install friction is moderate due to platform-specific dependencies, but prebuilt wheels are available. The copyleft license (LGPLv2+) is standard for this domain and poses no barrier for most use cases.
Install
pyscard on PyPI
Before you install
Medium install friction due to platform-specific wheels and compiled dependencies; however, prebuilt wheels are available for Windows, macOS, and Unix across Python 3.9–3.13, reducing build complexity. The package is actively maintained with a recent release.
Requires a smartcard reader device connected to the system; the underlying smartcard subsystem must be installed and running on your platform.
License in practice
Licensed under LGPLv2+, a copyleft license requiring derivative works to be distributed under compatible terms; acceptable for most applications but review required if you plan to distribute proprietary modifications.
Quickstart
pip install pyscard
import pyscard
# Use pyscard to enumerate and connect to smartcard readers
# See https://pyscard.sourceforge.io/pyscard-framework.html#framework-samples
Verify before relying
- Whether the package supports NFC/contactless cards or only contact-based smartcards.
- Performance characteristics and latency for high-frequency card operations.
- Compatibility with specific smartcard standards and card types beyond general support.
- Exact API surface and available methods for card communication and data access.
Package facts
| License | copyleft license copyleft |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 1 packagetyping_extensions |
| Maintenance | Actively maintained 289 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 84,358 / month, #14,003 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)Operating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: UnixProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Security |
Evidence: pyscard-2.3.1-cp310-cp310-macosx_10_9_universal2.whl; pyscard-2.3.1-cp310-cp310-win32.whl; pyscard-2.3.1-cp310-cp310-win_amd64.whl; pyscard-2.3.1-cp311-cp311-macosx_10_9_universal2.whl; pyscard-2.3.1-cp311-cp311-win32.whl; pyscard-2.3.1-cp311-cp311-win_amd64.whl; pyscard-2.3.1-cp311-cp311-win_arm64.whl; pyscard-2.3.1-cp312-cp312-macosx_10_13_universal2.whl; pyscard-2.3.1-cp312-cp312-macosx_15_0_x86_64.whl; pyscard-2.3.1-cp312-cp312-win32.whl; pyscard-2.3.1-cp312-cp312-win_amd64.whl; pyscard-2.3.1-cp312-cp312-win_arm64.whl; pyscard-2.3.1-cp313-cp313-macosx_10_13_universal2.whl; pyscard-2.3.1-cp313-cp313-macosx_15_0_x86_64.whl; pyscard-2.3.1-cp313-cp313-win32.whl; pyscard-2.3.1-cp313-cp313-win_amd64.whl; pyscard-2.3.1-cp313-cp313-win_arm64.whl; pyscard-2.3.1-cp39-cp39-macosx_10_9_universal2.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “smartcard reader python”
- pyscardpyscard provides Python bindings to interact with smartcard readers…
- python-pkcs11Provides a high-level Python interface to PKCS#11 (Cryptoki) for…
- kaldi-python-ioReads and writes Kaldi binary archives, alignment files, and neural…
Give your agent the search over MCP, or paste the wish link into any chat.
More Security packages
Provides Python bindings to the FreeDesktop.org Secret Service API for securely storing and retrieving passwords and secrets through GNOME Keyring, KWallet, or KeePassXC.
MSAL for Python handles OAuth2 and OpenID Connect authentication with Microsoft identity services, managing token acquisition, caching, and refresh for applications integrating with Microsoft Entra ID, Microsoft Accounts, and Azure AD B2C.
joserfc implements JOSE standards (JWS, JWE, JWK, JWT, and related RFCs) for signing, encrypting, and managing JSON-based cryptographic tokens in Python.
Authlib provides a complete implementation of OAuth 1.0, OAuth 2.0, and OpenID Connect 1.0 for building both authentication clients and servers, with built-in support for JWS, JWK, JWA, and JWT standards.
Provides low-level CFFI bindings to the official Argon2 password hashing algorithm for use by libraries and applications that need direct access to Argon2 without higher-level abstractions.
ADAL for Python authenticates applications with Azure Active Directory to obtain tokens for accessing Azure AD-protected resources.
Install only if maintaining existing code that already depends on it, and plan a migration.
See also PyKCS11 · pyobjc-framework-CryptoTokenKit · python-pkcs11 · PyRIC · home-assistant-chip-core · adaptive-cards-templating-py · razorpay · microsoft-teams-cards · streamlit-card · spidev