Utilities.
async_debounce(wait=DEFAULT_DEBOUNCE_WAIT_SECONDS, immediate=False, queue=True)
Debounce decorator for async functions.
NOTE: only works for functions returning None!
Ensures that the decorated function is only executed once after the specified wait time, resetting if called again.
When 'immediate' is True the first call is executed immediatally. When queue is True subsequent calls are still debounced normally. 'queue' does nothing when 'immediate' is False.
sha256_hexdigest(source)
Calculate sha256 checksum from input string.
| Parameters: |
|
|---|
| Returns: |
|
|---|
to_iso8601(dt)
Convert a datetime object to an ISO 8601 string.
- Adds 'Z' if datetime is UTC.
- Converts naive datetimes to UTC before formatting.