Skip to main content

pynitrokey

A command line interface for the Nitrokey FIDO2, Nitrokey Start, Nitrokey 3 and NetHSM.

Quickstart

$ pipx install pynitrokey
$ nitropy --help

Documentation

The user documentation for the nitropy CLI is available on docs.nitrokey.com. See also the product documentation for more information on the available commands:

Switching Nitrokey Start identities

Alternative MI switching method

pynitrokey installation is not always possible, hence describing below alternative method to change the Identity on the Nitrokey Start. It suffices to have any CCID application installed, and send the following APDU 00 85 00 {ID} (hex), where ID is in range [0;2]. After receiving this command Nitrokey Start will reboot with the selected identity.

Here is how to do it using GnuPG:

# Setting ID to 2
$ gpg-connect-agent --hex "scd apdu  00 85 00 02" /bye
ERR 65539 Unknown version in packet <Unspecified source>

# Alternative error messsage
ERR 65572 Bad certificate <Unspecified source>

The error message here is expected due to immediate reboot of the device, and with losing the connection.

When the ID change is attempted to be done immediately, the following response could be received:

ERR 100663406 Card removed <SCD>

To restore the communication, either kill the gpg-agent or run gpg --card-status again.

Tip: alternative gpg-connect-agent reloadagent /bye is not sufficient.

Compatibility

nitropy requires Python 3.11 or later.

Development

Information for developers and contributors can be found in the Developer Guide.

Contributors

pynitrokey development has been supported by these contributors:

Maintainers

Current maintainers can be found in MAINTAINERS.md file.

License

pynitrokey is licensed under either of

at your option.

pynitrokey also contains code originating from these projects:

For more information, see the SDPX license headers in each file.

Metadata

Release files for pynitrokey 0.15.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 pynitrokey 0.15.0
File Size Uploaded Provenance Actions
pynitrokey-0.15.0.tar.gz 157.3 kB With provenance Details for pynitrokey-0.15.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pynitrokey 0.15.0
File Interpreter ABI Platform Actions
pynitrokey-0.15.0-py3-none-any.whl Python 3 none any Details for pynitrokey-0.15.0-py3-none-any.whl

Total release size: 351.6 kB

Release files / pynitrokey-0.15.0.tar.gz

Download URL pynitrokey-0.15.0.tar.gz
Size 157.3 kB
Tags Source
SHA-256 checksum
How to use checksums
9a38253a38c22cf64606406aa5f71b4acc5bae78b07fcd4e10a15859e7791162
BLAKE2b-256 checksum
How to use checksums
863bc00f2c99230ec2beb018af955c291cf392096528c4df45c678090646ff7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 24, 2026.

Transparency log

Release files / pynitrokey-0.15.0-py3-none-any.whl

Download URL pynitrokey-0.15.0-py3-none-any.whl
Size 194.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
01f3cdaf41415b210c146bad8c218c991384e91c52b0e815c568ac8d05af1f0e
BLAKE2b-256 checksum
How to use checksums
1ffee825ca4fe6c95f2bdaae2a3059d3d1a2cd92f72dfb0caa8f7cda399cad30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 24, 2026.

Transparency log

Security for pynitrokey 0.15.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pynitrokey-0.15.0.tar.gz

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 Nov 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.15.0 This release

2 release files Full provenance

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