Instead of -P12, use -P8, like this:
-P12
-P8
import music21 p = music21.pitch.Pitch('D-4') print(p.transpose(-8))