
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
The Nitrokey Python SDK can be used to use and configure Nitrokey devices.
The SDK supports these devices and features:
nitrokey.nk3
)nitrokey.trussed.admin_app
)nitrokey.trussed.provisioner_app
)nitrokey.nk3.secrets_app
)nitrokey.nkpk
)nitrokey.trussed.admin_app
)nitrokey.trussed.provisioner_app
)The Nitrokey Python SDK is released to the Python Package Index (PyPI) and can be installed with pip
:
$ pip install nitrokey
The releases are also available as signed tags in the GitHub repository Nitrokey/nitrokey-sdk-py.
from nitrokey.nk3 import NK3
from nitrokey.nkpk import NKPK
print("Connected Nitrokey devices:")
for device in NK3.list():
print(f"- {device.name} at {device.path}")
for device in NKPK.list():
print(f"- {device.name} at {device.path}")
The Nitrokey Python SDK currently requires Python 3.9.2 or later. Support for old Python versions may be dropped in minor releases.
The following software is required for the development of the SDK:
After checking out the source code from GitHub, you can install the SDK and its dev dependencies into a new virtual environment managed by poetry using make install
:
$ git clone https://github.com/Nitrokey/nitrokey-sdk-py.git
$ cd nitrokey-sdk-py
$ make install
We use multiple checks and linters for this project.
Use make check
to run all required checks.
Some problems can automatically be fixed by running make fix
.
The SDK also includes minimal tests to ensure that it is installed and loaded correctly.
Use make test
to run these tests.
We use poetry for dependency management.
poetry maintains a lockfile with pinned dependency versions that is used for development environments and in CI.
This lockfile includes the hash of the pyproject.toml
file, so it needs to be updated if pyproject.toml
is changed.
These make targets can be used to invoke poetry for the most common tasks:
make install
installs the SDK and its dependencies as specified in the lockfile (must be up-to-date)make lock
updates the lockfile without changing pinned dependency versionsmake update
bumps all dependencies, installs them and updates the lockfileFor more information, see poetry’s documentation on Managing depencies and Commands.
Releases are published using Github Actions. To create a new release:
version
field in pyproject.toml
manually or using poetry version
.make update-version
to update the RPM package version.main
.full.yaml
workflow for the release branch to run the full compatibility tests.v
prefix, for example v0.2.4
, and push it to this repository.All commits to main
are automatically deployed to TestPyPI.
It is also possible to publish release candidates (pre-releases) with a suffix like -rc.1
.
This software is fully open source.
All software, unless otherwise noted, is dual licensed under Apache 2.0 and MIT. You may use the software under the terms of either the Apache 2.0 license or MIT license.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
FAQs
Nitrokey Python SDK
We found that nitrokey demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.