Skip to content

Commit

Permalink
Deploying to gh-pages from @ litestar-org/litestar@7e56814 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
cofin committed Nov 18, 2024
1 parent ed46d34 commit 57fa75d
Show file tree
Hide file tree
Showing 10 changed files with 65 additions and 43 deletions.
8 changes: 8 additions & 0 deletions 3862/_sources/usage/testing.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ We would then test it using the test client like so:
from my_app.main import app
app.debug = True
def test_health_check():
with TestClient(app=app) as client:
Expand All @@ -60,6 +62,8 @@ We would then test it using the test client like so:
from my_app.main import app
app.debug = True
async def test_health_check():
async with AsyncTestClient(app=app) as client:
Expand Down Expand Up @@ -90,6 +94,8 @@ Since we would probably need to use the client in multiple places, it's better t
if TYPE_CHECKING:
from litestar import Litestar
app.debug = True
@pytest.fixture(scope="function")
def test_client() -> Iterator[TestClient[Litestar]]:
Expand All @@ -114,6 +120,8 @@ Since we would probably need to use the client in multiple places, it's better t
if TYPE_CHECKING:
from litestar import Litestar
app.debug = True
@pytest.fixture(scope="function")
async def test_client() -> AsyncIterator[AsyncTestClient[Litestar]]:
Expand Down
12 changes: 6 additions & 6 deletions 3862/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -8403,14 +8403,14 @@ <h2 id="O">O</h2>
</ul></li>
<li><a href="reference/pagination.html#litestar.pagination.OffsetPagination">OffsetPagination (class in litestar.pagination)</a>
</li>
<li><a href="reference/handlers.html#litestar.handlers.WebsocketListener.on_accept">on_accept (litestar.handlers.WebsocketListener attribute)</a>
<li><a href="reference/handlers.html#litestar.handlers.WebsocketListenerRouteHandler.on_accept">on_accept (litestar.handlers.WebsocketListenerRouteHandler attribute)</a>

<ul>
<li><a href="reference/handlers.html#litestar.handlers.WebsocketListenerRouteHandler.on_accept">(litestar.handlers.WebsocketListenerRouteHandler attribute)</a>
</li>
<li><a href="reference/handlers.html#litestar.handlers.WebsocketListenerRouteHandler.params.on_accept">(litestar.handlers.WebsocketListenerRouteHandler parameter)</a>
</li>
</ul></li>
<li><a href="reference/handlers.html#litestar.handlers.WebsocketListener.on_accept">on_accept() (litestar.handlers.WebsocketListener method)</a>
</li>
<li><a href="reference/handlers.html#litestar.handlers.WebsocketListenerRouteHandler.default_connection_lifespan.params.on_accept_dependencies">on_accept_dependencies (litestar.handlers.WebsocketListenerRouteHandler.default_connection_lifespan parameter)</a>
</li>
<li><a href="reference/app.html#litestar.app.Litestar.params.on_app_init">on_app_init (litestar.app.Litestar parameter)</a>
Expand Down Expand Up @@ -8447,14 +8447,14 @@ <h2 id="O">O</h2>
</ul></li>
<li><a href="reference/plugins/index.html#litestar.plugins.CLIPluginProtocol.on_cli_init">on_cli_init() (litestar.plugins.CLIPluginProtocol method)</a>
</li>
<li><a href="reference/handlers.html#litestar.handlers.WebsocketListener.on_disconnect">on_disconnect (litestar.handlers.WebsocketListener attribute)</a>
<li><a href="reference/handlers.html#litestar.handlers.WebsocketListenerRouteHandler.on_disconnect">on_disconnect (litestar.handlers.WebsocketListenerRouteHandler attribute)</a>

<ul>
<li><a href="reference/handlers.html#litestar.handlers.WebsocketListenerRouteHandler.on_disconnect">(litestar.handlers.WebsocketListenerRouteHandler attribute)</a>
</li>
<li><a href="reference/handlers.html#litestar.handlers.WebsocketListenerRouteHandler.params.on_disconnect">(litestar.handlers.WebsocketListenerRouteHandler parameter)</a>
</li>
</ul></li>
<li><a href="reference/handlers.html#litestar.handlers.WebsocketListener.on_disconnect">on_disconnect() (litestar.handlers.WebsocketListener method)</a>
</li>
<li><a href="reference/handlers.html#litestar.handlers.WebsocketListenerRouteHandler.default_connection_lifespan.params.on_disconnect_dependencies">on_disconnect_dependencies (litestar.handlers.WebsocketListenerRouteHandler.default_connection_lifespan parameter)</a>
</li>
<li><a href="reference/channels/subscriber.html#litestar.channels.subscriber.Subscriber.run_in_background.params.on_event">on_event (litestar.channels.subscriber.Subscriber.run_in_background parameter)</a>
Expand Down
Binary file modified 3862/objects.inv
Binary file not shown.
4 changes: 2 additions & 2 deletions 3862/reference/app.html

Large diffs are not rendered by default.

