Skip to main content

Python tools for Keygen.sh licensing

Project description

keygen_licensing_tools

PyPi Version PyPI pyversions Downloads

gh-actions Code style: black

Some handy tools for the Keygen licensing service. (This is a user contribution, not an official Keygen LLC product. For Keygen software, see here.)

Install with

pip install keygen_licensing_tools

and use as

from keygen_licensing_tools import validate

check_key(
    "software-name",
    account_id="account_id",
    keygen_verify_key="keygen_verify_key",
    product_id="product_id",
    # optionals with default values:
    # refresh_cache_period=timedelta(days=1),
    # cache_age_warning=timedelta(days=3),
    # cache_age_error=timedelta(days=7),
    # expiry_warning=timedelta(days=7),
)

This validates online and offline keys with the given parameters and throws a LicenseError upon failure. It also features nicely formatted warnings and errors when supplying an expired key etc. The keys must be stored either in the environment variable SOFTWARE_NAME_LICENSE_KEY or in the TOML File ~/.local/share/software-name/software-name.toml (with software-name replaced by the actual name).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

keygen_licensing_tools-0.3.1-cp310-cp310-win_amd64.whl (190.7 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

keygen_licensing_tools-0.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (326.9 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

keygen_licensing_tools-0.3.1-cp310-cp310-macosx_10_9_x86_64.whl (281.3 kB view hashes)

Uploaded CPython 3.10 macOS 10.9+ x86-64

keygen_licensing_tools-0.3.1-cp39-cp39-win_amd64.whl (190.1 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

keygen_licensing_tools-0.3.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (326.2 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

keygen_licensing_tools-0.3.1-cp39-cp39-macosx_10_9_x86_64.whl (276.5 kB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

keygen_licensing_tools-0.3.1-cp38-cp38-win_amd64.whl (189.6 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

keygen_licensing_tools-0.3.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (325.8 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

keygen_licensing_tools-0.3.1-cp38-cp38-macosx_10_9_x86_64.whl (285.2 kB view hashes)

Uploaded CPython 3.8 macOS 10.9+ x86-64

keygen_licensing_tools-0.3.1-cp37-cp37m-win_amd64.whl (183.8 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

keygen_licensing_tools-0.3.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (283.4 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

keygen_licensing_tools-0.3.1-cp37-cp37m-macosx_10_9_x86_64.whl (263.2 kB view hashes)

Uploaded CPython 3.7m macOS 10.9+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page