monty package¶
Monty is the missing complement to Python. Monty implements supplementary useful functions for Python that are not part of the standard library. Examples include useful utilities like transparent support for zipped files, useful design patterns such as singleton and cached_class, and many more.
Subpackages¶
-
cd()
makedirs_p()
-
find_exts()
zpath()
-
-
find_ge()
find_gt()
find_le()
find_lt()
index()
-
AttrDict
AttrDict.copy()
FrozenAttrDict
MongoDict
Namespace
Namespace.update()
dict2namedtuple()
frozendict
frozendict.update()
tree()
-
NullFile
NullStream
NullStream.write()
cached_class()
singleton()
-
deprecated()
install_excepthook()
requires
-
WildCard
WildCard.filter()
WildCard.match()
-
gcd()
gcd_float()
lcm()
-
TimeoutError
lazy_property
lazy_property.invalidate()
lru_cache()
prof_main()
return_if_raise()
return_none_if_raise()
timeout
timeout.handle_timeout()
-
all_subclasses()
caller_name()
find_top_pyfile()
-
FileLock
FileLock.Error
FileLock.acquire()
FileLock.release()
FileLockException
get_open_fds()
reverse_readfile()
reverse_readline()
zopen()
-
chunks()
ilotri()
iterator_from_slice()
iuptri()
-
MSONError
MSONable
MSONable.REDIRECT
MSONable.as_dict()
MSONable.from_dict()
MSONable.to_json()
MSONable.unsafe_hash()
MSONable.validate_monty()
MontyDecoder
MontyDecoder.decode()
MontyDecoder.process_decoded()
MontyEncoder
MontyEncoder.default()
jsanitize()
-
enable_logging()
logged()
-
nCr()
nPr()
-
default()
object_hook()
-
imap_tqdm()
-
operator_from_str()
-
DisplayEcoder
DisplayEcoder.default()
draw_tree()
pprint_json()
pprint_table()
-
regrep()
-
dumpfn()
loadfn()
-
compress_dir()
compress_file()
copy_r()
decompress_dir()
decompress_file()
gzip_dir()
remove()
-
boxed()
indent()
is_string()
list_strings()
make_banner()
marquee()
remove_non_ascii()
unicode2str()
-
Command
Command.retcode
Command.killed
Command.output
Command.error
Command.run()
-
ScratchDir
ScratchDir.SCR_LINK
-
colored()
cprint()