def automodule(name):
 attributes = []
 obj = importlib.import_module(name)
 for attrname in dir(obj):
  value = getattr(obj, attrname)
  if (getattr(value, u'__module__', None) != name):
   continue
  if inspect.isclass(value):
   attributes.append(get_class_info(value, name))
  if inspect.isfunction(value):
   attributes.append(get_function_info(value))
 return {u'members': filter(None, attributes), u'docs': get_obj_doc(obj)}

def automodule ( name ) : attributes = [ ] obj = importlib . import_module ( name ) for attrname in dir ( obj ) : value = getattr ( obj , attrname ) if ( getattr ( value , u'__module__' , None ) != name ) : continue if inspect . isclass ( value ) : attributes . append ( get_class_info ( value , name ) ) if inspect . isfunction ( value ) : attributes . append ( get_function_info ( value ) ) return { u'members' : filter ( None , attributes ) , u'docs' : get_obj_doc ( obj ) }
returns a list of attributes for given module string .