It’s about a girl who was placed under the fly god and her con-man like mentor. She also had a pet goose I think.
You're looking for Fly by Night by Frances Hardinge.
In an alternative version of 18th-century England, Mandelion is ruled in name by a mad Duke, in reality by a group of competing Guilds, and in aspiration by a variety of royal pretenders. Since the Realm was shattered, the king deposed, and the parliamentarians and monarchists locked in struggle, with the Guilds in between, there has never been real peace, and open warfare is just a wrong move away.
Into this tinderbox comes Mosca Mye, an orphan of Quilliam Mye, has taken up with a smooth-talking con man, Eponymous Clent, both because she loves words, and because she 'accidentally' set her stingy uncle's mill on fire. Together they get involved in the power intrigues of the city. But Mosca, though very bright and literate (a rarity in this world), understands a lot less than she thinks she does.
Twelve year-old Mosca Mye was born on a day honoring a saint called Goodman Palpitattle, the patron god of keeping flies out of the jam and butter. Therefore, Mosca was named after a type of fly. Not the best start for a little girl, especially since her mother had also died during childbirth. So, from the very beginning Mosca had her work cut out for her.
Words that are not printed by the Stationer guild are illegal. Mosca Mye's father was a writer and lover of literature - and because of this, he was killed when Mosca was just a little girl. She was taken in by her uncle, but her ability to read caused many problems for her. She was locked up each evening in her uncle's mill and forced to take care of his accounting. One night however, Mosca plans an escape that includes breaking out a known con man, named Eponymous Clent, and heading out on the lam with him!
Once Mosca busts her sidekick out of confinement, the pair (along with a deranged goose named Saracen) heads off on a journey cloaked in danger. Mosca and Eponymous travel throughout the Fractured Kingdom, which has been plagued with religious and political upheaval, and meet some unlikely allies. There is a big struggle in the Kingdom over who should rule the land - and Mosca ends up playing a big role in sorting things out.
Found with search terms of fantasy novel "patron god" birth fly.
It has a sequel, Twilight Robbery:
In Twilight Robbery, Mosca are Eponymous are still travelling together. After leaving the city of Mandalion in the hands of the radicals in whose revolution they took part, Mosca and Eponymous make their way to the city of Toll. As the name suggests, Toll is a place of passage. It gives access to the cities to the East, but only for those who can afford to pay the price to cross the bridge. Anyone who manages to get into Toll but has no money to spare ends up trapped between its walls. Mosca and Eponymous’ fund-gathering scheme involves warning the Mayor of Toll of a sinister plot to kidnap his daughter Beamabeth — the most beloved girl in all of Toll — and force her into a marriage. The two manage to get as far as being granted an audience with Beamabeth and her father, but from then on nothing goes exactly as they’d planned. There’s more to Toll and its inhabitants than meets the eye, and Mosca is going to need all her wits if she’s to escape with her life.