import json

from tropo import Template

t = Template(resources=[])

print(json.dumps(t._asdict(), indent=2))

import json

from tropo import Template, dumps

t = Template(resources=[])
print(dumps(t))

fix clean example