An Illusion of Thieves by Cate Glass
In Cantagna, being a sorcerer is a death sentence. Romy escapes her hardscrabble upbringing when she becomes courtesan to the Shadow Lord, a revolutionary noble who brings laws and comforts once reserved for the wealthy to all. When her brother, Neri, is caught thieving with the aid of magic, Romy's aristocratic influence is the only thing that can spare his life - and the price is her banishment. Now back in Beggar's Ring, she has just her wits and her own long-hidden sorcery to help her and Neri survive. But when a plot to overthrow the Shadow Lord and incite civil war is uncovered, only Romy knows how to stop it. To do so, she'll have to rely on newfound allies - a swordmaster, a silversmith, and her own thieving brother. And they'll need the very thing that could condemn them all: magic.