e2dict

1
dict((name, getattr(ref, name)) for name in dir(ref) if not name.startswith('_'))
请作者喝一杯咖啡☕️