suou.functools

Function utilities (decorators et al.).

Functions

alru_cache([maxsize, typed])

Reimplementation of lru_cache().

cooldown(unit, /[, exception])

Implement a calling cooldown for a function of procedure.

deprecated_alias(func, ~suou.functools._U], /)

Syntactic sugar helper for renaming functions.

do_not_flood([unit])

Implement a calling cooldown for a function or procedure.

flat_args(args, kwds, typed[, kwd_mark, ...])

Turn optionally positional and keyword arguments into a hashable key for use in caches.

future([message, version])

Describes experimental or future API's introduced as bug fixes (including as backports) but not yet intended for general use (mostly to keep semver consistent).

none_pass(func, *args, **kwargs)

Wrap callable so that gets called only on not None values.

not_implemented([msg])

A more elegant way to say a method is not implemented, but may get in the future.

timed_cache(ttl[, maxsize, typed, async_])

LRU cache which expires after the TTL in seconds passed as argument.