https://i.imgur.com/PoYIsWE.png

UBelt documentation

The API by usefulness

Perhaps the most useful way to learn this API is to sort by “usefulness”. I measure usefulness as the number of times I’ve used a particular function in my own code (excluding ubelt itself).

Function name Usefulness
ubelt.repr2() 1598
ubelt.ProgIter() 610
ubelt.expandpath() 610
ubelt.ensuredir() 482
ubelt.take() 337
ubelt.odict() 311
ubelt.map_vals() 272
ubelt.dzip() 246
ubelt.augpath() 209
ubelt.NiceRepr() 197
ubelt.ddict() 191
ubelt.argval() 184
ubelt.cmd() 176
ubelt.argflag() 171
ubelt.flatten() 168
ubelt.codeblock() 159
ubelt.Timerit() 158
ubelt.NoParam() 149
ubelt.dict_hist() 146
ubelt.group_items() 138
ubelt.peek() 134
ubelt.iterable() 124
ubelt.hash_data() 116
ubelt.grabdata() 93
ubelt.delete() 82
ubelt.compress() 76
ubelt.color_text() 76
ubelt.dict_subset() 72
ubelt.Cacher() 68
ubelt.allsame() 66
ubelt.Timer() 57
ubelt.argsort() 53
ubelt.oset() 51
ubelt.invert_dict() 50
ubelt.indent() 47
ubelt.chunks() 45
ubelt.memoize() 44
ubelt.dict_isect() 42
ubelt.timestamp() 40
ubelt.import_module_from_path() 39
ubelt.unique() 36
ubelt.map_keys() 35
ubelt.hzcat() 35
ubelt.find_duplicates() 35
ubelt.writeto() 35
ubelt.dict_union() 34
ubelt.ensure_unicode() 30
ubelt.readfrom() 30
ubelt.iter_window() 29
ubelt.sorted_vals() 29
ubelt.argmax() 26
ubelt.memoize_property() 26
ubelt.modname_to_modpath() 25
ubelt.symlink() 25
ubelt.memoize_method() 23
ubelt.dict_diff() 23
ubelt.identity() 22
ubelt.hash_file() 21
ubelt.touch() 19
ubelt.import_module_from_name() 17
ubelt.highlight_code() 16
ubelt.find_exe() 15
ubelt.CacheStamp() 13
ubelt.find_path() 9
ubelt.AutoDict() 8
ubelt.split_modpath() 7
ubelt.shrinkuser() 7
ubelt.argmin() 6
ubelt.inject_method() 6
ubelt.download() 5
ubelt.modpath_to_modname() 5
ubelt.paragraph() 5
ubelt.CaptureStdout() 4
ubelt.sorted_keys() 3
ubelt.userhome() 2
ubelt.AutoOrderedDict() 2
ubelt.argunique() 2
ubelt.unique_flags() 2

The API by submodule

Alternatively you might prefer a module-based approach where functions are grouped based on similar functionality.

ubelt.orderedset

ubelt.OrderedSet() ubelt.oset()

ubelt.progiter

ubelt.ProgIter()

ubelt.timerit

ubelt.Timer() ubelt.Timerit()

ubelt.util_arg

ubelt.argval() ubelt.argflag()

ubelt.util_cache

ubelt.Cacher() ubelt.CacheStamp()

ubelt.util_cmd

ubelt.cmd()

ubelt.util_colors

ubelt.NO_COLOR() ubelt.highlight_code() ubelt.color_text()

ubelt.util_const

ubelt.NoParam()

ubelt.util_dict

ubelt.AutoDict() ubelt.AutoOrderedDict() ubelt.dzip() ubelt.ddict() ubelt.dict_hist() ubelt.dict_subset() ubelt.dict_union() ubelt.dict_isect() ubelt.dict_diff() ubelt.find_duplicates() ubelt.group_items() ubelt.invert_dict() ubelt.map_keys() ubelt.map_vals() ubelt.sorted_keys() ubelt.sorted_vals() ubelt.odict()

ubelt.util_download

ubelt.download() ubelt.grabdata()

ubelt.util_format

ubelt.repr2() ubelt.FormatterExtensions()

ubelt.util_func

ubelt.identity() ubelt.inject_method()

ubelt.util_hash

ubelt.hash_data() ubelt.hash_file()

ubelt.util_import

ubelt.split_modpath() ubelt.modname_to_modpath() ubelt.modpath_to_modname() ubelt.import_module_from_name() ubelt.import_module_from_path()

ubelt.util_io

ubelt.readfrom() ubelt.writeto() ubelt.touch() ubelt.delete()

ubelt.util_list

ubelt.chunks() ubelt.iterable() ubelt.take() ubelt.compress() ubelt.flatten() ubelt.unique() ubelt.argunique() ubelt.unique_flags() ubelt.boolmask() ubelt.iter_window() ubelt.allsame() ubelt.argsort() ubelt.argmax() ubelt.argmin() ubelt.peek()

ubelt.util_memoize

ubelt.memoize() ubelt.memoize_method() ubelt.memoize_property()

ubelt.util_mixins

ubelt.NiceRepr()

ubelt.util_path

ubelt.TempDir() ubelt.augpath() ubelt.shrinkuser() ubelt.userhome() ubelt.ensuredir() ubelt.expandpath()

ubelt.util_platform

ubelt.WIN32() ubelt.LINUX() ubelt.DARWIN() ubelt.POSIX() ubelt.platform_data_dir() ubelt.platform_config_dir() ubelt.platform_cache_dir() ubelt.get_app_data_dir() ubelt.ensure_app_data_dir() ubelt.get_app_config_dir() ubelt.ensure_app_config_dir() ubelt.get_app_cache_dir() ubelt.ensure_app_cache_dir() ubelt.find_exe() ubelt.find_path()

ubelt.util_str

ubelt.indent() ubelt.codeblock() ubelt.paragraph() ubelt.hzcat() ubelt.ensure_unicode()

ubelt.util_stream

ubelt.TeeStringIO() ubelt.CaptureStream() ubelt.CaptureStdout()

Indices and tables