hoops_ai.set_license

hoops_ai.set_license(license_key, validate=True)

Set the HOOPS AI license key with validation.

⚠️ REQUIRED: You must call this function before using any HOOPS functionality.

By default, this function validates the license to ensure it works correctly with all HOOPS AI components.

Parameters:
  • license_key (str) – Your HOOPS license key as a string

  • validate (bool) – Whether to validate the license immediately (default: True)

Returns:

None (raises RuntimeError if validation fails)

Raises:

Example:

import hoops_ai
import os

# Use test license for evaluation
hoops_ai.set_license(hoops_ai.use_test_license())

# Set and validate your own license (recommended)
hoops_ai.set_license(os.getenv("HOOPS_LICENSE"))

# Set without validation (not recommended)
hoops_ai.set_license("my-license", validate=False)