pdf文档 PyWebIO v1.3.3 Documentation

1.34 MB 100 页 0 评论
语言 格式 评分
英语
.pdf
3
摘要
The PyWebIO v1.3.3 release introduces several new features and improvements, including the addition of input_update() and onchange callbacks in input functions, support for FastAPI and Starlette frameworks, and enhanced output functions like put_tabs() and put_buttons(). Various bug fixes address issues such as file uploading errors, server start failures, and XSS vulnerabilities. The release also deprecates certain methods and adds new parameters for better functionality and security.
AI总结
### 总结:PyWebIO v1.3.3文档总结 #### 新功能与改进 1. **input模块**: - 添加`input_update()`功能,支持在输入函数中设置`onchange`回调。 - 新增`pywebio.input.slider()`,用于获取范围输入。 2. **output模块**: - 废弃`style()`函数,引入新方法。 - 添加`put_tabs()`功能,支持输出选项卡。 - `put_html()`增强对iPython富文本输出的兼容性。 - `put_buttons()`新增`group`和`outline`参数。 3. **session模块**: - 在`eval_js()`中添加对`promise`的支持。 - 通过`set_env()`配置输入面板。 4. **platform模块**: - 增加对FastAPI和Starlette的支持。 - 为Flask/Django/FastAPI后端添加`wsgi_app()`/`asgi_app()`。 - `start_server()`新增远程访问服务及文件上传限制参数。 5. **性能与用户体验**: - 提升访问速度,减少探测请求用于通信协议判断。 #### 向后兼容性变更 - 移除`start_server()`中的`disable_asyncio`参数(Django和Flask)。 - 废弃`pywebio.session.data()`,建议使用`pywebio.session.local`。 - 应用程序集成到Web框架后,访问地址发生变化。 - `put_scrollable()`的`max_height`参数改为`height`。 #### 错误修复 - 修复表格样式问题。 - 修复大文件上传错误。 - 修复启用`auto_open_webbrowser`时的服务器启动错误。 - 修复文件输入中文名溢出问题。 - 修复`put_image()`使用PIL Image时的错误。 - 修复文件上传返回的文件名路径解析问题。 - 修复`file_upload()`中`max_size`和`max_total_size`参数的解析错误。 - 修复Python 3.6下自动打开浏览器失败的问题。 #### 其他改进 - 优化了输出函数`reset()`、`append()`、`insert()`,支持字符串内容。 - 增强`put_code()`、`put_image()`、`put_link()`等函数的HTML转义防护。 #### 历史版本更新 - **v1.2**:支持WebSocket重连接、部署功能增强、文档多语言支持。 - **v1.1**:安全性增强(防止XSS攻击)、国际化支持、SEO优化、CDN集成。 - **v1.0**:初版本,提供基本功能框架。 - **v0.3**:增加Bokeh支持、会话信息获取、输出表格功能。 本版本在功能扩展、性能优化和问题修复方面均有显著提升,适合快速构建不需要复杂UI的Web应用或浏览器GUI。
P1
P2
P3
P4
P5
P6
P7
下载文档到本地,方便使用
- 可预览页数已用完,剩余 93 页请下载阅读 -
文档评分
请文明评论,理性发言.