Before he was elected to the papal see, Fr. Achille Ratti was just an ordinary paleographer and seminary teacher. Then, because his manuscript skills were so good, he was assigned to work at the famous Ambrosian Library in Venice. He spent many years there, from 1888 to 1911. He was made head of the library in 1907.
(He was also a great man for mountain climbing during his librarian days, btw, and was the first person ever to climb many Alpine peaks.)
During his happy time at the Ambrosian, Milan was a growing industrial city. Labor disputes and civic unrest sometimes occurred. The library was sometimes threatened.
And one day, when a break-in was attempted and the manuscripts and books were threatened along with the staff and patrons, Fr. Ratti’s coworkers found out that he kept a gun in his desk and wasn’t afraid to use it. So did the crowd of evildoers, who retreated in frustration. (I can’t find a cite for this, but I remember reading a quote from one of his Milan coworkers.)
Ratti was later assigned to the Vatican Library. He never had to use a gun there, but we know he still kept his in his desk. We know this because later, when he was appointed to Vatican diplomatic duties in Poland, he felt the need to write back and send for it. (It was mailed to him in the diplomatic pouch, of course!)
He was made a cardinal in 1921, to honor his diplomatic service and his work in the Vatican Library, but was simultaneously made Archbishop of Milan. But he had barely begun his new job in Milan when Pope Benedict XV died.
Ratti’s election was a surprise to everyone. He was allegedly a compromise candidate, supported by those who would otherwise have voted for Cardinal Gasparri or Cardinal Merry Del Val.
Pope Pius XI was elected pope in 1922, and served until his death in 1939. It was a rough time to be pope, especially with Mussolini moving in next door. He attempted to secure the rights of the Church in a time of oppression by diplomatic concordats. Unfortunately, most of these were immediately broken by said dictatorships. He canonized St. Albert the Great, St. Thomas More, and St. Therese of Lisieux, among other inspirational saints for modern people. He re-established the Pontifical Institute of Sciences. He also published the famous encyclical in German, “Mit brennender sorge,” which had to be smuggled into Germany, and was read out in every Catholic parish in defiance of the Reich. (He got help in composing strong enough German prose from his secretary of state, Cardinal Eugenio Pacelli, who would be his eventual successor as Pope Pius XII.)
And so… if somebody tells you that the Florida bill allowing armed school librarians goes against Catholic teaching and practice, remember Pope Pius XI – armed librarian and armed diplomat!