Center-align text with Python-pptx

from pptx.enum.text import PP_ALIGN

shape.paragraphs[0].alignment = PP_ALIGN.CENTER

This is taken directly from the Python pptx Docs. Does this not work for you? You said in your question that you've heard of PP_PARAGRAPH_ALIGNMENT but can't get it working. What problems are arising?

You can view more information regarding Python pptx alignment here.

Scanny, who commented below me added a wonderful point that will solve your problem:

Paragraph alignment (also known as justification) is a property of a paragraph and must be applied individually to each paragraph. In the code you included in your question, if you add a line p.alignment = PP_ALIGN.CENTER you should get what you're after.