Philip helped me out:
tk = sgtk.Sgtk(currentScenePath)
currentTemplate = tk.templates["maya_shot_work"]
ctx = engine.context
fieldsResolved = ctx.as_template_fields(currentTemplate)
currentTemplate.apply_fields(fieldsResolved)
This returns a dictionnary with keys needed in the desired template:
template = {Episode}/{Shot}/{task_name}/scenes/work/{project_initials}_{Shot}_{task_name}_{name}_v{version}.{extension}
{'Episode': 'ep101', 'Shot': 'ep101_sh0010', 'project_initials': 'sb', 'task_name': 'animation'}
Note that it does not return scene scpecific keys such as name, version and extension, but those are pretty easily queried through your scene path.
ctx.as_template_fields
will return an error if fields are not all complete, so make sure you got everything from missing_keys() before applying fields.
Thanks a lot Philip!