{"id":342,"date":"2022-05-08T23:17:25","date_gmt":"2022-05-08T15:17:25","guid":{"rendered":"http:\/\/madapapa.com\/wordpress\/?p=342"},"modified":"2022-05-09T18:44:15","modified_gmt":"2022-05-09T10:44:15","slug":"flask-xiao-ji-qiao","status":"publish","type":"post","link":"http:\/\/madapapa.com\/wordpress\/?p=342","title":{"rendered":"flask\u5c0f\u6280\u5de7"},"content":{"rendered":"<pre><code class=\"language-plain_text\">\u201c(venv) $ export FLASK_APP=hello.py\n(venv) $ export FLASK_DEBUG=1\n(venv) $ flask run\u201d\n<\/code><\/pre>\n<p>\u5982\u4e0b\uff0c\u5f53\u8bbe\u7f6edebug\u4e3a1\uff0c\u5141\u8bb8reloader\u548cdebug\u4e24\u79cd\u6a21\u5f0f\uff0c\u5728reloader\u6a21\u5f0f\u4e0b\uff0c\u7a0b\u5e8f\u4f1a\u81ea\u52a8\u68c0\u6d4bcode\u91cc\u7684\u4fee\u6539\uff0c\u975e\u5e38\u65b9\u4fbf\u7684\u529f\u80fd\u3002<\/p>\n<pre><code class=\"language-plain_text\">\u201c(venv) $ flask run --help\nUsage: flask run [OPTIONS]\n\n  Runs a local development server for the Flask application.\n\n  This local server is recommended for development purposes only but it can\n  also be used for simple intranet deployments.  By default it will not\n  support any sort of concurrency at all to simplify debugging.  This can be\n  changed with the --with-threads option which will enable basic\n  multithreading.\n\n  The reloader and debugger are by default enabled if the debug flag of\n\nOptions:\n  -h, --host TEXT                 The interface to bind to.\n  -p, --port INTEGER              The port to bind to.\n  --reload \/ --no-reload          Enable or disable the reloader.  By default\n                                  the reloader is active if debug is enabled.\n  --debugger \/ --no-debugger      Enable or disable the debugger.  By default\n                                  the debugger is active if debug is enabled.\n  --eager-loading \/ --lazy-loader\n                                  Enable or disable eager loading.  By default\n                                  eager loading is enabled if the reloader is\n                                  disabled.\n  --with-threads \/ --without-threads\n                                  Enable or disable multithreading.\n  --help                          Show this message and exit.\u201d\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u201c(venv) $ export FLASK_APP=hello.py (venv) $ export FLASK_DEBUG=1 (venv) $ flask run\u201d \u5982\u4e0b\uff0c\u5f53\u8bbe\u7f6edebug\u4e3a1\uff0c\u5141\u8bb8reloader\u548cdebug\u4e24\u79cd\u6a21\u5f0f\uff0c\u5728reloader\u6a21\u5f0f\u4e0b\uff0c\u7a0b\u5e8f\u4f1a\u81ea\u52a8\u68c0\u6d4bcode\u91cc\u7684\u4fee\u6539\uff0c\u975e\u5e38\u65b9\u4fbf\u7684\u529f\u80fd\u3002 \u201c(venv) $ flask run &#8211;help Usage: flask run [OPTIONS] Runs a local development server for the Flask application. This local server is recommended for development purposes only but it can also be used for simple intranet deployments. By default it will not &hellip; <a href=\"http:\/\/madapapa.com\/wordpress\/?p=342\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">flask\u5c0f\u6280\u5de7<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[44,5,11],"tags":[],"class_list":["post-342","post","type-post","status-publish","format-standard","hentry","category-flask","category-linux","category-tech"],"_links":{"self":[{"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/342","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=342"}],"version-history":[{"count":1,"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/342\/revisions"}],"predecessor-version":[{"id":343,"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/342\/revisions\/343"}],"wp:attachment":[{"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=342"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=342"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=342"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}