rex.utilities.fun_utils

Utilities for parsing function signatures to make easy CLI’s or to call functions programmatically

Functions

arg_to_str(arg)

Format input as str w/ appropriate quote types for python call

get_arg_str(fun, config)

Get a string representation of positional and keyword arguments required by an input function and provided in the config dictionary.

get_class(obj)

Get the name of the class that the method object is bound to.

get_fun_call_str(fun, config[, quote_char])

Get a string that will call a function using args and kwargs from a generic config.

get_fun_str(fun)

Get the function string from a function object including the ClassName.function if the function is bound

has_class(obj)

Determine whether an object is a method that is bound to a class

is_standalone_fun(obj)

Determine whether an object is a standalone function without a class