The Alloy of Law 

by Brandon Sanderson

Mistborn: Wax & Wayne 
(Book 1)

Three centuries after the Mistborn trilogy, the world has railways, electric lights and revolvers. Waxillium Ladrian, a lawman turned reluctant nobleman, is dragged back into gunfights when a gang of robbers starts kidnapping aristocrats. Together with his wisecracking friend Wayne, he blends metal-based magic with pistols and shotguns in a fast, witty adventure that feels like a Western set in a fantasy city.

Goodreads: 4.19
Rated 4.19 out of 5