(window.webpackJsonp=window.webpackJsonp||[]).push([[116],{587:function(t,r,e){"use strict";e.r(r);var a=e(21),s=Object(a.a)({},(function(){var t=this,r=t.$createElement,e=t._self._c||r;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"nonebot-drivers-quart-模块"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#nonebot-drivers-quart-模块"}},[t._v("#")]),t._v(" NoneBot.drivers.quart 模块")]),t._v(" "),e("h2",{attrs:{id:"quart-驱动适配"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#quart-驱动适配"}},[t._v("#")]),t._v(" Quart 驱动适配")]),t._v(" "),e("p",[t._v("后端使用方法请参考: "),e("a",{attrs:{href:"https://pgjones.gitlab.io/quart/index.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("Quart 文档"),e("OutboundLink")],1)]),t._v(" "),e("h2",{attrs:{id:"class-config"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#class-config"}},[t._v("#")]),t._v(" "),e("em",[t._v("class")]),t._v(" "),e("code",[t._v("Config")])]),t._v(" "),e("p",[t._v("基类："),e("code",[t._v("pydantic.env_settings.BaseSettings")])]),t._v(" "),e("p",[t._v("Quart 驱动框架设置")]),t._v(" "),e("h3",{attrs:{id:"quart-reload-dirs"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#quart-reload-dirs"}},[t._v("#")]),t._v(" "),e("code",[t._v("quart_reload_dirs")])]),t._v(" "),e("ul",[e("li",[e("p",[e("strong",[t._v("类型")])]),t._v(" "),e("p",[e("code",[t._v("List[str]")])])]),t._v(" "),e("li",[e("p",[e("strong",[t._v("说明")])]),t._v(" "),e("p",[e("code",[t._v("debug")]),t._v(" 模式下重载监控文件夹列表，默认为 uvicorn 默认值")])])]),t._v(" "),e("h2",{attrs:{id:"class-driver"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#class-driver"}},[t._v("#")]),t._v(" "),e("em",[t._v("class")]),t._v(" "),e("code",[t._v("Driver")])]),t._v(" "),e("p",[t._v("基类："),e("router-link",{attrs:{to:"./#nonebot.drivers.ReverseDriver"}},[e("code",[t._v("nonebot.drivers.ReverseDriver")])])],1),t._v(" "),e("p",[t._v("Quart 驱动框架")]),t._v(" "),e("ul",[e("li",[e("p",[e("strong",[t._v("上报地址")])]),t._v(" "),e("ul",[e("li",[e("p",[e("code",[t._v("/{adapter name}/http")]),t._v(": HTTP POST 上报")])]),t._v(" "),e("li",[e("p",[e("code",[t._v("/{adapter name}/ws")]),t._v(": WebSocket 上报")])])])])]),t._v(" "),e("h3",{attrs:{id:"property-type"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#property-type"}},[t._v("#")]),t._v(" "),e("em",[t._v("property")]),t._v(" "),e("code",[t._v("type")])]),t._v(" "),e("p",[t._v("驱动名称: "),e("code",[t._v("quart")])]),t._v(" "),e("h3",{attrs:{id:"property-server-app"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#property-server-app"}},[t._v("#")]),t._v(" "),e("em",[t._v("property")]),t._v(" "),e("code",[t._v("server_app")])]),t._v(" "),e("p",[e("code",[t._v("Quart")]),t._v(" 对象")]),t._v(" "),e("h3",{attrs:{id:"property-asgi"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#property-asgi"}},[t._v("#")]),t._v(" "),e("em",[t._v("property")]),t._v(" "),e("code",[t._v("asgi")])]),t._v(" "),e("p",[e("code",[t._v("Quart")]),t._v(" 对象")]),t._v(" "),e("h3",{attrs:{id:"property-logger"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#property-logger"}},[t._v("#")]),t._v(" "),e("em",[t._v("property")]),t._v(" "),e("code",[t._v("logger")])]),t._v(" "),e("p",[t._v("Quart 使用的 logger")]),t._v(" "),e("h3",{attrs:{id:"on-startup-func"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#on-startup-func"}},[t._v("#")]),t._v(" "),e("code",[t._v("on_startup(func)")])]),t._v(" "),e("p",[t._v("参考文档: "),e("a",{attrs:{href:"https://pgjones.gitlab.io/quart/how_to_guides/startup_shutdown.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("Startup and Shutdown"),e("OutboundLink")],1)]),t._v(" "),e("h3",{attrs:{id:"on-shutdown-func"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#on-shutdown-func"}},[t._v("#")]),t._v(" "),e("code",[t._v("on_shutdown(func)")])]),t._v(" "),e("p",[t._v("参考文档: "),e("a",{attrs:{href:"https://pgjones.gitlab.io/quart/how_to_guides/startup_shutdown.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("Startup and Shutdown"),e("OutboundLink")],1)]),t._v(" "),e("h3",{attrs:{id:"run-host-none-port-none-app-none-kwargs"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#run-host-none-port-none-app-none-kwargs"}},[t._v("#")]),t._v(" "),e("code",[t._v("run(host=None, port=None, *, app=None, **kwargs)")])]),t._v(" "),e("p",[t._v("使用 "),e("code",[t._v("uvicorn")]),t._v(" 启动 Quart")]),t._v(" "),e("h2",{attrs:{id:"class-websocket"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#class-websocket"}},[t._v("#")]),t._v(" "),e("em",[t._v("class")]),t._v(" "),e("code",[t._v("WebSocket")])]),t._v(" "),e("p",[t._v("基类："),e("router-link",{attrs:{to:"./#nonebot.drivers.WebSocket"}},[e("code",[t._v("nonebot.drivers.WebSocket")])])],1)])}),[],!1,null,null,null);r.default=s.exports}}]);