Python SDK
Official Python SDK for Keymint. Integrate secure licensing, hardware node-locking, and offline activations into your Python applications.
Installation
To install the official Python SDK, use either pip or Poetry:
pip install keymintQuick Start
python
from keymint import KeyMint
admin = KeyMint(api_key="YOUR_ADMIN_API_KEY")
client = KeyMint(api_key="YOUR_CLIENT_API_KEY")
# Create a key with authorized hosts
new_key = admin.create_key({
"productId": "prod_Nx8K2mLpQ4rVtW9sBc",
"allowedHosts": ["machine-a", "machine-b"]
})
# Activate a license
result = client.activate_key({
"productId": "prod_Nx8K2mLpQ4rVtW9sBc",
"licenseKey": "XXXXX-XXXXX-XXXXX-XXXXX",
"hostId": "machine-a",
"licensee": {"name": "Jane Doe", "email": "jane@example.com"}
})
print(result['message']) # "License valid"Use client keys for activation/deactivation/floating sessions. Use admin keys for create/update/block/unblock/sign and customer management. Use read-only or admin keys for detailed key lookup.