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:
- Returns:
None (raises RuntimeError if validation fails)
- Raises:
ValueError – If license_key is empty
RuntimeError – If license validation fails
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)