Cephalexin falls into a class called cephalosporins that structurally resemble penicillins.
It often depends on the type of allergy. If the allergy is itching, the likelihood of a cross-sensitivity reaction is decreased. If the allergy is hives, I wouldn't really recommend taking the cephalexin. If you do take it, be sure to have some Benadryl with you, and go to the emergency room if you have a really bad reaction that does not get better with Benadryl. If you allergy is anaphylaxis (throat closes up, difficulty breathing), DO NOT TAKE THE CEPHALOSPORIN.