Skip to content

Commit 162f4b9

Browse files
author
Rishabh
committed
adding dev-v0.5.1 tag to this commit to ensure building
1 parent be3e8fc commit 162f4b9

File tree

8 files changed

+82
-230
lines changed

8 files changed

+82
-230
lines changed

html/supertokens_python/constants.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ <h1 class="title">Module <code>supertokens_python.constants</code></h1>
4040
# License for the specific language governing permissions and limitations
4141
# under the License.
4242
SUPPORTED_CDI_VERSIONS = [&#39;2.9&#39;, &#39;2.10&#39;, &#39;2.11&#39;, &#39;2.12&#39;]
43-
VERSION = &#39;0.5.0&#39;
43+
VERSION = &#39;0.5.1&#39;
4444
TELEMETRY = &#39;/telemetry&#39;
4545
USER_COUNT = &#39;/users/count&#39;
4646
USER_DELETE = &#39;/user/remove&#39;

html/supertokens_python/framework/django/framework.html

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,21 @@ <h1 class="title">Module <code>supertokens_python.framework.django.framework</co
4040
# License for the specific language governing permissions and limitations
4141
# under the License.
4242

43-
from supertokens_python.framework.django.django_request import DjangoRequest
43+
from __future__ import annotations
44+
45+
from typing import TYPE_CHECKING
46+
4447
from supertokens_python.framework.types import Framework
4548

49+
if TYPE_CHECKING:
50+
from django.http import HttpRequest
51+
4652

4753
class DjangoFramework(Framework):
48-
from django.http import HttpRequest
4954

5055
def wrap_request(self, unwrapped: HttpRequest):
56+
from supertokens_python.framework.django.django_request import \
57+
DjangoRequest
5158
return DjangoRequest(unwrapped)</code></pre>
5259
</details>
5360
</section>
@@ -71,27 +78,21 @@ <h2 class="section-title" id="header-classes">Classes</h2>
7178
<span>Expand source code</span>
7279
</summary>
7380
<pre><code class="python">class DjangoFramework(Framework):
74-
from django.http import HttpRequest
7581

7682
def wrap_request(self, unwrapped: HttpRequest):
83+
from supertokens_python.framework.django.django_request import \
84+
DjangoRequest
7785
return DjangoRequest(unwrapped)</code></pre>
7886
</details>
7987
<h3>Ancestors</h3>
8088
<ul class="hlist">
8189
<li><a title="supertokens_python.framework.types.Framework" href="../types.html#supertokens_python.framework.types.Framework">Framework</a></li>
8290
<li>abc.ABC</li>
8391
</ul>
84-
<h3>Class variables</h3>
85-
<dl>
86-
<dt id="supertokens_python.framework.django.framework.DjangoFramework.HttpRequest"><code class="name">var <span class="ident">HttpRequest</span></code></dt>
87-
<dd>
88-
<div class="desc"><p>A basic HTTP request.</p></div>
89-
</dd>
90-
</dl>
9192
<h3>Methods</h3>
9293
<dl>
9394
<dt id="supertokens_python.framework.django.framework.DjangoFramework.wrap_request"><code class="name flex">
94-
<span>def <span class="ident">wrap_request</span></span>(<span>self, unwrapped: django.http.request.HttpRequest)</span>
95+
<span>def <span class="ident">wrap_request</span></span>(<span>self, unwrapped: HttpRequest)</span>
9596
</code></dt>
9697
<dd>
9798
<div class="desc"></div>
@@ -100,6 +101,8 @@ <h3>Methods</h3>
100101
<span>Expand source code</span>
101102
</summary>
102103
<pre><code class="python">def wrap_request(self, unwrapped: HttpRequest):
104+
from supertokens_python.framework.django.django_request import \
105+
DjangoRequest
103106
return DjangoRequest(unwrapped)</code></pre>
104107
</details>
105108
</dd>
@@ -124,7 +127,6 @@ <h1>Index</h1>
124127
<li>
125128
<h4><code><a title="supertokens_python.framework.django.framework.DjangoFramework" href="#supertokens_python.framework.django.framework.DjangoFramework">DjangoFramework</a></code></h4>
126129
<ul class="">
127-
<li><code><a title="supertokens_python.framework.django.framework.DjangoFramework.HttpRequest" href="#supertokens_python.framework.django.framework.DjangoFramework.HttpRequest">HttpRequest</a></code></li>
128130
<li><code><a title="supertokens_python.framework.django.framework.DjangoFramework.wrap_request" href="#supertokens_python.framework.django.framework.DjangoFramework.wrap_request">wrap_request</a></code></li>
129131
</ul>
130132
</li>

html/supertokens_python/framework/fastapi/fastapi_middleware.html

Lines changed: 7 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,19 @@ <h1 class="title">Module <code>supertokens_python.framework.fastapi.fastapi_midd
3939
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
4040
# License for the specific language governing permissions and limitations
4141
# under the License.
42+
from __future__ import annotations
4243

43-
from typing import Union
44+
from typing import TYPE_CHECKING, Union
4445

4546
from starlette.middleware.base import (BaseHTTPMiddleware,
4647
RequestResponseEndpoint)
4748
from supertokens_python.framework import BaseResponse
4849

50+
if TYPE_CHECKING:
51+
from fastapi import FastAPI, Request
52+
4953

5054
class Middleware(BaseHTTPMiddleware):
51-
from fastapi import FastAPI, Request
5255

5356
def __init__(self, app: FastAPI):
5457
super().__init__(app)
@@ -98,7 +101,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
98101
<dl>
99102
<dt id="supertokens_python.framework.fastapi.fastapi_middleware.Middleware"><code class="flex name class">
100103
<span>class <span class="ident">Middleware</span></span>
101-
<span>(</span><span>app: fastapi.applications.FastAPI)</span>
104+
<span>(</span><span>app: FastAPI)</span>
102105
</code></dt>
103106
<dd>
104107
<div class="desc"></div>
@@ -107,7 +110,6 @@ <h2 class="section-title" id="header-classes">Classes</h2>
107110
<span>Expand source code</span>
108111
</summary>
109112
<pre><code class="python">class Middleware(BaseHTTPMiddleware):
110-
from fastapi import FastAPI, Request
111113

112114
def __init__(self, app: FastAPI):
113115
super().__init__(app)
@@ -149,44 +151,10 @@ <h3>Ancestors</h3>
149151
<ul class="hlist">
150152
<li>starlette.middleware.base.BaseHTTPMiddleware</li>
151153
</ul>
152-
<h3>Class variables</h3>
153-
<dl>
154-
<dt id="supertokens_python.framework.fastapi.fastapi_middleware.Middleware.FastAPI"><code class="name">var <span class="ident">FastAPI</span></code></dt>
155-
<dd>
156-
<div class="desc"><p>Creates an application instance.</p>
157-
<p><strong>Parameters:</strong></p>
158-
<ul>
159-
<li><strong>debug</strong> - Boolean indicating if debug tracebacks should be returned on errors.</li>
160-
<li><strong>routes</strong> - A list of routes to serve incoming HTTP and WebSocket requests.</li>
161-
<li><strong>middleware</strong> - A list of middleware to run for every request. A starlette
162-
application will always automatically include two middleware classes.
163-
<code>ServerErrorMiddleware</code> is added as the very outermost middleware, to handle
164-
any uncaught errors occurring anywhere in the entire stack.
165-
<code>ExceptionMiddleware</code> is added as the very innermost middleware, to deal
166-
with handled exception cases occurring in the routing or endpoints.</li>
167-
<li><strong>exception_handlers</strong> - A dictionary mapping either integer status codes,
168-
or exception class types onto callables which handle the exceptions.
169-
Exception handler callables should be of the form
170-
<code>handler(request, exc) -&gt; response</code> and may be be either standard functions, or
171-
async functions.</li>
172-
<li><strong>on_startup</strong> - A list of callables to run on application startup.
173-
Startup handler callables do not take any arguments, and may be be either
174-
standard functions, or async functions.</li>
175-
<li><strong>on_shutdown</strong> - A list of callables to run on application shutdown.
176-
Shutdown handler callables do not take any arguments, and may be be either
177-
standard functions, or async functions.</li>
178-
</ul></div>
179-
</dd>
180-
<dt id="supertokens_python.framework.fastapi.fastapi_middleware.Middleware.Request"><code class="name">var <span class="ident">Request</span></code></dt>
181-
<dd>
182-
<div class="desc"><p>A base class for incoming HTTP connections, that is used to provide
183-
any functionality that is common to both <code>Request</code> and <code>WebSocket</code>.</p></div>
184-
</dd>
185-
</dl>
186154
<h3>Methods</h3>
187155
<dl>
188156
<dt id="supertokens_python.framework.fastapi.fastapi_middleware.Middleware.dispatch"><code class="name flex">
189-
<span>async def <span class="ident">dispatch</span></span>(<span>self, request: starlette.requests.Request, call_next: Callable[[starlette.requests.Request], Awaitable[starlette.responses.Response]])</span>
157+
<span>async def <span class="ident">dispatch</span></span>(<span>self, request: Request, call_next: RequestResponseEndpoint)</span>
190158
</code></dt>
191159
<dd>
192160
<div class="desc"></div>
@@ -249,8 +217,6 @@ <h1>Index</h1>
249217
<li>
250218
<h4><code><a title="supertokens_python.framework.fastapi.fastapi_middleware.Middleware" href="#supertokens_python.framework.fastapi.fastapi_middleware.Middleware">Middleware</a></code></h4>
251219
<ul class="">
252-
<li><code><a title="supertokens_python.framework.fastapi.fastapi_middleware.Middleware.FastAPI" href="#supertokens_python.framework.fastapi.fastapi_middleware.Middleware.FastAPI">FastAPI</a></code></li>
253-
<li><code><a title="supertokens_python.framework.fastapi.fastapi_middleware.Middleware.Request" href="#supertokens_python.framework.fastapi.fastapi_middleware.Middleware.Request">Request</a></code></li>
254220
<li><code><a title="supertokens_python.framework.fastapi.fastapi_middleware.Middleware.dispatch" href="#supertokens_python.framework.fastapi.fastapi_middleware.Middleware.dispatch">dispatch</a></code></li>
255221
</ul>
256222
</li>

html/supertokens_python/framework/fastapi/framework.html

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,21 @@ <h1 class="title">Module <code>supertokens_python.framework.fastapi.framework</c
3939
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
4040
# License for the specific language governing permissions and limitations
4141
# under the License.
42+
from __future__ import annotations
43+
44+
from typing import TYPE_CHECKING
4245

43-
from supertokens_python.framework.fastapi.fastapi_request import FastApiRequest
4446
from supertokens_python.framework.types import Framework
4547

48+
if TYPE_CHECKING:
49+
from fastapi import Request
50+
4651

4752
class FastapiFramework(Framework):
48-
from fastapi import Request
4953

5054
def wrap_request(self, unwrapped: Request):
55+
from supertokens_python.framework.fastapi.fastapi_request import \
56+
FastApiRequest
5157
return FastApiRequest(unwrapped)</code></pre>
5258
</details>
5359
</section>
@@ -71,28 +77,21 @@ <h2 class="section-title" id="header-classes">Classes</h2>
7177
<span>Expand source code</span>
7278
</summary>
7379
<pre><code class="python">class FastapiFramework(Framework):
74-
from fastapi import Request
7580

7681
def wrap_request(self, unwrapped: Request):
82+
from supertokens_python.framework.fastapi.fastapi_request import \
83+
FastApiRequest
7784
return FastApiRequest(unwrapped)</code></pre>
7885
</details>
7986
<h3>Ancestors</h3>
8087
<ul class="hlist">
8188
<li><a title="supertokens_python.framework.types.Framework" href="../types.html#supertokens_python.framework.types.Framework">Framework</a></li>
8289
<li>abc.ABC</li>
8390
</ul>
84-
<h3>Class variables</h3>
85-
<dl>
86-
<dt id="supertokens_python.framework.fastapi.framework.FastapiFramework.Request"><code class="name">var <span class="ident">Request</span></code></dt>
87-
<dd>
88-
<div class="desc"><p>A base class for incoming HTTP connections, that is used to provide
89-
any functionality that is common to both <code>Request</code> and <code>WebSocket</code>.</p></div>
90-
</dd>
91-
</dl>
9291
<h3>Methods</h3>
9392
<dl>
9493
<dt id="supertokens_python.framework.fastapi.framework.FastapiFramework.wrap_request"><code class="name flex">
95-
<span>def <span class="ident">wrap_request</span></span>(<span>self, unwrapped: starlette.requests.Request)</span>
94+
<span>def <span class="ident">wrap_request</span></span>(<span>self, unwrapped: Request)</span>
9695
</code></dt>
9796
<dd>
9897
<div class="desc"></div>
@@ -101,6 +100,8 @@ <h3>Methods</h3>
101100
<span>Expand source code</span>
102101
</summary>
103102
<pre><code class="python">def wrap_request(self, unwrapped: Request):
103+
from supertokens_python.framework.fastapi.fastapi_request import \
104+
FastApiRequest
104105
return FastApiRequest(unwrapped)</code></pre>
105106
</details>
106107
</dd>
@@ -125,7 +126,6 @@ <h1>Index</h1>
125126
<li>
126127
<h4><code><a title="supertokens_python.framework.fastapi.framework.FastapiFramework" href="#supertokens_python.framework.fastapi.framework.FastapiFramework">FastapiFramework</a></code></h4>
127128
<ul class="">
128-
<li><code><a title="supertokens_python.framework.fastapi.framework.FastapiFramework.Request" href="#supertokens_python.framework.fastapi.framework.FastapiFramework.Request">Request</a></code></li>
129129
<li><code><a title="supertokens_python.framework.fastapi.framework.FastapiFramework.wrap_request" href="#supertokens_python.framework.fastapi.framework.FastapiFramework.wrap_request">wrap_request</a></code></li>
130130
</ul>
131131
</li>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy