ChemEnv is a package included in the pymatgen library written by David Waroquiers (Université cathoqlique de Louvain) to analyze coordination polyhedra in crystal structures in an automatic and robust manner. Janine has written a tutorial on how to use the package that is accessible here.