You either woke heer up and she reacted to it or maybe you were too hesitant in picking her up? I findif i reach straight in and pick up my snakes are ok but if i hesitate or hover my hand near them or just touch them they will flinch and be defensive.
Remember you are HUUUUGGEEE compared to the snake.
One other thing is to not approach the snake from above, most of their predators attack from above, approach from ground level.
__________________
May you have more good days than bad

You never know how strong you are - until being strong is your only choice
There are no dark clouds - just well hidden silver linings!!