You have a couple of options. Bear in mind that dir
contains everything, but it looks like you want things that aren't callable and don't start with any underscores, i.e.
def __iter__(self):
attrs = [a for a in dir(self) if not a.startswith("_")]
for attr_name in attrs:
attr = getattr(self, attr_name)
if not hasattr(attr, "__call__"): # or if not callable(attr):
yield attr_name, attr