skillfed

pyscard

Smartcard module for Python.

pyscard v2.3.1 84.4K downloads/30d#14,003 on PyPI476
Copyleft license Active released

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

pyscard provides Python bindings to interact with smartcard readers and cards, enabling applications to read, write, and authenticate using physical smartcards.

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

pip

pip install pyscard

uv

uv add pyscard

poetry

poetry add pyscard

Installing pyscard

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.

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

Requires a smartcard reader device connected to the system; the underlying smartcard subsystem must be installed and running on your platform.

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 not declared (copyleft)
Python support supports the current Python release (>=3.9)
Install friction medium — platform-specific wheel
Runtime dependencies 1 — typing_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)

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

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

Tags

smartcard reader pythonsmart card librarypython smartcard interfacecard reader integrationsmartcard authenticationpython chip card supporthardware security token
smartcard-hardwareauthentication

More Security packages