30 changes: 16 additions & 14 deletions 3862/reference/handlers.html
Original file line number Diff line number Diff line change
Expand Up @@ -2155,18 +2155,6 @@
<dd><p>A sequence of <a class="reference internal" href="types.html#litestar.types.Middleware" title="litestar.types.Middleware"><code class="xref py py-class docutils literal notranslate"><span class="pre">Middleware</span></code></a>.</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="litestar.handlers.WebsocketListener.on_accept">
<span class="sig-name descname"><span class="pre">on_accept</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference internal" href="types.html#litestar.types.AnyCallable" title="litestar.types.AnyCallable"><span class="pre">AnyCallable</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.13)"><span class="pre">None</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">None</span></em><a class="headerlink" href="#litestar.handlers.WebsocketListener.on_accept" title="Permalink to this definition">#</a></dt>
<dd><p>Called after a <a class="reference internal" href="connection.html#litestar.connection.WebSocket" title="litestar.connection.WebSocket"><code class="xref py py-class docutils literal notranslate"><span class="pre">WebSocket</span></code></a> connection has been accepted. Can receive any dependencies</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="litestar.handlers.WebsocketListener.on_disconnect">
<span class="sig-name descname"><span class="pre">on_disconnect</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><a class="reference internal" href="types.html#litestar.types.AnyCallable" title="litestar.types.AnyCallable"><span class="pre">AnyCallable</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.13)"><span class="pre">None</span></a></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">None</span></em><a class="headerlink" href="#litestar.handlers.WebsocketListener.on_disconnect" title="Permalink to this definition">#</a></dt>
<dd><p>Called after a <a class="reference internal" href="connection.html#litestar.connection.WebSocket" title="litestar.connection.WebSocket"><code class="xref py py-class docutils literal notranslate"><span class="pre">WebSocket</span></code></a> connection has been disconnected. Can receive any dependencies</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="litestar.handlers.WebsocketListener.receive_mode">
<span class="sig-name descname"><span class="pre">receive_mode</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">WebSocketMode</span></em><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">'text'</span></em><a class="headerlink" href="#litestar.handlers.WebsocketListener.receive_mode" title="Permalink to this definition">#</a></dt>
Expand Down Expand Up @@ -2250,6 +2238,20 @@
</dl>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="litestar.handlers.WebsocketListener.on_accept">
<span class="sig-name descname"><span class="pre">on_accept</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.13)"><span class="pre">Any</span></a></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.13)"><span class="pre">Any</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.13)"><span class="pre">Any</span></a></span></span><a class="headerlink" href="#litestar.handlers.WebsocketListener.on_accept" title="Permalink to this definition">#</a></dt>
<dd><p>Called after a <a class="reference internal" href="connection.html#litestar.connection.WebSocket" title="litestar.connection.WebSocket"><code class="xref py py-class docutils literal notranslate"><span class="pre">WebSocket</span></code></a> connection
has been accepted. Can receive any dependencies</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="litestar.handlers.WebsocketListener.on_disconnect">
<span class="sig-name descname"><span class="pre">on_disconnect</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.13)"><span class="pre">Any</span></a></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.13)"><span class="pre">Any</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.13)"><span class="pre">Any</span></a></span></span><a class="headerlink" href="#litestar.handlers.WebsocketListener.on_disconnect" title="Permalink to this definition">#</a></dt>
<dd><p>Called after a <a class="reference internal" href="connection.html#litestar.connection.WebSocket" title="litestar.connection.WebSocket"><code class="xref py py-class docutils literal notranslate"><span class="pre">WebSocket</span></code></a> connection
has been disconnected. Can receive any dependencies</p>
</dd></dl>

<dl class="py method">
<dt class="sig sig-object py" id="litestar.handlers.WebsocketListener.on_receive">
<em class="property"><span class="pre">abstract</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">on_receive</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.13)"><span class="pre">Any</span></a></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.13)"><span class="pre">Any</span></a></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Any" title="(in Python v3.13)"><span class="pre">Any</span></a></span></span><a class="headerlink" href="#litestar.handlers.WebsocketListener.on_receive" title="Permalink to this definition">#</a></dt>
Expand Down Expand Up @@ -3083,8 +3085,6 @@
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#litestar.handlers.WebsocketListener.exception_handlers"><code class="docutils literal notranslate"><span class="pre">WebsocketListener.exception_handlers</span></code></a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#litestar.handlers.WebsocketListener.guards"><code class="docutils literal notranslate"><span class="pre">WebsocketListener.guards</span></code></a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#litestar.handlers.WebsocketListener.middleware"><code class="docutils literal notranslate"><span class="pre">WebsocketListener.middleware</span></code></a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#litestar.handlers.WebsocketListener.on_accept"><code class="docutils literal notranslate"><span class="pre">WebsocketListener.on_accept</span></code></a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#litestar.handlers.WebsocketListener.on_disconnect"><code class="docutils literal notranslate"><span class="pre">WebsocketListener.on_disconnect</span></code></a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#litestar.handlers.WebsocketListener.receive_mode"><code class="docutils literal notranslate"><span class="pre">WebsocketListener.receive_mode</span></code></a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#litestar.handlers.WebsocketListener.send_mode"><code class="docutils literal notranslate"><span class="pre">WebsocketListener.send_mode</span></code></a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#litestar.handlers.WebsocketListener.name"><code class="docutils literal notranslate"><span class="pre">WebsocketListener.name</span></code></a></li>
Expand All @@ -3095,6 +3095,8 @@
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#litestar.handlers.WebsocketListener.type_encoders"><code class="docutils literal notranslate"><span class="pre">WebsocketListener.type_encoders</span></code></a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#litestar.handlers.WebsocketListener.websocket_class"><code class="docutils literal notranslate"><span class="pre">WebsocketListener.websocket_class</span></code></a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#litestar.handlers.WebsocketListener.__init__"><code class="docutils literal notranslate"><span class="pre">WebsocketListener.__init__()</span></code></a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#litestar.handlers.WebsocketListener.on_accept"><code class="docutils literal notranslate"><span class="pre">WebsocketListener.on_accept()</span></code></a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#litestar.handlers.WebsocketListener.on_disconnect"><code class="docutils literal notranslate"><span class="pre">WebsocketListener.on_disconnect()</span></code></a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#litestar.handlers.WebsocketListener.on_receive"><code class="docutils literal notranslate"><span class="pre">WebsocketListener.on_receive()</span></code></a></li>
</ul>
</li>
Expand Down
Loading

0 comments on commit 57fa75d

Please sign in to comment.