In [1]:
from guppy import hpy

In [2]:
h=hpy()

In [3]:
h.heap()


Out[3]:
Partition of a set of 228215 objects. Total size = 31067440 bytes.
 Index  Count   %     Size   % Cumulative  % Kind (class / dict of class)
     0  95889  42 11027040  35  11027040  35 str
     1  57086  25  5102664  16  16129704  52 tuple
     2    640   0  2083072   7  18212776  59 dict of module
     3  14185   6  1815680   6  20028456  64 types.CodeType
     4   1790   1  1783760   6  21812216  70 dict (no owner)
     5  14003   6  1680360   5  23492576  76 function
     6   1609   1  1452544   5  24945120  80 type
     7   1609   1  1345240   4  26290360  85 dict of type
     8    488   0   491456   2  26781816  86 dict of class
     9   2306   1   373584   1  27155400  87 list
<722 more rows. Type e.g. '_.more' to view.>

In [ ]: