Applications in optical quantum information technology require the development of a new type of light source for which exactly one photon is emitted periodically. We review here recent progress in using semiconductor quantum dots as the active medium for generating single photons. Anti-bunching and single photon emission is observed both for optical and electrical injection of the recombining electrons and holes into the dots.