My male normal ball python is about 2 years old and has always been a good feeder until recently. It has came to the point where in the last 2 months he has only ate 1 random time and passed up about 5 other offerings. I was checking on him today and he looked extremely skinny. What should I do? Is there any explanation? Any help please!

Extra information I used to feed him f/t small rats once a week. Also he is usually a very docile snake but today he seemed very 'pissed off'. I went in to pet him an i pet the middle top of his body gently and he like twitched, to me it seemed as his way of saying 'gtfo' haha but he didnt try strikin at all.

Thanks a lot, any help will be appreciated