Sounds like she was feeling her oats

A baby like that is going to be pretty darn intimidated by something as big as you are swooping down on top of her. She was probably scared and just wanted to be left alone. Striking is a snake's way of saying "I'm uneasy, you're scaring me, leave me alone!"

A bite from a bitty one doesn't hurt at all. Won't even bleed. But if you just don't want to take the chance, try using a hook... or, better yet, hook training her. When you're ready to pick her up from her cage or the floor, rub the hook over her head and down her back before sliding it under her to pick her up. She'll start understanding that the hook means it's time to be picked up, and will stop striking.