This question already has an answer here:
I remember there was a book series about a boy who came from a family of wizards, living in a small room/apartment in a city that was taken over by some "evil" people after they assassinated the queen, but when they tried to shoot the princess, the master/head wizard at the time took a bullet to himself (if I remember right) and died, his apprentice becoming the head wizard. The family in question adopted the young princess.
Later, the boy is taken on as an apprentice by the new (but by this time fairly old) head wizard. The head wizard lived in a tower. I also believe the boy's brother became a dark wizard and was later exiled from the kingdom, that there were some delivery mice, one of the books in the series was called "Flight" or something and also that there was a magic shop with some kind of magic-proof room.