woom.util

woom.util#

Misc utilities

Attributes

COLORS

Available colors

Functions

check_dir(filepath[, dry, logger])

Make sure that the directory that contains file exists

colorize(text, mapping[, colorize])

Colorize text depending on mapping.

dict_to_env_vars([items, select, exclude, ...])

Convert a dict to env vars whose name starts with prefix

flatten(content)

Convert an object like a dict to a flat list

pages2ints(pages, n)

Convert a list of 1-based integers and zero-based slices to a pure list of one-based integers

set_deep_item(dd, value, *keys)

Set a deep item in dict

Classes

WoomDate(date[, round])

Extended pandas Timestamp with custom formatting and time arithmetic

WoomJSONEncoder(*[, skipkeys, ensure_ascii, ...])

Custom JSON encoder for woom objects