The buildozer print command has several special attributes to get parts of a rule, but none of them just print the names of all of the attributes. This makes it hard to impossible to iterate over a rule's attributes in a script without doing some ad-hoc parsing of the rule.
I propose to add attrs as a new special attribute for the print command. This would print out all of the attribute names for the given rule. (I have a proposed PR on the way.)