<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>《Flask 2.0 版本发布》的评论</title>
	<atom:link href="https://greyli.com/flask2/feed/" rel="self" type="application/rss+xml" />
	<link>https://greyli.com/flask2/</link>
	<description>一个编程和写作爱好者的在线记事本</description>
	<lastBuildDate>Wed, 05 Nov 2025 16:05:16 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.9.26</generator>
	<item>
		<title>作者：mkvoya</title>
		<link>https://greyli.com/flask2/#comment-7673</link>
		<dc:creator><![CDATA[mkvoya]]></dc:creator>
		<pubDate>Tue, 25 May 2021 01:29:38 +0000</pubDate>
		<guid isPermaLink="false">https://greyli.com/?p=3728#comment-7673</guid>
		<description><![CDATA[谢谢！]]></description>
		<content:encoded><![CDATA[<p>谢谢！</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：李辉</title>
		<link>https://greyli.com/flask2/#comment-7670</link>
		<dc:creator><![CDATA[李辉]]></dc:creator>
		<pubDate>Sun, 23 May 2021 08:11:51 +0000</pubDate>
		<guid isPermaLink="false">https://greyli.com/?p=3728#comment-7670</guid>
		<description><![CDATA[我对 ASGI 并不熟悉，不过 &lt;a href=&quot;https://flask.palletsprojects.com/en/2.0.x/async-await/#performance&quot; target=&quot;_blank&quot; rel=&quot;noopener nofollow&quot;&gt;Flask 文档&lt;/a&gt;里提到了这个问题：Async is not inherently faster than sync code. Async is beneficial when performing concurrent IO-bound tasks, but will probably not improve CPU-bound tasks。Flask（Werkzeug） 有支持 ASGI 的计划，详情见 https://github.com/pallets/werkzeug/issues/1322。]]></description>
		<content:encoded><![CDATA[<p>我对 ASGI 并不熟悉，不过 <a href="https://flask.palletsprojects.com/en/2.0.x/async-await/#performance" target="_blank" rel="noopener nofollow">Flask 文档</a>里提到了这个问题：Async is not inherently faster than sync code. Async is beneficial when performing concurrent IO-bound tasks, but will probably not improve CPU-bound tasks。Flask（Werkzeug） 有支持 ASGI 的计划，详情见 <a href="https://github.com/pallets/werkzeug/issues/1322。" rel="nofollow">https://github.com/pallets/werkzeug/issues/1322。</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：mkvoya</title>
		<link>https://greyli.com/flask2/#comment-7666</link>
		<dc:creator><![CDATA[mkvoya]]></dc:creator>
		<pubDate>Mon, 17 May 2021 05:07:10 +0000</pubDate>
		<guid isPermaLink="false">https://greyli.com/?p=3728#comment-7666</guid>
		<description><![CDATA[前端时间在部署 docker flask 的时候，看到说 ASGI 的性能比 WSGI 更好，刚好在这里碰到了行家，请问实际情况是这样吗？以及 flask 之后会有支持 ASGI 的计划吗？]]></description>
		<content:encoded><![CDATA[<p>前端时间在部署 docker flask 的时候，看到说 ASGI 的性能比 WSGI 更好，刚好在这里碰到了行家，请问实际情况是这样吗？以及 flask 之后会有支持 ASGI 的计划吗？</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：wffger</title>
		<link>https://greyli.com/flask2/#comment-7662</link>
		<dc:creator><![CDATA[wffger]]></dc:creator>
		<pubDate>Fri, 14 May 2021 03:41:43 +0000</pubDate>
		<guid isPermaLink="false">https://greyli.com/?p=3728#comment-7662</guid>
		<description><![CDATA[flask是要加速前进吗？]]></description>
		<content:encoded><![CDATA[<p>flask是要加速前进吗？</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：李辉</title>
		<link>https://greyli.com/flask2/#comment-7661</link>
		<dc:creator><![CDATA[李辉]]></dc:creator>
		<pubDate>Thu, 13 May 2021 14:29:02 +0000</pubDate>
		<guid isPermaLink="false">https://greyli.com/?p=3728#comment-7661</guid>
		<description><![CDATA[将会在 https://github.com/pallets/flask/pull/4036 修复。]]></description>
		<content:encoded><![CDATA[<p>将会在 <a href="https://github.com/pallets/flask/pull/4036" rel="nofollow">https://github.com/pallets/flask/pull/4036</a> 修复。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：weeds</title>
		<link>https://greyli.com/flask2/#comment-7656</link>
		<dc:creator><![CDATA[weeds]]></dc:creator>
		<pubDate>Thu, 13 May 2021 09:36:51 +0000</pubDate>
		<guid isPermaLink="false">https://greyli.com/?p=3728#comment-7656</guid>
		<description><![CDATA[好的，感谢回复]]></description>
		<content:encoded><![CDATA[<p>好的，感谢回复</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：李辉</title>
		<link>https://greyli.com/flask2/#comment-7655</link>
		<dc:creator><![CDATA[李辉]]></dc:creator>
		<pubDate>Thu, 13 May 2021 09:19:13 +0000</pubDate>
		<guid isPermaLink="false">https://greyli.com/?p=3728#comment-7655</guid>
		<description><![CDATA[你好，感谢反馈。这里有一个 bug，我去试着处理下，临时你可以改为在注册（调用 register_blueprint 方法）时设置 URL 前缀，即：

parent.register_blueprint(child, url_prefix=&#039;/child&#039;)
app.register_blueprint(parent, url_prefix=&#039;/parent&#039;)]]></description>
		<content:encoded><![CDATA[<p>你好，感谢反馈。这里有一个 bug，我去试着处理下，临时你可以改为在注册（调用 register_blueprint 方法）时设置 URL 前缀，即：</p>
<p>parent.register_blueprint(child, url_prefix=&#8217;/child&#8217;)<br />
app.register_blueprint(parent, url_prefix=&#8217;/parent&#8217;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：weeds</title>
		<link>https://greyli.com/flask2/#comment-7654</link>
		<dc:creator><![CDATA[weeds]]></dc:creator>
		<pubDate>Thu, 13 May 2021 03:02:17 +0000</pubDate>
		<guid isPermaLink="false">https://greyli.com/?p=3728#comment-7654</guid>
		<description><![CDATA[嵌套蓝图后child蓝图得不到预期的url, 代码如下，请帮忙看一下,感谢您

wepapi/__init__.py 文件:

from flask import Blueprint

parent = Blueprint(&quot;parent&quot;, __name__, url_prefix=&quot;/parent&quot;)

child = Blueprint(&quot;child&quot;, __name__, url_prefix=&quot;/child&quot;)

parent.register_blueprint(child)

from . import view

---------------------------------------------
app.py 文件：
from flask import Flask

from webapi import parent


def create_app():
    api: Flask = Flask(__name__)
    api.register_blueprint(parent)
    return api


if __name__ == &#039;__main__&#039;:
    app = create_app()
    app.run()

---------------------------------------------
flask routes 命令的输出

Endpoint            Methods  Rule
------------------  -------  -----------------------
parent.child.index  GET      /index
parent.index        GET      /parent/index
static              GET      /static/]]></description>
		<content:encoded><![CDATA[<p>嵌套蓝图后child蓝图得不到预期的url, 代码如下，请帮忙看一下,感谢您</p>
<p>wepapi/__init__.py 文件:</p>
<p>from flask import Blueprint</p>
<p>parent = Blueprint(&#8220;parent&#8221;, __name__, url_prefix=&#8221;/parent&#8221;)</p>
<p>child = Blueprint(&#8220;child&#8221;, __name__, url_prefix=&#8221;/child&#8221;)</p>
<p>parent.register_blueprint(child)</p>
<p>from . import view</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
app.py 文件：<br />
from flask import Flask</p>
<p>from webapi import parent</p>
<p>def create_app():<br />
    api: Flask = Flask(__name__)<br />
    api.register_blueprint(parent)<br />
    return api</p>
<p>if __name__ == &#8216;__main__&#8217;:<br />
    app = create_app()<br />
    app.run()</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
flask routes 命令的输出</p>
<p>Endpoint            Methods  Rule<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;  &#8212;&#8212;-  &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
parent.child.index  GET      /index<br />
parent.index        GET      /parent/index<br />
static              GET      /static/</p>
]]></content:encoded>
	</item>
</channel>
</rss>
