  The Local Group contains a great number of dwarf irregulars and spheroidals,
for which the spectroscopy of individual stars can be obtained. Thus, the
chemical evolution of these galaxies can be traced, with the only need of
finding populations spanning a large age range and such that we can accurately
derive the composition. Planetary nebulae (PNe) are old- and intermediate-age
star remnants and their chemical abundances can be obtained up to 3-4 Mpc. H II
regions, which are brighter and much easily detected, represent galaxies young
content. PNe and H II regions share similar spectroscopic features and are
analysed in the same way. Both are among the best tracers of the chemical
evolution allowing to draw the chemical time line of nearby galaxies. The focus
in this review are the PN and H II region populations as constraints to the
chemical evolution models and the mass-metallicity relation of the local
universe.
