The Government Information Center (GIC) has print copies of current and historical City and County of San Francisco Municipal Codes. (Branch Libraries do not have the codes.) The current San Francisco Codes are also searchable online via American Legal Publishing Corporation.
See our S.F. Building Codes Web page.
San Francisco's Open Government Law is the Sunshine Ordinance (Chapter 67 of the Administrative Code).
The GIC also has copies of ordinances and resolutions from 1972 forward. Previous San Francisco laws can be researched using the GIC's collection of Board of Supervisors Proceedings and other publications.