Determine top-level imports in a python package
ag --python --noheading --nonumbers --nofilename import | import_finder | sort | uniq
Just the top-level packages
ag --python --noheading --nonumbers --nofilename import | import_finder | awk -F '.' '{print $1}' | sort | uniq