id_translation.utils.logging#

Logging utilities.

Module Attributes

FORMATTERS

Formatters used to cast unsafe JSON types.

Functions

cast_unsafe(obj)

Attempt to cast an arbitrary object to a JSON-safe type.

FORMATTERS = {<class 'list'>: <function <lambda>>, <class 'numpy.floating'>: <class 'float'>, <class 'numpy.integer'>: <class 'int'>, <class 'numpy.ndarray'>: <method 'tolist' of 'numpy.ndarray' objects>, <class 'uuid.UUID'>: <class 'str'>}#

Formatters used to cast unsafe JSON types.

cast_unsafe(obj)[source]#

Attempt to cast an arbitrary object to a JSON-safe type.