Currently, the package's init enforces the post template, but it would be more flexible if the Handler class could choose how to format the string.
POST_TEMPLATE = """\
{start_delimiter}
{metadata}
{end_delimiter}
{content}
"""
def dumps(post, handler=None, **kwargs):
...
return POST_TEMPLATE.format(
metadata=metadata, content=post.content,
start_delimiter=start_delimiter,
end_delimiter=end_delimiter).strip()
Currently, the package's init enforces the post template, but it would be more flexible if the
Handlerclass could choose how to format the string.