A sample Alexa skill may be found here https://github.com/sumsted/alexa_pyssml.
pip install pyssml
Create a PySSML object
from pyssml.PySSML import PySSML s = PySSML()
Add your speech text
Retrieve your SSML
s.ssml() # to retrieve ssml with <speak> wrapper s.ssml(True) # to retrieve ssml without <speak> wrapper s.to_object() # to retrieve complete speech output object