{% for section in config.values() -%} [{{ section }}] {% for key, val in section.iteritems() -%} {{ key }} = {{ val }} {% endfor -%} {% endfor -%}