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
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
pynitrokey also contains code originating from these projects:
- gnuk by NIIBE Yutaka, GPL-3.0-or-later
- libnitrokey by Nitrokey GmbH, LGPL-3.0-only
- solo1-cli by SoloKeys Developers, Apache-2.0 or MIT
For more information, see the SDPX license headers in each file.
Metadata
Release files for pynitrokey 0.14.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pynitrokey-0.14.0.tar.gz | 156.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pynitrokey-0.14.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 349.1 kB
Release files / pynitrokey-0.14.0.tar.gz
| Download URL | pynitrokey-0.14.0.tar.gz |
|---|---|
| Size | 156.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
438d7a0cf19a718866fc84cfa4c17620bb90419e13952164b3adb9940917a676
|
|
BLAKE2b-256 checksum How to use checksums |
b7dda1a9fa76d776de6461a86c033fdeed4405f920db4929a36cde91c9c703f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 29, 2026.
Transparency logRelease files / pynitrokey-0.14.0-py3-none-any.whl
| Download URL | pynitrokey-0.14.0-py3-none-any.whl |
|---|---|
| Size | 193.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
70aadda254606758c346b26446a6176b86deddfc959870f2f5b69a741d504ed7
|
|
BLAKE2b-256 checksum How to use checksums |
a81004ba1775185e985497afbe910cf5c69040656e29325a7020c3727406302a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 29, 2026.
Transparency log