helper classes

class sutools.cli_handler.CLI(desc, logs, log_obj=None)[source]

Bases: object

object designed for swift module CLI configuration

add_funcs(func_dict)[source]

add registered functions to the cli

parse()[source]

initialize parsing args

class sutools.log_handler.Logger(name, loggers, loglvl, filename, filepath, filefmt, fhandler, filecap, filetimeout, file, streamfmt, shandler, stream)[source]

Bases: object

object designed for swift granular logging configuration

cap(filecap)[source]

delete any file outside of range based on file age

out()[source]

Check all loggers in the loggers namespace object for existing logs. If none exist, close the file fhandlers and remove the empty file

timeout(filetimeout)[source]

delete any file outside given time range

class sutools.meta_handler.Store[source]

Bases: object

internal object for storing function dictionary

add_cli(cli_obj)[source]

adds a cli object to the store

add_func(func)[source]

registers a function to the function dictionary

add_log(log_obj)[source]

adds a logger object to the store

class sutools.bench_handler.Benchy[source]

Bases: object

decorator class for collecting benchmark reports

func_meta(data)[source]

collect args / kwargs meta info & summarize inputs

static summarize(data)[source]

summarize iterable data