Upvote:2
Medieval Venice operated internally as more of an Oligarchy, as descent from a noble family was required for membership in its legislative body, which was also the body that selected the Doge.
However, nearly all its neighbors were operating under Feudal systems, so when necessary for the purposes of interacting with them, the Doge was roughly reckoned as a Duke. That is in fact where the word "Doge" (Venetian "Doxe") came from. Its Venetian for "Duke" (Latin "Dux").
Of course the line between Oligarchy and Republic is quite fuzzy. Likely the franchise in Venice wasn't significantly more restricted on a per-capita basis than that of 1788 South Carolina (a plantation society where voting required property ownership).
The Medieval Papal State, was a different beast. While the leadership position was appointed (calling it "elected" would be a bit of a stretch during that era), and had some obvious religious administrative responsibilities that most European states didn't have to deal with, the state itself operated much like any other medieval duchy. This includes raising armies and invading neighbors from time to time. The "clergy" involved in this election were typically puppets of whatever ruler owned the land they were sitting on, and the popes they elected were often just that ruler's younger-son relatives.