@app.route('/services/<service_code>.<format>')
def service_definition(service_code, format):
    if service_code not in service_definitions:
        abort(404)

    if format == 'json':
        return jsonify(service_definitions[service_code])
    elif format == 'xml':
        response = make_response(render_template('definition.xml',
                                                 definition=service_definitions[service_code]))
        response.headers['Content-Type'] = 'text/xml; charset=utf-8'
        return response
    else:
        abort(404)
Define attributes associated with a service code.
dataset/ETHPy150Open miamidade/georeport-server/v2.py/service_definition