Although we call Florence a republic, it is not the kind of Republic that we would imagine today. The highest governing authority in Florence was the Signoria, a council of 9 Priors who were drawn by lot from an eligible pool of candidates, 6 from the major guilds of Florence and 2 from the minors. The ninth Prior was the Gonfaloniere of Justice, the highest office in Florence and was also drawn by lot. Every two months this eligible pool of candidates drawn from bags kept at the Church of Santa Croche, from which at a short ceremony would proceed before the next pool of Priors were elected.
There were additionally two other governing bodies that served as advisory councils to the Signoria-- the Sixteen Standard Bearers and the 12 Wise Men, and a parliament-like system in the Commune Council that acted sort of like a Senate does today and observes, ratifies or rejects laws. Again, all were drawn by lot.
It sounds like a good system, but it didn't even last two hundred years before the Republic became divided into essentially two camps-- Pro Medici and Anti-Medici and every round of priors will be rigged to be squarely within one of these two camps. The first of these Anti-Medici alliances fails when Rinaldo degli Albizzi, the head of the storied Albizzi family who were the previous top dog in Florence before the rise of the upstart Medici and the essential leader of the anti-Medici camp fails in his all-in attempt of Cosimo. At the time, the leader of the Albizzi is threatened by several factors-- the loss of the prestige of his family after they lead Florence into a series of defeats on the battlefield, the death of his close ally Uffanzo and his brother Luca getting too friendly with Cosimo and his family (even marrying a cousin of Cosimo). He is so threatened that he decides to try to quash Cosimo once and for all by bribing the Gonfaloniere (paying his tax arrears so that the man would be eligible to be elected to the office) at the time to raise trumped up charges against Cosimo, including treason and the like. He fails, however, by allowing Cosimo contact with this Gonfaloniere who in turn bribes him again, and the gonfaloniere quite literally takes a sick leave. In the ensuing trial, Cosimo is not executed but is instead exiled for ten years, which is a fatal misstep for the Albizzi family. Cosimo would return in only a year (when the Albizzi mess up by letting a round of Priors be rigged to be pro-Medici) and all of the Albizzi are exiled promptly. By the time of Lorenzo the Magnificant the Republic of Florence will become ornamental, essentially entire halls full of those loyal to the Medici, and the miserable scum who secretly hate the Medici but can do nothing about it. After the Medici have run the last of their enemies out of Florence, lottery bag after bag will be rigged to be filled with nothing but Medici supporters.