Skip to main content

keyright (Python)

Python client SDK for Keyright — offline and online software-license validation with full parity to the .NET reference client and the language-independent spec (docs/license-format.md).

Install

pip install keyright

Offline validation (full client)

from keyright import KeyrightClient, KeyrightOptions

client = KeyrightClient.initialize(KeyrightOptions(
    product="nebula",
    public_key_base64=EMBEDDED_PUBLIC_KEY,          # base64 SubjectPublicKeyInfo
    # optional: additional_public_keys_base64=[...],  key rotation (FR-22)
    # optional: revocation_list_json=...,             offline revocation (FR-44)
))

info, source = client.validate()
if info.is_valid:
    print(info.status_badge, info.entitlements.is_enabled("advanced"))

Features: license-source precedence (explicit string/file, KEYRIGHT_LICENSE env, config, default path), node-locking (FR-31/32), entitlements (FR-60, is_enabled/get_limit), key rotation (FR-22), offline revocation lists (FR-44), trials from first activation + clock-tamper detection (FR-50/52), and localized messages (message(verdict, locale)).

Online activation

info = client.activate("LIC-....")   # verifies + caches a signed lease; offline until the grace window ends

Stateless verify (no node-lock/state)

from keyright import verify, message
verdict = verify(license_dict, public_key_b64, expected_product="nebula")  # "valid" | "expired" | ...
print(message(verdict, "fr"))

CLI

keyright-verify <license.json> <pubkey-b64-file> <now-iso> [product] [locale]

Metadata

Release files for keyright 1.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 keyright 1.2.0
File Size Uploaded Provenance Actions
keyright-1.2.0.tar.gz 28.7 kB Without provenance Details for keyright-1.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 55.2 kB

Release files / keyright-1.2.0.tar.gz

Download URL keyright-1.2.0.tar.gz
Size 28.7 kB
Tags Source
SHA-256 checksum
How to use checksums
2f7cdf68a77c018cc2877bc2234cfc0c33661bafbad353b64274553849f2cd53
BLAKE2b-256 checksum
How to use checksums
11bb79bd18852e70d6d24f975c12882fbf710bb8eced892fd73df195020796bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / keyright-1.2.0-py3-none-any.whl

Download URL keyright-1.2.0-py3-none-any.whl
Size 26.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
47dd18c92530f821941be8ef742332788181a460ceec36e981edb11e2e644ad1
BLAKE2b-256 checksum
How to use checksums
9871f40403e74ae367925ba7a4d83ed79d4b74de1c059eb5993b7f0cf7ba02eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Security for keyright 1.2.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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