The United Federation of Teachers filed an appeal yesterday to prevent the city from releasing 12,000 teacher-performance ratings by name.

The petition to the Appellate Division of the Supreme Court comes just days after Manhattan Supreme Court Justice Cynthia Kern ruled that individual teacher ratings are not exempt from public-access laws, and must be released by the city.

The Post and other media outlets filed a Freedom of Information Law request with the Department of Education seeking the data.

The ratings ranks fourth- through eighth-grade teachers on a comparative scale from high- to low-performing based largely on how well their classes progress from one year to the next on state math or reading tests.

The latest union petition argues that Kern erred by not exploring the issue of whether the city has the discretion to release the data without including teachers’ names alongside their ratings.

The UFT has said it would consent to the data being made public if teachers’ names are withheld.

The inclusion of the names would violate teachers’ right to privacy, the union argues.

But city officials and FOIL experts have said the public has a right to know how taxpayer-funded employees are performing. Only police, firefighters and corrections officers have privacy protections under state law.