Skip to content

Python sample

Open Markdown

This sample protects real CSV output using the installed SDK. It uses the same customer approval for browser and file transfer.

Download this language sample

Download and extract the source archive, then run inside that directory. Install the development SDK using the language guide. All four SDKs are installed as package dependencies.

SDK

Terminal window
python3 -m venv .venv
.venv/bin/python -m pip install -r requirements.txt

Copy env.example to your private environment. Set SIGNOX_API_URL, SIGNOX_PRODUCT_ID, SIGNOX_PUBLIC_KEY_FILE and SIGNOX_STATE_DIR. Get the public key and product UUID from your vendor product settings. The customer registers the license key only in the portal. Never commit private state or account credentials.

Set the four variables from env.example in your shell. Place the pinned public key at SIGNOX_PUBLIC_KEY_FILE. Run start, approve in the returned customer portal, then poll and export.

Terminal window
.venv/bin/python main.py activation-start
.venv/bin/python main.py activation-poll
.venv/bin/python main.py activation-export output.csv

For a disconnected device, carry the two files between computers:

Terminal window
.venv/bin/python main.py activation-request request.signox
# Import request.signox in the customer portal and save activation.signox.
.venv/bin/python main.py activation-apply activation.signox
CommandExpected behavior
activation-startPrint the app-branded customer portal URL; open it in a browser.
activation-pollBefore approval: pending. After approval: apply the response and validate.
activation-requestExport public request JSON for another computer.
activation-renew-requestReplace an expired request while preserving the local installation identity.
activation-apply activation.signoxVerify and apply a response from the customer portal.
activation-statusCheck the current license; only valid plus demo_export grants CSV permission.
activation-export output.csvWrite two sample sensor rows when allowed; exit 3 if feature permission is missing.
activation-deactivateRelease an online registration; protected grants require transfer review.

Exit 0 means the command completed, including pending approval; it does not always mean the device is activated. Exit 2 means validation/activation failed. Do not call pending or skipped checks a pass.

Create a request, sign in as the customer, register the purchased key, select the license, approve, then poll/apply. To test replacement, create a request in a separate state directory; the portal must request vendor review. Record each command, exit code, expected/observed result and evidence path.

Legacy online-/offline-specific commands remain only for compatibility checks. Start a new integration with the activation commands above.