It’s a fantasy book, with magic etc but it starts off in what appears to be the British Raj. I think the protagonist is female, as is the author.
As I recall it had a good start as you began to realise that this was actually an alternate Earth, then faded somewhat.