{"id":1167911,"date":"2025-01-15T15:51:35","date_gmt":"2025-01-15T07:51:35","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1167911.html"},"modified":"2025-01-15T15:51:37","modified_gmt":"2025-01-15T07:51:37","slug":"python%e5%86%99api%e6%97%b6%e5%a6%82%e4%bd%95%e7%94%bb%e5%9b%be","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1167911.html","title":{"rendered":"Python\u5199API\u65f6\u5982\u4f55\u753b\u56fe"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/26065323\/8efb191d-6157-4f06-8248-5bd20b22c401.webp\" alt=\"Python\u5199API\u65f6\u5982\u4f55\u753b\u56fe\" \/><\/p>\n<p><p> \u5728Python\u5199API\u65f6\u753b\u56fe\u53ef\u4ee5\u4f7f\u7528\u591a\u79cd\u5de5\u5177\u548c\u65b9\u6cd5\uff0c\u5176\u4e2d<strong>matplotlib\u3001seaborn\u3001plotly<\/strong>\u662f\u5e38\u89c1\u7684\u56fe\u5f62\u5e93\u3002<strong>matplotlib<\/strong>\u662f\u57fa\u7840\u7684\u7ed8\u56fe\u5e93\uff0c<strong>seaborn<\/strong>\u5728matplotlib\u57fa\u7840\u4e0a\u63d0\u4f9b\u4e86\u66f4\u9ad8\u7ea7\u7684\u7ed8\u56fe\u63a5\u53e3\uff0c<strong>plotly<\/strong>\u5219\u63d0\u4f9b\u4e86\u4ea4\u4e92\u5f0f\u7684\u56fe\u8868\u529f\u80fd\u3002\u6211\u4eec\u53ef\u4ee5\u501f\u52a9\u8fd9\u4e9b\u5e93\u7ed3\u5408Flask\u6216FastAPI\u7b49\u6846\u67b6\u5b9e\u73b0API\u63a5\u53e3\u5e76\u751f\u6210\u56fe\u5f62\u3002\u4e0b\u9762\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528<strong>matplotlib<\/strong>\u7ed8\u56fe\u5e76\u96c6\u6210\u5230Flask API\u4e2d\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u5f15\u5165\u5fc5\u8981\u7684\u5e93<\/h3>\n<\/p>\n<p><p>\u5728\u5f00\u59cb\u4e4b\u524d\uff0c\u6211\u4eec\u9700\u8981\u5b89\u88c5\u4e00\u4e9b\u5fc5\u8981\u7684\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install matplotlib flask<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u521b\u5efaFlask\u5e94\u7528<\/h3>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u7684Flask\u5e94\u7528\u6765\u5904\u7406API\u8bf7\u6c42\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from flask import Flask, send_file<\/p>\n<p>import matplotlib.pyplot as plt<\/p>\n<p>import io<\/p>\n<p>app = Flask(__name__)<\/p>\n<p>@app.route(&#39;\/plot&#39;)<\/p>\n<p>def plot():<\/p>\n<p>    # \u521b\u5efa\u4e00\u4e2a\u56fe\u5f62<\/p>\n<p>    fig, ax = plt.subplots()<\/p>\n<p>    ax.plot([1, 2, 3, 4], [1, 4, 2, 3])<\/p>\n<p>    # \u5c06\u56fe\u5f62\u4fdd\u5b58\u5230\u5185\u5b58\u4e2d<\/p>\n<p>    img = io.BytesIO()<\/p>\n<p>    fig.savefig(img, format=&#39;png&#39;)<\/p>\n<p>    img.seek(0)<\/p>\n<p>    # \u8fd4\u56de\u56fe\u5f62<\/p>\n<p>    return send_file(img, mimetype=&#39;image\/png&#39;)<\/p>\n<p>if __name__ == &#39;__m<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>n__&#39;:<\/p>\n<p>    app.run(debug=True)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u8be6\u7ec6\u4ecb\u7ecd<\/h3>\n<\/p>\n<p><h4>1\u3001\u521b\u5efa\u56fe\u5f62<\/h4>\n<\/p>\n<p><p>\u5728Flask\u7684\u8def\u7531\u5904\u7406\u51fd\u6570\u4e2d\uff0c\u6211\u4eec\u9996\u5148\u521b\u5efa\u4e00\u4e2a\u56fe\u5f62\u3002\u8fd9\u91cc\u6211\u4eec\u4f7f\u7528\u4e86matplotlib\u7684<code>subplots<\/code>\u51fd\u6570\u6765\u521b\u5efa\u4e00\u4e2a\u56fe\u5f62\u548c\u4e00\u4e2a\u5b50\u56fe\uff08Axes\uff09\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">fig, ax = plt.subplots()<\/p>\n<p>ax.plot([1, 2, 3, 4], [1, 4, 2, 3])<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u6bb5\u4ee3\u7801\u521b\u5efa\u4e86\u4e00\u4e2a\u7b80\u5355\u7684\u6298\u7ebf\u56fe\u3002<\/p>\n<\/p>\n<p><h4>2\u3001\u4fdd\u5b58\u56fe\u5f62\u5230\u5185\u5b58<\/h4>\n<\/p>\n<p><p>\u4e3a\u4e86\u5c06\u56fe\u5f62\u8fd4\u56de\u7ed9\u5ba2\u6237\u7aef\uff0c\u6211\u4eec\u9700\u8981\u5c06\u56fe\u5f62\u4fdd\u5b58\u5230\u5185\u5b58\u4e2d\u3002\u6211\u4eec\u4f7f\u7528\u4e86Python\u7684io\u6a21\u5757\u6765\u521b\u5efa\u4e00\u4e2a\u5185\u5b58\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">img = io.BytesIO()<\/p>\n<p>fig.savefig(img, format=&#39;png&#39;)<\/p>\n<p>img.seek(0)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u6bb5\u4ee3\u7801\u5c06\u56fe\u5f62\u4fdd\u5b58\u4e3aPNG\u683c\u5f0f\u5e76\u5b58\u50a8\u5230\u5185\u5b58\u6587\u4ef6\u4e2d\uff0c\u7136\u540e\u5c06\u6587\u4ef6\u6307\u9488\u8bbe\u7f6e\u56de\u6587\u4ef6\u5f00\u59cb\u4f4d\u7f6e\u3002<\/p>\n<\/p>\n<p><h4>3\u3001\u8fd4\u56de\u56fe\u5f62<\/h4>\n<\/p>\n<p><p>\u6700\u540e\uff0c\u6211\u4eec\u4f7f\u7528Flask\u7684<code>send_file<\/code>\u51fd\u6570\u5c06\u5185\u5b58\u6587\u4ef6\u8fd4\u56de\u7ed9\u5ba2\u6237\u7aef\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">return send_file(img, mimetype=&#39;image\/png&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u6bb5\u4ee3\u7801\u5c06\u56fe\u5f62\u4f5c\u4e3aPNG\u56fe\u50cf\u8fd4\u56de\u7ed9\u5ba2\u6237\u7aef\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u6269\u5c55\u529f\u80fd<\/h3>\n<\/p>\n<p><h4>1\u3001\u63a5\u6536\u53c2\u6570<\/h4>\n<\/p>\n<p><p>\u6211\u4eec\u53ef\u4ee5\u6269\u5c55API\u4ee5\u63a5\u6536\u53c2\u6570\u5e76\u6839\u636e\u53c2\u6570\u751f\u6210\u56fe\u5f62\u3002\u4f8b\u5982\uff0c\u6211\u4eec\u53ef\u4ee5\u63a5\u6536\u4e24\u4e2a\u5217\u8868\u4f5c\u4e3a\u6298\u7ebf\u56fe\u7684X\u8f74\u548cY\u8f74\u6570\u636e\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">from flask import request<\/p>\n<p>@app.route(&#39;\/plot&#39;)<\/p>\n<p>def plot():<\/p>\n<p>    x = request.args.getlist(&#39;x&#39;, type=int)<\/p>\n<p>    y = request.args.getlist(&#39;y&#39;, type=int)<\/p>\n<p>    fig, ax = plt.subplots()<\/p>\n<p>    ax.plot(x, y)<\/p>\n<p>    img = io.BytesIO()<\/p>\n<p>    fig.savefig(img, format=&#39;png&#39;)<\/p>\n<p>    img.seek(0)<\/p>\n<p>    return send_file(img, mimetype=&#39;image\/png&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5ba2\u6237\u7aef\u53ef\u4ee5\u901a\u8fc7URL\u53c2\u6570\u6307\u5b9aX\u8f74\u548cY\u8f74\u6570\u636e\uff0c\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code>http:\/\/localhost:5000\/plot?x=1&amp;x=2&amp;x=3&amp;x=4&amp;y=1&amp;y=4&amp;y=2&amp;y=3<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u9519\u8bef\u5904\u7406<\/h4>\n<\/p>\n<p><p>\u4e3a\u4e86\u63d0\u9ad8API\u7684\u5065\u58ee\u6027\uff0c\u6211\u4eec\u53ef\u4ee5\u6dfb\u52a0\u9519\u8bef\u5904\u7406\u3002\u4f8b\u5982\uff0c\u5982\u679c\u5ba2\u6237\u7aef\u6ca1\u6709\u63d0\u4f9b\u5fc5\u8981\u7684\u53c2\u6570\uff0c\u6211\u4eec\u53ef\u4ee5\u8fd4\u56de\u4e00\u4e2a\u9519\u8bef\u6d88\u606f\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">@app.route(&#39;\/plot&#39;)<\/p>\n<p>def plot():<\/p>\n<p>    try:<\/p>\n<p>        x = request.args.getlist(&#39;x&#39;, type=int)<\/p>\n<p>        y = request.args.getlist(&#39;y&#39;, type=int)<\/p>\n<p>        if not x or not y or len(x) != len(y):<\/p>\n<p>            raise ValueError(&quot;Invalid input data&quot;)<\/p>\n<p>        fig, ax = plt.subplots()<\/p>\n<p>        ax.plot(x, y)<\/p>\n<p>        img = io.BytesIO()<\/p>\n<p>        fig.savefig(img, format=&#39;png&#39;)<\/p>\n<p>        img.seek(0)<\/p>\n<p>        return send_file(img, mimetype=&#39;image\/png&#39;)<\/p>\n<p>    except Exception as e:<\/p>\n<p>        return str(e), 400<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u4f7f\u7528seaborn\u548cplotly\u7ed8\u56fe<\/h3>\n<\/p>\n<p><h4>1\u3001\u4f7f\u7528seaborn\u7ed8\u56fe<\/h4>\n<\/p>\n<p><p>\u5b89\u88c5seaborn\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install seaborn<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4fee\u6539<code>plot<\/code>\u51fd\u6570\u4ee5\u4f7f\u7528seaborn\u7ed8\u56fe\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import seaborn as sns<\/p>\n<p>import pandas as pd<\/p>\n<p>@app.route(&#39;\/plot&#39;)<\/p>\n<p>def plot():<\/p>\n<p>    try:<\/p>\n<p>        x = request.args.getlist(&#39;x&#39;, type=int)<\/p>\n<p>        y = request.args.getlist(&#39;y&#39;, type=int)<\/p>\n<p>        if not x or not y or len(x) != len(y):<\/p>\n<p>            raise ValueError(&quot;Invalid input data&quot;)<\/p>\n<p>        data = pd.DataFrame({&#39;x&#39;: x, &#39;y&#39;: y})<\/p>\n<p>        fig = sns.lineplot(data=data, x=&#39;x&#39;, y=&#39;y&#39;).get_figure()<\/p>\n<p>        img = io.BytesIO()<\/p>\n<p>        fig.savefig(img, format=&#39;png&#39;)<\/p>\n<p>        img.seek(0)<\/p>\n<p>        return send_file(img, mimetype=&#39;image\/png&#39;)<\/p>\n<p>    except Exception as e:<\/p>\n<p>        return str(e), 400<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2\u3001\u4f7f\u7528plotly\u7ed8\u56fe<\/h4>\n<\/p>\n<p><p>\u5b89\u88c5plotly\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install plotly<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4fee\u6539<code>plot<\/code>\u51fd\u6570\u4ee5\u4f7f\u7528plotly\u7ed8\u56fe\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import plotly.express as px<\/p>\n<p>@app.route(&#39;\/plot&#39;)<\/p>\n<p>def plot():<\/p>\n<p>    try:<\/p>\n<p>        x = request.args.getlist(&#39;x&#39;, type=int)<\/p>\n<p>        y = request.args.getlist(&#39;y&#39;, type=int)<\/p>\n<p>        if not x or not y or len(x) != len(y):<\/p>\n<p>            raise ValueError(&quot;Invalid input data&quot;)<\/p>\n<p>        fig = px.line(x=x, y=y)<\/p>\n<p>        img = fig.to_image(format=&#39;png&#39;)<\/p>\n<p>        return send_file(io.BytesIO(img), mimetype=&#39;image\/png&#39;)<\/p>\n<p>    except Exception as e:<\/p>\n<p>        return str(e), 400<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u516d\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u901a\u8fc7\u672c\u6587\uff0c\u6211\u4eec\u4e86\u89e3\u4e86\u5982\u4f55\u5728Python\u5199API\u65f6\u4f7f\u7528matplotlib\u3001seaborn\u548cplotly\u7ed8\u56fe\u3002<strong>matplotlib\u662f\u57fa\u7840\u7684\u7ed8\u56fe\u5e93\uff0c\u9002\u5408\u7ed8\u5236\u57fa\u7840\u56fe\u5f62\uff1bseaborn\u5728matplotlib\u57fa\u7840\u4e0a\u63d0\u4f9b\u4e86\u66f4\u9ad8\u7ea7\u7684\u7ed8\u56fe\u63a5\u53e3\uff0c\u9002\u5408\u8fdb\u884c\u7edf\u8ba1\u7ed8\u56fe\uff1bplotly\u63d0\u4f9b\u4e86\u4ea4\u4e92\u5f0f\u7684\u56fe\u8868\u529f\u80fd\uff0c\u9002\u5408\u521b\u5efa\u4ea4\u4e92\u5f0f\u56fe\u8868\u3002<\/strong>\u6839\u636e\u5b9e\u9645\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u5e93\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u66f4\u9ad8\u6548\u5730\u751f\u6210\u6240\u9700\u7684\u56fe\u5f62\u3002<\/p>\n<\/p>\n<p><p>\u6b64\u5916\uff0c\u901a\u8fc7Flask\u6846\u67b6\uff0c\u6211\u4eec\u53ef\u4ee5\u8f7b\u677e\u5730\u5c06\u8fd9\u4e9b\u56fe\u5f62\u96c6\u6210\u5230API\u4e2d\uff0c\u5e76\u901a\u8fc7HTTP\u8bf7\u6c42\u8fdb\u884c\u8bbf\u95ee\u3002\u901a\u8fc7\u63a5\u6536\u53c2\u6570\u548c\u9519\u8bef\u5904\u7406\uff0c\u6211\u4eec\u53ef\u4ee5\u63d0\u9ad8API\u7684\u7075\u6d3b\u6027\u548c\u5065\u58ee\u6027\u3002\u5e0c\u671b\u672c\u6587\u80fd\u591f\u4e3a\u4f60\u5728Python\u5199API\u65f6\u5982\u4f55\u753b\u56fe\u63d0\u4f9b\u6709\u4ef7\u503c\u7684\u53c2\u8003\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python API\u4e2d\u96c6\u6210\u56fe\u5f62\u7ed8\u5236\u529f\u80fd\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u591a\u4e2a\u5e93\u6765\u7ed8\u5236\u56fe\u5f62\uff0c\u5982Matplotlib\u3001Seaborn\u548cPlotly\u3002\u8981\u5728API\u4e2d\u96c6\u6210\u8fd9\u4e9b\u529f\u80fd\uff0c\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a\u7aef\u70b9\uff0c\u5f53\u63a5\u6536\u5230\u8bf7\u6c42\u65f6\uff0c\u8c03\u7528\u76f8\u5e94\u7684\u7ed8\u56fe\u5e93\u751f\u6210\u56fe\u5f62\u5e76\u8fd4\u56de\u56fe\u50cf\u6570\u636e\u3002\u901a\u5e38\uff0c\u56fe\u5f62\u53ef\u4ee5\u4ee5PNG\u6216JPEG\u683c\u5f0f\u8fd4\u56de\uff0c\u786e\u4fdd\u5728\u54cd\u5e94\u5934\u4e2d\u8bbe\u7f6e\u6b63\u786e\u7684\u5185\u5bb9\u7c7b\u578b\u3002<\/p>\n<p><strong>\u4f7f\u7528Python API\u7ed8\u5236\u56fe\u5f62\u9700\u8981\u5b89\u88c5\u54ea\u4e9b\u5e93\uff1f<\/strong><br \/>\u4e3a\u4e86\u5728Python API\u4e2d\u7ed8\u5236\u56fe\u5f62\uff0c\u901a\u5e38\u9700\u8981\u5b89\u88c5\u4e00\u4e9b\u7279\u5b9a\u7684\u5e93\u3002\u6700\u5e38\u7528\u7684\u5305\u62ecMatplotlib\uff08\u7528\u4e8e\u57fa\u672c\u56fe\u5f62\u7ed8\u5236\uff09\u3001Pandas\uff08\u7528\u4e8e\u6570\u636e\u5904\u7406\uff09\u4ee5\u53caFlask\u6216Django\uff08\u7528\u4e8e\u6784\u5efaAPI\uff09\u3002\u53ef\u4ee5\u901a\u8fc7pip\u547d\u4ee4\u5feb\u901f\u5b89\u88c5\u8fd9\u4e9b\u5e93\uff0c\u4f8b\u5982\uff1a<code>pip install matplotlib pandas flask<\/code>\u3002<\/p>\n<p><strong>\u5982\u4f55\u786e\u4fddAPI\u8fd4\u56de\u7684\u56fe\u5f62\u8d28\u91cf\uff1f<\/strong><br \/>\u5728API\u4e2d\u7ed8\u5236\u56fe\u5f62\u65f6\uff0c\u53ef\u4ee5\u901a\u8fc7\u8c03\u6574\u56fe\u5f62\u7684\u5206\u8fa8\u7387\u548c\u5c3a\u5bf8\u6765\u786e\u4fdd\u5176\u8d28\u91cf\u3002\u4f7f\u7528Matplotlib\u65f6\uff0c\u53ef\u4ee5\u901a\u8fc7<code>plt.savefig()<\/code>\u65b9\u6cd5\u7684<code>dpi<\/code>\u53c2\u6570\u8bbe\u7f6e\u56fe\u50cf\u7684\u6bcf\u82f1\u5bf8\u70b9\u6570\uff0c\u63d0\u5347\u56fe\u5f62\u7684\u6e05\u6670\u5ea6\u3002\u6b64\u5916\uff0c\u9009\u62e9\u5408\u9002\u7684\u6587\u4ef6\u683c\u5f0f\uff08\u5982PNG\u6216SVG\uff09\u4e5f\u4f1a\u5f71\u54cd\u56fe\u5f62\u7684\u663e\u793a\u6548\u679c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u5199API\u65f6\u753b\u56fe\u53ef\u4ee5\u4f7f\u7528\u591a\u79cd\u5de5\u5177\u548c\u65b9\u6cd5\uff0c\u5176\u4e2dmatplotlib\u3001seaborn\u3001plotly\u662f\u5e38 [&hellip;]","protected":false},"author":3,"featured_media":1167914,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1167911"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1167911"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1167911\/revisions"}],"predecessor-version":[{"id":1167915,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1167911\/revisions\/1167915"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1167914"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1167911"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1167911"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1167911"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}