Skip to main content

Introduction

This package provides a plugin for pyHanko’s PDF signing CLI. The implementation is a very thin convenience wrapper around the PKCS#11 functionality included within the “core” pyHanko library.

It used to be part of pyHanko’s core feature set until version 0.22.0 for historical reasons.

Installation

Assuming you are installing with pip, running pip install pyhanko-beid-plugin will install both pyHanko and the plugin. If you already have a working pyHanko install, take care to ensure that the plugin is installed in the same Python environment.

PyHanko makes use of Python’s package entry point mechanism to discover plugins, so installing both side-by-side should suffice. To test whether everything works, run pyhanko sign addsig and verify that beid appears in the list of subcommands.

Installation troubleshooting

If you’re having issues getting the plugin autodection to work, you can also add the following snippet to your PyHanko configuration file:

plugins:
  - pyhanko_beid.cli:BEIDPlugin

This will work as long as you ensure that pyhanko_beid is importable.

Signing a PDF file using a Belgian eID card

To sign a PDF file using your eID card and pyHanko’s CLI (with this plugin), use the beid subcommand to addsig, with the --lib parameter to tell pyHanko where to look for the eID PKCS#11 library.

On Linux, it is named libbeidpkcs11.so and can usually be found under /usr/lib or /usr/local/lib. On macOS, it is named libbeidpkcs11.dylib, and can similarly be found under /usr/local/lib. The Windows version is typically installed to C:\Windows\System32 and is called beidpkcs11.dll.

On Linux, this boils down to the following:

pyhanko sign addsig --field Sig1 beid \
    --lib /path/to/libbeidpkcs11.so input.pdf output.pdf

On all platforms, the eID middleware will prompt you to enter your PIN to create the signature.

Release files for pyhanko-beid-plugin 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyhanko-beid-plugin 0.2.0
File Size Uploaded
pyhanko_beid_plugin-0.2.0.tar.gz 6.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyhanko-beid-plugin 0.2.0
File Interpreter ABI Platform
pyhanko_beid_plugin-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.6 kB

Release files / pyhanko_beid_plugin-0.2.0.tar.gz

Download URL pyhanko_beid_plugin-0.2.0.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
fa92931f9a1f6c7050195c0869cef916d14107f8f1cdfe17837d858660689771
BLAKE2b-256 checksum
How to use checksums
abb8e3aa86c2ae0cb776d8932860ed0742d89e2ed05cae5f6b6f46044acd1974
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 30, 2025.

Transparency log

Release files / pyhanko_beid_plugin-0.2.0-py3-none-any.whl

Download URL pyhanko_beid_plugin-0.2.0-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f747020654129f718e7995f5d202141fa3fd2e76895a1c44a95d264b8e57f13e
BLAKE2b-256 checksum
How to use checksums
f8d62b8423d18825b85fa28289e9d4f10b5d98998a0819d6b4201f2bc3265aa8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 30, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page