- Added all seven issued service trees without omissions. - Preserved the supplied runtime configuration, binaries, and assets.
18 lines
396 B
Python
Executable File
18 lines
396 B
Python
Executable File
import unicodedata
|
|
|
|
from datetime import UTC, datetime
|
|
|
|
|
|
def utc_now():
|
|
return datetime.now(UTC)
|
|
|
|
def account_namespace(username):
|
|
return unicodedata.normalize("NFKC", username).casefold()
|
|
|
|
def valid_text(value, minimum, maximum):
|
|
if not isinstance(value, str):
|
|
return False
|
|
if len(value) < minimum or len(value) > maximum:
|
|
return False
|
|
return value.isascii()
|