装饰器

Functions:

as_staticmethod(cls)

将函数添加到类中并作为staticmethod

check_null([default_rv])

检查第一个参数是否非空,若为空则直接返回空值

check_shapely(func)

检查第一个参数是否是shapely格式,若非shapely格式则警告并返回空值

check_str(func)

检查第一个参数是否是字符串,若非字符串则警告并返回空值

print_doc(func)

打印docstring

process_multi(func)

多线程处理apply任务(parallel_apply)

progress(func)

tqdm进度条(progress_apply)

run_once(func)

在一次执行中只运行一次,注:除第一次运行外,后续的不会执行也无返回值

timer([desc])

函数运行时间统计

ricco.util.decorator.as_staticmethod(cls)

将函数添加到类中并作为staticmethod

ricco.util.decorator.check_null(default_rv=None)

检查第一个参数是否非空,若为空则直接返回空值

ricco.util.decorator.check_shapely(func)

检查第一个参数是否是shapely格式,若非shapely格式则警告并返回空值

ricco.util.decorator.check_str(func)

检查第一个参数是否是字符串,若非字符串则警告并返回空值

ricco.util.decorator.print_doc(func)

打印docstring

ricco.util.decorator.process_multi(func)

多线程处理apply任务(parallel_apply)

ricco.util.decorator.progress(func)

tqdm进度条(progress_apply)

ricco.util.decorator.run_once(func)

在一次执行中只运行一次,注:除第一次运行外,后续的不会执行也无返回值

ricco.util.decorator.timer(desc=None)

函数运行时间统计