Util Module¶
This module provides utility functions.
CopyOnWriteCache(factory=None)
¶
Bases: Generic[K, V]
cache, that clones the existing dict, whenever a new item is added, avoiding any locks
Logger
¶
just syntactic sugar
StringBuilder()
¶
A StringBuilder is used to build a string by multiple append calls.
append(s)
¶
append a string to the end of the string builder
Parameters:
Name | Type | Description | Default |
---|---|---|---|
s
|
str
|
the string |
required |
Returns:
Name | Type | Description |
---|---|---|
StringBuilder |
StringBuilder
|
self |
clear()
¶
clear the content
get_deserializer(typ)
cached
¶
return a function that is able to deserialize a value of the specified type
Parameters:
Name | Type | Description | Default |
---|---|---|---|
typ
|
the type |
required |
Returns:
get_serializer(typ)
cached
¶
return a function that is able to deserialize a value of the specified type
Parameters:
Name | Type | Description | Default |
---|---|---|---|
typ
|
the type |
required |
Returns: