Personal Alarms could help you in situations where just bringing the attention of other people make the would-be attacker to reconsider and leave.
Some alarms are small and they fit on the belt or in a purse, some are more suitable for a car or a house.