Desktop / Web access controls
Current SDK 2.2.0 supports desktop, web and both access policies. Business can restrict each software plan; Starter and Pro allow both apps under one App ID. Set up your applications and migrate safely. This release is verified in its package registry.
New to licensing?
Build a Python desktop or web app, step by step. Start with one successful export, then add shared seats, credits and self-service. Download the project files.
Release status
SDK 2.2.0 supports the current required-fingerprint API, signed floating leases and online idempotent usage credits. Published in its package registry.
Download SDK ZIP · GitHub source · Package registry
Install Python once
Use Python 3.14 from python.org for the easiest new setup. The SDK supports 3.11–3.14. Installing Python and installing the SDK are different steps. The old Python 3.9 supplied by macOS developer tools cannot run the current SDK.
- Windows: install Python 3.14 with its Python launcher. Open PowerShell from the Start menu.
py -3.14 --versionshould print Python 3.14.x. - macOS: open the Python 3.14
.pkgfrom python.org. Open Terminal from Applications → Utilities.python3.14 --versionshould print Python 3.14.x. If the command is not found, use/Library/Frameworks/Python.framework/Versions/3.14/bin/python3.14instead. If HTTPS certificates fail, run the Python installation's Install Certificates.command; do not disable TLS verification. - Linux: use your distribution's supported Python 3.11–3.14, with its
venvand Tk packages if you want the desktop demo. Checkpython3 --versionfirst. A machine without a graphical desktop cannot display the Tk window.
The package name for pip is kdpika-licensing; the Python import is kdpika_licensing. pip installs libraries; it is not a second application you need to register for. You do not need a PyPI account, payment card or management API key to install this public SDK. Internet access is needed for the first installation and activation.
Easiest route: open the desktop demo
Download the Python demo ZIP, extract it completely, and keep all files together. Do not run files from inside the ZIP. The project version 1.1.0 is different from its tested SDK 2.0.1 version.
- macOS: double-click Start Demo.command. If it has no execute permission, open Terminal in the extracted folder and run
sh "Start Demo.command". - Windows: double-click Start Demo.bat. If Python is not installed, install it using the previous step and try again.
- Linux: open a terminal in the extracted folder and run
sh start-demo.sh.
The launcher finds supported Python, creates .demo-venv beside the files and installs the tested SDK there only. The first start needs a short wait and shows its progress. Later starts reuse the environment. Do not use sudo pip, change system Python, edit common.py, paste secrets into commands, or export environment variables for the desktop demo.
In the window, paste App ID from KDPika → Products, choose Test ([Sandbox](/docs/v1/start/glossary#sandbox)), paste a real Sandbox license and its matching customer email, then choose Activate license. A normal software plan must include csv_export. Choose Export CSV to write a real file. [Live](/docs/v1/start/glossary#live) uses Live licenses and needs a workspace with Live access. Switching the dropdown does not convert a Sandbox license into a Live license or take a payment.
Only the App ID and environment are remembered by the demo settings. The SDK keeps private installation/token state separately. Never share that state folder. Full dashboard walkthrough.
Install the SDK in your own project
Use this route when adding licensing to your own code, rather than running the ready-made demo. A virtual environment is a separate folder of packages for one project. It prevents a package installed in one Python from being mistaken for the package in another Python. You do not need to activate it: use its exact Python path in every command.
Create a normal project folder and open your terminal in it. On Windows, File Explorer → that folder → address bar → type powershell → Enter. On macOS, type cd in Terminal, drag the folder into Terminal, then press Enter. Copy only the commands, not the PS> or % prompt and not the explanatory output.
Windows PowerShell:
py -3.14 -m venv .venv
.\.venv\Scripts\python.exe -m pip install "kdpika-licensing==2.2.0"
.\.venv\Scripts\python.exe -c "import sys,importlib.metadata as m; print('Python:',sys.version.split()[0]); print('SDK:',m.version('kdpika-licensing')); print('Executable:',sys.executable)"
macOS:
python3.14 -m venv .venv
./.venv/bin/python -m pip install "kdpika-licensing==2.2.0"
./.venv/bin/python -c "import sys,importlib.metadata as m; print('Python:',sys.version.split()[0]); print('SDK:',m.version('kdpika-licensing')); print('Executable:',sys.executable)"
Linux, after confirming Python 3.11–3.14:
python3 -m venv .venv
./.venv/bin/python -m pip install "kdpika-licensing==2.2.0"
./.venv/bin/python -c "import sys,importlib.metadata as m; print('Python:',sys.version.split()[0]); print('SDK:',m.version('kdpika-licensing')); print('Executable:',sys.executable)"
Expected: a supported Python, SDK 2.2.0, and an executable inside this project's .venv. Run your app using that same executable: ./.venv/bin/python your_app.py on macOS/Linux or .\.venv\Scripts\python.exe your_app.py in PowerShell. Your IDE must select that executable too. Installing in Python 3.14 does not update Python 3.9.
Update, reinstall or remove the SDK
Close the app first. Stay in the same project folder and use the same environment. Keep your private activation state and App ID/environment unchanged during an update. Package installation/removal does not change your KDPika account or subscription.
| Task | macOS/Linux, own project | Windows PowerShell, own project |
|---|---|---|
| Install the demo-tested version | ./.venv/bin/python -m pip install --upgrade "kdpika-licensing==2.2.0" | .\.venv\Scripts\python.exe -m pip install --upgrade "kdpika-licensing==2.2.0" |
| Update to the latest published stable version | ./.venv/bin/python -m pip install --upgrade kdpika-licensing | .\.venv\Scripts\python.exe -m pip install --upgrade kdpika-licensing |
| Repair the same tested version | ./.venv/bin/python -m pip install --force-reinstall "kdpika-licensing==2.2.0" | .\.venv\Scripts\python.exe -m pip install --force-reinstall "kdpika-licensing==2.2.0" |
| View the installed package/version | ./.venv/bin/python -m pip show kdpika-licensing | .\.venv\Scripts\python.exe -m pip show kdpika-licensing |
| Remove the SDK from this environment | ./.venv/bin/python -m pip uninstall kdpika-licensing | .\.venv\Scripts\python.exe -m pip uninstall kdpika-licensing |
For the downloaded demo, use .demo-venv instead of .venv. Or run python3 start.py --update / py -3 start.py --update to restore the demo-tested SDK and open the app; --check shows its Python/SDK without opening it, and --uninstall removes just its SDK after pip asks for confirmation. Starting normally after removal installs the tested SDK again. These commands do not silently select a future SDK release.
Before permanently abandoning an activated computer, choose Release this computer and confirm it succeeds. Closing the app releases a floating seat; removing the SDK, deleting .venv/.demo-venv, or deleting local files does not deactivate a server-side machine. Do not delete the private .kdpika-python-tutorial folder to fix installation errors: that can lose the identity needed to release the old machine. Removing a package leaves dependencies and saved state; it does not cancel billing. If the computer is unavailable, use the authorized customer portal or publisher dashboard.
Optional SDK extras for your own app: append [secure-storage] for an available OS keyring, or [ui] for the SDK's optional Qt UI, e.g. ./.venv/bin/python -m pip install "kdpika-licensing[secure-storage]==2.2.0". The supplied desktop demo uses Tkinter, so Qt is not needed. Flask belongs only to the web example. Native keyring availability and target-OS packaging need separate verification.
Common setup problems, in plain words
| What you see | What it means / next step |
|---|---|
Requirement already satisfied but SDK 1.0.0 remains | You may be using Python 3.9. It cannot install the new package. Use the launcher or a supported Python's separate environment; repeating the same old pip command will not help. |
unexpected keyword argument 'product' or no close method | An old SDK is loaded. Run start.py --check, then start through the launcher. Do not rewrite LicenseClient around the old package. |
KDP_APP_ID / KeyError before the window opens | You are using the older demo. Download project 1.1.0 and enter App ID in its window. Never replace an environment-variable name in os.environ[...] with an App ID. |
No module named kdpika_licensing | The app and pip are using different Python environments, or installation failed. Use the same full environment Python path for install and run. |
No matching distribution / Python 3.9 | Install Python 3.11–3.14. Do not downgrade the SDK or bypass its Python requirement. |
python3.14 / py not found | Install Python 3.14; restart the terminal. macOS fallback is /Library/Frameworks/Python.framework/Versions/3.14/bin/python3.14. |
No module named tkinter | Use a Python installation with Tk support, or add the matching Tk package on Linux. The SDK itself does not require a GUI. |
LibreSSL / NotOpenSSLWarning in the old command | That log used macOS developer-tools Python and an old package. Use the supported demo environment; do not suppress TLS checks. |
| Activation refused | App ID, environment, key and matching email must belong together. Test and Live are separate. A free workspace is Test only. |
| Activated but export denied | The license needs the csv_export feature. Apply plan changes to existing licenses when appropriate, then Check access. Metered licenses use the separate credit example. |
Permission denied / incomplete .demo-venv | Extract into a normal folder you own, such as Documents. Remove only the generated incomplete environment and start again; keep private license state. |
Python packaging: virtual environments · pip uninstall reference. Share only the version, selected executable and a redacted error when asking for help. Never post a license key, matching customer email, activation token or saved state publicly.
Activation and checks
Configure the public product App ID, explicit Sandbox environment for tests, application name/version and a private persistent state directory. Secret management API keys belong only on your server. Activate with a license key and the matching customer email when your application requires it.
The SDK collects product-salted hardware hashes and sends them on activation/validation with X-Installation-ID. It verifies the Ed25519 signed result, product/environment, installation and hardware binding before granting online/cached access. Missing hardware fails closed; browser-only JS/WASM has no fallback. is_virtual alone never rejects a license.
LicenseClient exposes activate(), check(), validate() and deactivate(). AsyncLicenseClient exposes corresponding awaitable operations. Check result.valid and result.signature_valid before result.feature("pdf_export"). Keep a stable installation identity and private storage.
Floating licenses
Pro allows up to 10 concurrent sessions per software license; Business has no commercial platform seat cap. A separate software-license device allowance still applies. Activation may automatically reserve a seat; an activation token alone is not a lease. Use checkout(), heartbeat(), checkin() and close() on sync/async clients. Explicit checkout raises AllSeatsInUseError when full. Background renewal and graceful close remain subject to signed lease deadlines.
Stop licensed work at signed lease expiry even if regular offline grace is longer. A process crash cannot send checkin; the server frees an expired session. Shared-seat contract.
Online usage credits
Business permits metered licenses. consume(1, idempotency_key="export_job_123") returns a verified receipt. get_balance() reads the current signed online balance, including zero. Catch InsufficientCreditsError or CreditOperationError; no automatic charge retry occurs.
Persist one idempotency key per billable job before sending. Recover an uncertain outcome with the same request key and operation, never a new key. Replays do not debit twice, but your application must also deduplicate execution of the actual job. A final successful charge may leave zero and authorize that charged operation only. Credit refunds return units, not money. Credit contract.
Offline and security boundaries
Regular licenses may use a verified cache only within signed deadlines, never beyond license expiry. Shared seats require an unexpired signed lease; metered permissions are online-only. An offline app cannot know about a new revocation until reconnecting. Do not log raw keys, tokens, hardware identifiers or customer payloads.
Require a valid, verified decision before features. A feature helper, token-presence property, HTTP 200 or successful deactivation alone grants no access. No hardware attestation, browser fingerprint fallback, unbreakable anti-piracy or universal OS certification is claimed.
Errors and recovery
FINGERPRINT_MISMATCH keeps access locked; contact the publisher for device recovery. HARDWARE_UNAVAILABLE means usable hardware information is unavailable; never replace it with a random ID fallback. ALL_SEATS_IN_USE asks the customer to close another app or release a stuck session. INSUFFICIENT_CREDITS denies the billable job. PLAN_UPGRADE_REQUIRED is a developer subscription limit, not a customer payment request.
Full error codes · Plan requirements · Compatibility · Customer portal.
License and distribution
MIT license. The SDK license does not grant access to the proprietary platform source.
Complete example apps
Try Sudoku Studio or the original License Lab. Download and follow the steps.