PyWebIO v0.3.0 使用手册/io API与后端进行通讯。 例如你将PyWebIO静态文件托管到 /A/B/C/(.*) 路径下,那么你需要将 PyWebIO API的路由绑定到 /A/B/C/io 处; 你也可以在PyWebIO前端页面使用 pywebio_api Url参数来指定PyWebIO后端API地址, 例如 /A/B/C/? pywebio_api=/D/pywebio 将PyWebIO后端API地址设置到了 /D/pywebio 处。 pywebio_api 参数可以使用相对地址、绝对地址甚至指定其他服务器。 如果你不想自己托管静态文件,你可以使用PyWebIO的Github Page页面: https://wang0618.github.io/PyWebIO/pywebio/html/?pywebio_api= ,需要在 页面上通过 pywebio_api 参数传入后端API地址,并且将 https://wang0618 https://wang0618.github.io 加入 allowed_origins 列表中(见下文说明)。 警告 需要注意 pywebio_api 参数的格式: 相对地址可以为 ./xxx/xxx 或 xxx/xxx 的相对地址格式。 绝对地址以 / 开头,比如 /aaa/bbb . 指定其他服务器需要使用完整格式: http://example.com:5000/aaa/io 、 ws://example0 码力 | 72 页 | 8.55 MB | 1 年前3
PyWebIO v1.2.3 Documentationstart a bmi web service on port 80 ( online Demo [http://pywebio-demos.demo.wangweimin.site/?pywebio_api=bmi] ). If you want to integrate the bmi() service into an existing web framework, you can visit Integration described below, which is different from the traditional web development patton that backend implement api and frontend display content. In PyWebIO, you only need write code in Python. In fact, the way of like writing a console program, except that the terminal here becomes a browser. Using the imperative API provided by PyWebIO, you can simply call put_text, put_image, put_table and other functions to output0 码力 | 119 页 | 7.43 MB | 1 年前3
PyWebIO v1.2.2 Documentationstart a bmi web service on port 80 ( online Demo [http://pywebio-demos.demo.wangweimin.site/?pywebio_api=bmi] ). If you want to integrate the bmi() service into an existing web framework, you can visit Integration described below, which is different from the traditional web development patton that backend implement api and frontend display content. In PyWebIO, you only need write code in Python. In fact, the way of like writing a console program, except that the terminal here becomes a browser. Using the imperative API provided by PyWebIO, you can simply call put_text, put_image, put_table and other functions to output0 码力 | 119 页 | 7.41 MB | 1 年前3
PyWebIO v1.0.3 使用手册start_server(bmi, port=80) 便可以在80端口提供 bmi() 服务( 在线Demo [http://pywebio- demos.demo.wangweimin.site/?pywebio_api=bmi] )。 将 bmi() 服务整合到现有的Web框架请参考 与Web框架集成 Documentation 这个文档同时也提供 PDF 和 Epub 格式 [https://readthedocs 交互的模式,在 PyWebIO中,所有的逻辑都通过编写Python代码实现。 你可以按照编写控制台程序的逻辑编写PyWebIO应用,只不过这里的终端变成 了浏览器。通过PyWebIO提供的命令式API, 你可以简单地调用 put_text 、 put_image 、 put_table 等函数输出文本、图片、表格等内容到浏览器,也可 以调用 input 、 select 、 file_upload =False) 来关闭动画。 有关不同环境配置的效果可查看 set_env Demo [http://pywebio- demos.demo.wangweimin.site/?pywebio_api=set_env_demo] 布局 一般情况下,使用上文介绍的各种输出函数足以完成各种内容的展示,但直接 调用输出函数产生的输出之间都是竖直排列的,如果想实现更复杂的布局(比 如在页面左侧显示一0 码力 | 106 页 | 7.34 MB | 1 年前3
PyWebIO v1.6.2 Documentationdescribed below, which is different from the traditional web development pattern that backend implement api and frontend display content. In PyWebIO, you only need to write code in Python. In fact, the way like writing a console program, except that the terminal here becomes a browser. Using the imperative API provided by PyWebIO, you can simply call put_text(), put_image(), put_table() and other functions to field with small font other_html_attrs – Additional html attributes added to the input element. reference: https://developer.mozilla.org/zh- CN/docs/Web/HTML/Element/input#%E5%B1%9E%E6% 0%A7 options (list)0 码力 | 148 页 | 7.46 MB | 1 年前3
PyWebIO v1.5.1 Documentationdescribed below, which is different from the traditional web development pattern that backend implement api and frontend display content. In PyWebIO, you only need to write code in Python. In fact, the way like writing a console program, except that the terminal here becomes a browser. Using the imperative API provided by PyWebIO, you can simply call put_text(), put_image(), put_table() and other functions to field with small font other_html_attrs – Additional html attributes added to the input element. reference: https://developer.mozilla.org/zh- CN/docs/Web/HTML/Element/input#%E5%B1%9E%E6% 0%A7 options (list)0 码力 | 144 页 | 7.46 MB | 1 年前3
PyWebIO v1.6.1 Documentationdescribed below, which is different from the traditional web development pattern that backend implement api and frontend display content. In PyWebIO, you only need to write code in Python. In fact, the way like writing a console program, except that the terminal here becomes a browser. Using the imperative API provided by PyWebIO, you can simply call put_text(), put_image(), put_table() and other functions to field with small font other_html_attrs – Additional html attributes added to the input element. reference: https://developer.mozilla.org/zh- CN/docs/Web/HTML/Element/input#%E5%B1%9E%E6% 0%A7 options (list)0 码力 | 148 页 | 7.46 MB | 1 年前3
PyWebIO v1.6.3 Documentationdescribed below, which is different from the traditional web development pattern that backend implement api and frontend display content. In PyWebIO, you only need to write code in Python. In fact, the way like writing a console program, except that the terminal here becomes a browser. Using the imperative API provided by PyWebIO, you can simply call put_text(), put_image(), put_table() and other functions to field with small font other_html_attrs – Additional html attributes added to the input element. reference: https://developer.mozilla.org/zh- CN/docs/Web/HTML/Element/input#%E5%B1%9E%E6% 0%A7 options (list)0 码力 | 150 页 | 7.46 MB | 1 年前3
PyWebIO v1.6.0 Documentationdescribed below, which is different from the traditional web development pattern that backend implement api and frontend display content. In PyWebIO, you only need to write code in Python. In fact, the way like writing a console program, except that the terminal here becomes a browser. Using the imperative API provided by PyWebIO, you can simply call put_text(), put_image(), put_table() and other functions to field with small font other_html_attrs – Additional html attributes added to the input element. reference: https://developer.mozilla.org/zh- CN/docs/Web/HTML/Element/input#%E5%B1%9E%E6% 0%A7 options (list)0 码力 | 148 页 | 7.46 MB | 1 年前3
PyWebIO v1.5.2 Documentationdescribed below, which is different from the traditional web development pattern that backend implement api and frontend display content. In PyWebIO, you only need to write code in Python. In fact, the way like writing a console program, except that the terminal here becomes a browser. Using the imperative API provided by PyWebIO, you can simply call put_text(), put_image(), put_table() and other functions to field with small font other_html_attrs – Additional html attributes added to the input element. reference: https://developer.mozilla.org/zh- CN/docs/Web/HTML/Element/input#%E5%B1%9E%E6% 0%A7 options (list)0 码力 | 144 页 | 7.46 MB | 1 年前3
共 86 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9













