Petrolina can generally be considered as moderately safe for solo female travelers. Street crime such as pickpocketing can be an issue, particularly in crowded places or at night. It's always recommended to stay vigilant and aware of your surroundings. However, locals are very friendly and you are unlikely to face any major issues if you stick to populated areas and practice common travel safety measures like not displaying expensive items. The city is fairly well-policed and overall safety is in line with typical expectations for larger Brazilian cities.