{"id":2887,"date":"2022-11-02T17:24:21","date_gmt":"2022-11-02T09:24:21","guid":{"rendered":"https:\/\/ufqi.com\/blog\/?p=2887"},"modified":"2022-11-02T17:56:49","modified_gmt":"2022-11-02T09:56:49","slug":"gwa2python-production-ready","status":"publish","type":"post","link":"https:\/\/ufqi.com\/blog\/gwa2python-production-ready\/","title":{"rendered":"GWA2Python\u5409\u5a03\u5154Python\u8bed\u8a00\u751f\u4ea7\u5c31\u7eea\u7248\u672c\u53d1\u5e03"},"content":{"rendered":"\n<p>2022\u5e7411\u67081\u65e5\uff0c\u6211\u4eec\u5f88\u9ad8\u5174\u5730\u5ba3\u5e03\uff0cGWA2Python\u5409\u5a03\u5154Python\u8bed\u8a00\u751f\u4ea7\u5c31\u7eea\u7248\u672c\u5df2\u7ecf\u53d1\u5e03\u3002<br \/>\u7ecf\u8fc7\u5386\u65f6\u4e24\u4e2a\u591a\u6708\u7684\u7f16\u7801\u4e0e\u79fb\u690d\uff0c GWA2\u5409\u5a03\u5154\u7edd\u5927\u90e8\u5206\u6838\u5fc3\u529f\u80fd\u5747\u5df2\u7ecf\u7531Python\u7f16\u7a0b\u8bed\u8a00\u5b9e\u73b0\uff0c\u73b0\u5728\u5f00\u59cb\u8d77\uff0c\u7f16\u7a0b\u7528\u6237\u53ef\u4ee5\u4f7f\u7528Python\u8bed\u8a00\uff0c\u7ecf\u7531GWA2\u5409\u5a03\u5154\u5f00\u53d1\u6846\u67b6\uff0c\u8bbe\u8ba1\u5f00\u53d1\u5404\u79cd\u5e94\u7528\u7a0b\u5e8f\u4e86\u3002<\/p>\n\n\n\n<p>\u4e3a\u4fdd\u6301\u4e00\u81f4\u6027\u548c\u517c\u5bb9\u6027\uff0cPython\u8bed\u8a00\u7248\u672c\u7684GWA2\u5409\u5a03\u5154\uff0c\u63d0\u4f9b\u4e86\u4e0e GWA2 Java\uff0c GWA2 PHP\uff0c GWA2 Perl \u7b49\u5b8c\u5168\u76f8\u540c\u7684API \uff0c\u7528\u6237\u8fc1\u79fb\u65f6\uff0c\u51e0\u4e4e\u6ca1\u6709\u5b66\u4e60\u6210\u672c\uff0c\u5e73\u6ed1\u65e0\u7f1d\u5730\u5728\u9700\u8981\u4f7f\u7528Python\u8bed\u8a00\u7684\u73af\u5883\u4e2d\uff0c\u5feb\u901f\u90e8\u7f72\u3001\u5f00\u53d1GWA2\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n\n\n\n<p><strong>1.- GWA2\u7684\u6838\u5fc3\u601d\u60f3\u8bbe\u8ba1\u4e0e\u63a5\u53e3\u5b9e\u73b0<\/strong><\/p>\n\n\n\n<p>GWA2Python \u7684\u6838\u5fc3\u4ece\u63a5\u53e3\u5b9a\u4e49\u4e2d\u5c55\u5f00\uff0c inc\/WebInterface.py \u4e2d\u5b9a\u4e49\u4e86\u4e3b\u8981\u65b9\u6cd5\uff1a<br \/>set\/get<br \/>setId\/getId<br \/>setTbl\/getTbl<br \/>setBy\/getBy<br \/>execBy\/rmBy<\/p>\n\n\n\n<p>\u4f5c\u4e3a\u4e00\u4e2a\u5e94\u7528\u7a0b\u5e8f\u7684\u57fa\u7840\u7c7b\/\u7236\u7c7b\uff0c inc\/WebApp.py \u5219\u5177\u4f53\u5b9e\u73b0\u4e86\u8fd9\u4e9b\u6838\u5fc3\u65b9\u6cd5\uff0c\u5e76\u63d0\u4f9b\u4e86\u8be5\u5e94\u7528\u7a0b\u5e8f\u53ef\u80fd\u4f7f\u7528\u7684\u5176\u4ed6\u7b2c\u4e09\u65b9\u670d\u52a1\uff0c\u5982\u6570\u636e\u5e93, \u6587\u4ef6\u7cfb\u7edf\uff0c\u7f13\u5b58\u670d\u52a1\u7b49\u7b49\uff0c\u8fd9\u4e9b\u5177\u4f53\u7684\u57fa\u7840\u8bbe\u65bd\u548c\u670d\u52a1\uff0c\u4e5f\u5206\u522b\u5728 inc\u4e2d\u505a\u4e86\u9884\u7f6e\u3002<br \/>inc\/Dba.py<br \/>inc\/Filea.py<br \/>inc\/Cachea.py<br \/>&#8230;.<\/p>\n\n\n\n<p>\u9488\u5bf9\u67d0\u4e00\u4e2a\u5177\u4f53\u7684\u8bbe\u65bd\u6216\u670d\u52a1\uff0c\u6211\u4eec\u4e5f\u6309\u7167\u5728\u6b64\u524d\u535a\u5ba2\u65e5\u5fd7\u4e2d\u63d0\u5230\u7684\u4e94\u5c42\u5206\u7ea7\u8fdb\u884c\u4e86\u7cfb\u7edf\u8bbe\u8ba1\u548c\u4ee3\u7801\u5b9e\u73b0\uff08GWA2Python\u5409\u5a03\u5154\u6539\u8fdb\u7b80\u7b54\u4e3a\u4f55\u9700\u8981\u8f6f\u4ef6\u5f00\u53d1\u6846\u67b6\uff0c https:\/\/ufqi.com\/blog\/gwa2python-with-multiple-db\/ \uff09\uff0c\u6bd4\u5982\u5728\u6700\u5e38\u7528\u7684\u6570\u636e\u5e93\u670d\u52a1\u4e2d\uff0c\u6211\u4eec\u9884\u7f6e\u4e86\u76f8\u5e94\u7684\u9a71\u52a8\u7a0b\u5e8f\u548c\u8fde\u63a5\u7a0b\u5e8f\uff1a<br \/>inc\/Dba.py<br \/>&#8230;.inc\/Conn.py , \u8d1f\u8d23\u6570\u636e\u5e93\u4e3b\u673a\u8fde\u63a5<br \/>&#8230;.inc\/DbDriver.py , \u8d1f\u8d23\u6570\u636e\u5e93\u670d\u52a1\u7684\u63a5\u53e3\u5b9a\u4e49<br \/>&#8230;.inc\/MySql.py , \u8d1f\u8d23\u5177\u4f53\u6570\u636e\u670d\u52a1\u7684\u5b9e\u73b0\uff0c\u5982 MySql\u6570\u636e\u5e93<br \/>&#8230;.<\/p>\n\n\n\n<p>\u4ee5\u4e0a\u662f GWA2\u7684\u6838\u5fc3\uff0c\u4e5f\u662f GWA2Python\u7684\u6838\u5fc3\u90e8\u4ef6\uff0c\u5f53\u5177\u5907\u8fd9\u4e9b\u57fa\u7840\u8bbe\u65bd\u548c\u670d\u52a1\u540e\uff0c\u57fa\u4e8e\u5176\u4e0a\u7684\u9762\u5411\u4efb\u52a1\u7684\u5f00\u53d1\u5c06\u5982\u864e\u6dfb\u7ffc\uff0c\u5b9b\u5982GWA2\u5409\u5a03\u5154\u7684\u53e3\u53f7Easy\u90a3\u6837\uff0c \u8f7b\u677e\u542f\u52a8\uff0c\u5feb\u901f\u4ea7\u51fa\uff08 Easy along, swift yield \uff09\u3002<\/p>\n\n\n\n<p><strong>2.- \u90e8\u5206 efinance \u7684\u793a\u4f8b\u4ee3\u7801<\/strong><\/p>\n\n\n\n<p>\u540c\u65f6\uff0c\u5982\u540c\u6211\u4eec\u57282022\u5e749\u6708\u4efd\u7684\u535a\u5ba2\u65e5\u5fd7\uff08 GWA2 in Python\u5409\u5a03\u5154\u53d1\u5e03Python\u8bed\u8a00\u521d\u59cb\u7248\u672c\uff0c https:\/\/ufqi.com\/blog\/gwa2-in-python-first-release\/ \uff09\u4e2d\u63d0\u5230\u7684\uff1a<br \/>\u201c2022\u5e749\u6708\u65b0\u8fd1\uff0c\u6211\u4eec\u5728\u7814\u53d1 \u6709\u798f\u91d1\u878dUfqiFina \uff08 ufqi.com\/finance \uff09\u65f6\uff0c\u53d1\u73b0\u4e00\u4e2a\u6838\u5fc3\u529f\u80fd\u7684\u7c7b\u5e93\u6709\u5f00\u6e90\u7a0b\u5e8f\u53ef\u7528\uff0c\u800c\u4e14\u662f\u7528 Python\u5199\u6210\u7684\uff0c\u8fd9\u7684\u786e\u662f\u591a\u8def\u9700\u6c42\u90fd\u6c47\u96c6\u5230 Python\u7f16\u7a0b\u8bed\u8a00\u4e0a\u4e86\u3002\u201d<\/p>\n\n\n\n<p>\u6211\u4eec\u5728 GWA2Python\u4e2d\u96c6\u6210\u4e86 efinance \u7684Python\u7c7b\u5e93\uff0c\u4f7f\u4e4b\u80fd\u591f\u8f7b\u6613\u5730\u8bfb\u53d6\u5230\u91d1\u878d\u6570\u636e\u3002\u5728\u5373\u65e5\u53d1\u5e03\u7684GWA2Python \u751f\u4ea7\u5c31\u7eea\u7248\u672c\u4e2d\uff0c\u6211\u4eec\u5206\u4eab\u4e86\u4e00\u4e9b\u7b80\u5355\u5730\u7684\u4f8b\u5b50\u7a0b\u5e8f\uff0c\u5176\u4e2d\u6709\u4e9b\u7a0b\u5e8f\u591a\u534a\u662f\u57fa\u4e8e\u96c6\u6210\u3001\u8fde\u63a5 efinance \u7c7b\u5e93\u800c\u5199\u7684\u3002\u76f8\u4fe1\uff0c\u5982\u679c\u6709\u5176\u4ed6\u7a0b\u5e8f\u5f00\u53d1\u8005\u4e5f\u78b0\u5de7\u9700\u8981\u90e8\u7f72 efinance \u5e76\u5728\u5e0c\u671b\u7528 Python\u7a0b\u5e8f\u4e0e\u73b0\u6709\u7684\u5176\u4ed6\u7a0b\u5e8f\u505a\u5bf9\u63a5\uff0c\u65e0\u7591\uff0cGWA2Python\u4f1a\u662f\u4e00\u4e2a\u53c2\u8003\u3002<\/p>\n\n\n\n<p>efinance \u672c\u8eab\u7684\u5e94\u7528\u4e0e\u7f16\u7a0b\uff0c\u53ef\u4ee5\u5728 GitHub\u4e0a\u53c2\u8003\u793a\u4f8b\u4ee3\u7801\u6216\u8005\u76f8\u5e94\u7684\u624b\u518c\u3002<\/p>\n\n\n\n<p><strong>3.- GWA2 Python\u7684\u547d\u4ee4\u884c\u8c03\u7528\u65b9\u5f0f<\/strong><\/p>\n\n\n\n<p>\u6b64\u6b21\u53d1\u5e03\u7684  GWA2Python \u751f\u4ea7\u5c31\u7eea\u7248\u672c\u662f\u4e00\u4e2a\u547d\u4ee4\u884c\u8c03\u7528\u65b9\u5f0f\u7684\u8f6f\u4ef6\u6846\u67b6\u3002\u5173\u4e8e\u547d\u4ee4\u884c\u6a21\u5f0f\u548c\u6d4f\u89c8\u5668\u6a21\u5f0f\uff0c\u8bf7\u53c2\u8003\u4e4b\u524d\u7684\u535a\u5ba2\u65e5\u5fd7\uff08 <img alt=\"\ud83c\udf43\" src=\"https:\/\/s.w.org\/images\/core\/emoji\/13.1.0\/svg\/1f343.svg\" style=\"width: 20px\"\/>GWA2Java\u65b0\u589eCmdline\u547d\u4ee4\u884c\u548cJavaBean\u8fd0\u884c\u65f6\u6a21\u5f0f\uff0chttps:\/\/ufqi.com\/blog\/gwa2java-cmdline-javabean\/  \uff09\u3002<\/p>\n\n\n\n<p>\u7b80\u5355\u5730\u8bf4\uff0c\u547d\u4ee4\u884c\u6a21\u5f0f\u8c03\u7528 GWA2Python\u7684\u5165\u53e3\u7a0b\u5e8f\u4e0e\u547d\u4ee4\uff1a<br \/> shell or cmd&gt; cd GWA2Python<br \/>shell or cmd&gt; python index.py &#8220;?mod=financefund&amp;act=list&#8221;<\/p>\n\n\n\n<p>\u8fd9\u4e9b\u5728\u547d\u4ee4\u884c\u4e0b\u7684\u6838\u5fc3\u7c7b\u5e93\u4e0e\u529f\u80fd\uff0c\u4e5f\u53ef\u4ee5\u5728Web\u670d\u52a1\u5668\u4e2d\u4f7f\u7528\uff0c\u53ea\u662f\u53ef\u80fd\u9700\u8981\u505a\u4e00\u4e9b\u9488\u5bf9Web\u670d\u52a1\u5668\u7279\u5f81\u7684\u9002\u5e94\u6027\u8c03\u6574\u3002<br \/>\u6bd4\u5982\u5728Web\u5e94\u7528\u670d\u52a1\u5668 Apache \u6216\u8005 Nginx\u4e2d\uff0c\u5982\u679c\u8981\u8bbf\u95ee\u67d0\u4e2a\u57fa\u4e8e GWA2Python\u7684\u5e94\u7528\u7a0b\u5e8f\uff0c\u76f8\u5e94\u7684\u8bbf\u95ee\u8def\u5f84:<br \/>http:\/\/HOST\/path-to-GWA2\/index.py?modfinancefund&amp;act=list<\/p>\n\n\n\n<p>\u6211\u4eec\u4f1a\u5728\u7a0d\u540e\u7684\u65f6\u95f4\u53d1\u5e03 GWA2Python \u7684Web\u670d\u52a1\u5668\u7248\u672c, \u656c\u8bf7\u671f\u5f85.<\/p>\n\n\n\n<p>\u5168\u6587\u9996\u53d1\u5730\u5740\uff1ahttps:\/\/ufqi.com\/blog\/gwa2python-production-ready\/ \uff0c&nbsp;<strong><a rel=\"noreferrer noopener\" href=\"https:\/\/ufqi.com\/naturedns\/search?q=-R\/b2SR\" target=\"_blank\">-R\/b2SR<\/a><\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\" \/>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/ufqi.com\/blog\/wp-content\/uploads\/2020\/08\/gwa2-logo-202005.v3.png\" alt=\"\" \/><figcaption>GWA2\u5409\u5a03\u5154<\/figcaption><\/figure>\n\n\n\n<p><a href=\"https:\/\/ufqi.com\/dev\/gwa2\/\">-GWA2 \u5409\u5a03\u5154<\/a>&nbsp;\u662f\u201d\u901a\u7528\u7f51\u7edc\u5e94\u7528\u67b6\u6784( General Web Application Architecture,&nbsp;https:\/\/ufqi.com\/dev\/gwa2\/ )\u201d\uff0c\u57fa\u4e8e -GWA2 \u53ef\u4ee5\u8f7b\u4fbf\u6784\u5efa\u5404\u79cd\u7f51\u7edc\u5e94\u7528\u7a0b\u5e8f,<br \/>\u5305\u62ec\u590d\u6742\u7684\u5728\u7ebf\u8d2d\u7269\u5546\u57ce\u3001\u5728\u7ebf\u533b\u7597\u3001\u5728\u7ebf\u6559\u80b2\u3001 \u65c5\u6e38\u4ea4\u6613\u5e73\u53f0\u3001\u793e\u7fa4\u6216\u8005\u793e\u4ea4\u7f51\u7ad9\u548c\u65b0\u95fb\u8d44\u8baf\u7f51\u7ad9\u7b49\uff0c<br \/>\u4e5f\u5305\u62ec\u5404\u79cd\u4f01\u4e8b\u4e1a\u5355\u4f4d\u7f51\u4e0a\u95e8\u6237\uff0c\u5728\u7ebf\u4ea4\u4e92\u53ca\u670d\u52a1\u4f5c\u4e1a\u7cfb\u7edf\u7b49.<br \/>\u8fd8\u53ef\u4ee5\u5305\u62ec\u4e3aNativeApp\u505a\u670d\u52a1\u5668\u7aef\u652f\u6301, \u751a\u81f3\u662fWebApp\u7684\u5168\u90e8.<br \/>-GWA2 \u662f\u4e3a\u6570\u4e0d\u591a\u7684\u652f\u6301\u8de8\u5f00\u53d1\u8bed\u8a00\u7684\u5e94\u7528\u6846\u67b6\uff0c\u76ee\u524d\u652f\u6301 -Java, -PHP, -Perl, -Aspx and -Python .<\/p>\n\n\n\n<p>-GWA2 is a \u201cGeneral Web Application Architecture\u201d and based on -GWA2 developers can easily build a variety of network applications,<br \/>including complex online shopping malls, online medical services, online teaching, travel trading platforms, community or social networking sites and news information sites, etc.<br \/>Also the applications include various online portals of enterprises and institutions, online interaction and service operations systems.<br \/>Moreover it contains server-side support for Native App, or even all of the WebApp.<br \/>-GWA2 is one of the web frameworks which provide cross-language support for -Java, -PHP, -Perl, -Aspx and -Python at present.<\/p>\n\n\n\n<p><strong>-GWA2 is E.A.S.Y&nbsp;<\/strong><br \/><strong>Easy Along, Swift Yield<br \/><\/strong>\u8f7b\u677e\u542f\u52a8, \u5feb\u901f\u4ea7\u51fa.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>2022\u5e7411\u67081\u65e5\uff0c\u6211\u4eec\u5f88\u9ad8\u5174\u5730\u5ba3\u5e03\uff0cGWA2Python\u5409\u5a03\u5154Python\u8bed &hellip; <a href=\"https:\/\/ufqi.com\/blog\/gwa2python-production-ready\/\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":2362,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[42,6,2],"tags":[508,86,510,307,152,512],"_links":{"self":[{"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/posts\/2887"}],"collection":[{"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/comments?post=2887"}],"version-history":[{"count":4,"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/posts\/2887\/revisions"}],"predecessor-version":[{"id":2892,"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/posts\/2887\/revisions\/2892"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/media\/2362"}],"wp:attachment":[{"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/media?parent=2887"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/categories?post=2887"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/tags?post=2887"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}