Example 1: Creating Class and Object in Python The attributes are a characteristic of an object. These attributes are defined inside the __init__ method of the class. It is the initializer method that is first run as soon as the object is created. Then, we create instances of the Parrot class.