The basking spot should be kept at 32°C – 35°C and the opposite end of the vivarium should be about 25°C. Hatchlings (< 1 year) are best kept to less of a gradient (around 25°C-32°C is appropriate). The heat source needs to be positioned at one end of the vivarium, creating a gradient of temperatures so that the snake can maintain a preferred body temperature by moving backwards and forwards (thermo-regulation) around the cage. Appropriate heating and lighting equipment can be obtained at most reptile pet stores and from online reptile equipment suppliers.
Generally the heat and light source should be switched on, usually by means of a timer switch, for 12 hours per day during the summer months with the photoperiod (the time the light is on) reduced to 10 hours during the winter months. With hatchling pythons (<1 year), heat should be provided 24 hours per day in order to ensure ideal growth and general health.
http://www.wahs.org.au/files/Woma_Care_Sheet.pdf