Official Python SDK for KeyNexus License Management
Project description
KeyNexus Python SDK
Official Python client for KeyNexus License Management System.
Installation
From PyPI (Recommended)
pip install keynexus-python
From Source
# Clone repository
git clone https://github.com/keynexus/keynexus-python
cd keynexus-python
# Install
pip install -e .
Quick Start
from keynexus import KeyNexusClient
# Initialize client
client = KeyNexusClient(
app_id="app_xxxxxxxxxxxx",
secret_key="sk_xxxxxxxxxxxxxxxxxxxx"
)
# Validate license
try:
result = client.validate_license("XXXXX-XXXXX-XXXXX-XXXXX")
print(f"✅ License valid!")
print(f"Type: {result['license']['type']}")
print(f"Expires: {result['license']['expiresAt']}")
except Exception as e:
print(f"❌ Error: {e}")
Features
- ✅ License validation with automatic HWID generation
- ✅ Username/password authentication
- ✅ Session management
- ✅ Automatic error handling
- ✅ Type hints for better IDE support
Documentation
Full documentation available at: https://keynexus.es/docs
Examples
Validate License
client = KeyNexusClient(app_id="...", secret_key="...")
result = client.validate_license("XXXXX-XXXXX-XXXXX-XXXXX")
if result['success']:
print("Access granted!")
Login with Password
result = client.login_with_password("username", "password")
print(f"Welcome {result['user']['username']}!")
Get User Info
user = client.get_user_info()
print(f"Subscription expires: {user['user']['subscriptionExpiry']}")
License
MIT License - see LICENSE file for details
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
keynexus_python-1.0.0.tar.gz
(5.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file keynexus_python-1.0.0.tar.gz.
File metadata
- Download URL: keynexus_python-1.0.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4fd37764e5fbd2983658dc3ff6c73ae329dba6dc04a2ff6ea1ec3fd08652ad0
|
|
| MD5 |
5c2c43636b7d19347a4d5172e6a09f86
|
|
| BLAKE2b-256 |
45a4ea3d706ce60c2fc2ae0cfcc4d883c53ac67d69e32eea0acd417fa8105c4a
|
File details
Details for the file keynexus_python-1.0.0-py3-none-any.whl.
File metadata
- Download URL: keynexus_python-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f441930303e24eece08535ff8209e039044639ec79b3fb92d0b63271cbdf7105
|
|
| MD5 |
29cfc68ecac2c31a6075c27ed0ba9ac2
|
|
| BLAKE2b-256 |
13e042e559d42d9d43e4220fe7032f9c1e6af7304fae1e5ba887d396d3a90106
|