Polypy is a small program to analyze rings in structures read from xyz files. This can be used, for example, to identify defects in crystal structures. The program was initially developed to analyze graphitic carbon structures, but can be used for any other structure. It includes: ring search using Franzblau statistics [Phys. Rev. B 44, 4925]; output structures marked by ring size, which can used for visualization in a program such as VMD; and extensive output with which atoms are in which ring and the neighbors of each atom.