recursive_size Recursively calculate the size of a folder or file. Works with docker directories. Install pip install recursive-size Usage from recursive_size import get_size size = get_size('path/to/folder') print(size)