Skip to content

Quick Start

This guide will get you up and running with QuantumMeta License Manager in minutes.

For End Users

1. Check Your System

First, let's see your machine information:

quantum-license info

2. Activate a License (if you have one)

If you received a .qkey license file:

quantum-license activate path/to/your/license.qkey

3. Check License Status

Verify your license is working:

quantum-license validate quantum-metalearn

4. Use in Python Code

from quantummeta_license import validate_or_grace

# This will either validate your license or start a 7-day grace period
def my_function():
    validate_or_grace("quantum-metalearn")
    print("Access granted!")
    # Your code here

my_function()

For Package Developers

1. Integrate License Checking

Add this to your package's __init__.py:

from quantummeta_license import validate_or_grace, LicenseError

def _check_license():
    try:
        validate_or_grace("your-package-name")
    except LicenseError as e:
        print(f"License Error: {e}")
        # Handle gracefully or exit

# Check license on import
_check_license()

2. Feature-Gated Functions

from quantummeta_license import validate_or_grace, FeatureNotLicensedError

def basic_feature():
    validate_or_grace("your-package")
    return "Basic functionality"

def premium_feature():
    try:
        validate_or_grace("your-package", required_features=["pro"])
        return "Premium functionality unlocked!"
    except FeatureNotLicensedError:
        return "This feature requires a Pro license"

For License Administrators

1. Generate a License

quantum-license generate \
    --package "quantum-metalearn" \
    --user "user@company.com" \
    --features "core,pro" \
    --days 365 \
    --output license.qkey

2. Generate with Digital Signature

quantum-license generate \
    --package "quantum-metalearn" \
    --user "user@company.com" \
    --features "core,pro,enterprise" \
    --days 365 \
    --sign \
    --output signed-license.qkey

This creates both signed-license.qkey and signed-license.pub (public key).

Development Mode

For development and testing, bypass all license checks:

# Unix/Linux/macOS
export QUANTUMMETA_DEV=1

# Windows PowerShell
$env:QUANTUMMETA_DEV = "1"

# Windows CMD
set QUANTUMMETA_DEV=1

Now all license validations will return True immediately.

Common Workflows

New User Experience

  1. User installs your package: pip install quantum-metalearn
  2. User imports/uses package → 7-day grace period starts automatically
  3. User sees grace period notifications with remaining time
  4. After 7 days, user must activate a license to continue

Licensed User Experience

  1. User receives .qkey file from you
  2. User runs: quantum-license activate license.qkey
  3. User can now use the package indefinitely (until license expires)
  4. License is tied to their specific machine

Enterprise Deployment

  1. IT admin generates licenses for each machine/user
  2. Licenses are distributed and activated on target machines
  3. Applications work seamlessly with validated licenses
  4. Development machines use QUANTUMMETA_DEV=1 for testing

Troubleshooting

Grace Period Issues

Check grace period status:

quantum-license validate your-package-name

Reset grace period (testing only):

from quantummeta_license.core.usage_tracker import UsageTracker
tracker = UsageTracker()
tracker.clear_usage_data("your-package-name")

License Activation Problems

Common issues: - Wrong machine: License is tied to a different machine - Expired license: Check expiration date - Corrupted file: Re-download the license file

Check detailed status:

quantum-license info

Development Setup

Make sure development mode is working:

from quantummeta_license.core.validation import is_development_mode
print(f"Dev mode: {is_development_mode()}")

Next Steps