Skip to main content

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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

keynexus_python-1.0.1-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

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

Hashes for keynexus_python-1.0.1.tar.gz
Algorithm Hash digest
SHA256 4a1fd4a74d8a2f04910a3f508d31dfcc8c37e76194c84725299f9217779ca5a5
MD5 e435fa4854cded106e2efafecf1a9002
BLAKE2b-256 d53ffd86844cfae4c7a3ae60eac806b5f8c9d0e4fe80b73f6e67e2d28925092a

See more details on using hashes here.

File details

Details for the file keynexus_python-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for keynexus_python-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4b514d8cc06315c98bffab7086dc8452ac627cb9d26ed4e15a5d9de0be591bd3
MD5 290522f193f37788f27ce7bd7e4c4fea
BLAKE2b-256 b2157b663f8945fef153add474657710d25f665074b2e9b7f13655befc16f048

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page