libb.valid_api_key

valid_api_key(key)[source]

Check if key has valid format.

Validates format only (alphanumeric, underscore, hyphen, 1-255 chars). For user validation, integrate with your user model’s key validation.

Parameters:

key (str) – API key to validate.

Returns:

True if key format is valid.

Return type:

bool