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.1.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.1.tar.gz.
File metadata
- Download URL: keynexus_python-1.0.1.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 |
4a1fd4a74d8a2f04910a3f508d31dfcc8c37e76194c84725299f9217779ca5a5
|
|
| MD5 |
e435fa4854cded106e2efafecf1a9002
|
|
| BLAKE2b-256 |
d53ffd86844cfae4c7a3ae60eac806b5f8c9d0e4fe80b73f6e67e2d28925092a
|
File details
Details for the file keynexus_python-1.0.1-py3-none-any.whl.
File metadata
- Download URL: keynexus_python-1.0.1-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 |
4b514d8cc06315c98bffab7086dc8452ac627cb9d26ed4e15a5d9de0be591bd3
|
|
| MD5 |
290522f193f37788f27ce7bd7e4c4fea
|
|
| BLAKE2b-256 |
b2157b663f8945fef153add474657710d25f665074b2e9b7f13655befc16f048
|