Packaged desktop apps
Validate when a PySide, Tkinter, or other packaged Python application starts.
Python software licensing
Add product-scoped license checks to packaged Python apps, command-line tools, and paid plugins with the GrebKey Python SDK. The SDK supplies a machine fingerprint, local validation cache, and configurable offline grace.
Validate when a PySide, Tkinter, or other packaged Python application starts.
Check a product-scoped key before running paid command-line features.
Use the same validation result for Python-based plugins and developer utilities.
This public quickstart covers environment configuration, SDK validation, and the valid plus machine-activated decision. Save it as first_validation.py, provide the three environment variables, and run it where you installed grebkey.
pip install grebkey
import os
from grebkey import GrebKeyClient, GrebKeyError
client = GrebKeyClient(
api_url=os.environ["GREBKEY_API_URL"],
product_id=os.environ["GREBKEY_PRODUCT_ID"],
)
try:
result = client.validate(os.environ["GREBKEY_LICENSE_KEY"])
except GrebKeyError:
print("License validation could not be completed.")
raise SystemExit(1)
if result.valid is not True or result.machine_activated is not True:
print(f"Not licensed: {result.reason or 'machine_not_activated'}")
raise SystemExit(1)
print("Licensed!")
python first_validation.py