Instance attributes should be used if the attributes are to be unique to the instances (which is the case most of the time). Class attributes can be used if the attributes should be shared among all instances, for example if you want to store constants that are related to this class. An example that comes to mind are the states of an entity (finite state machine):
from enum import Enum
class Entity:
# The instances don't need their own `states` enumeration,
# so I create one which will be shared among all instances.
STATES = Enum('State', 'IDLING WALKING JUMPING')
def __init__(self):
self.state = self.STATES.JUMPING
def update(self):
if self.state is self.STATES.JUMPING:
print('jumping')
entity = Entity()
entity.update()
Take care of mutable class attributes, because when you modify them, you modify them for all instances.