Skip to content

Commit 687b11c

Browse files
committed
adding dev-v0.25.0 tag to this commit to ensure building
1 parent 9a67aa1 commit 687b11c

File tree

174 files changed

+48126
-7716
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

174 files changed

+48126
-7716
lines changed

html/supertokens_python/asyncio/index.html

Lines changed: 140 additions & 42 deletions
Large diffs are not rendered by default.

html/supertokens_python/auth_utils.html

Lines changed: 2491 additions & 0 deletions
Large diffs are not rendered by default.

html/supertokens_python/constants.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,11 @@ <h1 class="title">Module <code>supertokens_python.constants</code></h1>
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+
4243
from __future__ import annotations
4344

44-
SUPPORTED_CDI_VERSIONS = [&#34;3.0&#34;]
45-
VERSION = &#34;0.24.4&#34;
45+
SUPPORTED_CDI_VERSIONS = [&#34;5.1&#34;]
46+
VERSION = &#34;0.25.0&#34;
4647
TELEMETRY = &#34;/telemetry&#34;
4748
USER_COUNT = &#34;/users/count&#34;
4849
USER_DELETE = &#34;/user/remove&#34;
@@ -55,7 +56,7 @@ <h1 class="title">Module <code>supertokens_python.constants</code></h1>
5556
FDI_KEY_HEADER = &#34;fdi-version&#34;
5657
API_VERSION = &#34;/apiversion&#34;
5758
API_VERSION_HEADER = &#34;cdi-version&#34;
58-
DASHBOARD_VERSION = &#34;0.7&#34;
59+
DASHBOARD_VERSION = &#34;0.13&#34;
5960
ONE_YEAR_IN_MS = 31536000000
6061
RATE_LIMIT_STATUS_CODE = 429</code></pre>
6162
</details>

html/supertokens_python/index.html

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ <h1 class="title">Package <code>supertokens_python</code></h1>
4545
from typing_extensions import Literal
4646

4747
from supertokens_python.framework.request import BaseRequest
48+
from supertokens_python.types import RecipeUserId
4849

4950
from . import supertokens
5051
from .recipe_module import RecipeModule
@@ -76,7 +77,11 @@ <h1 class="title">Package <code>supertokens_python</code></h1>
7677
def get_request_from_user_context(
7778
user_context: Optional[Dict[str, Any]],
7879
) -&gt; Optional[BaseRequest]:
79-
return Supertokens.get_instance().get_request_from_user_context(user_context)</code></pre>
80+
return Supertokens.get_instance().get_request_from_user_context(user_context)
81+
82+
83+
def convert_to_recipe_user_id(user_id: str) -&gt; RecipeUserId:
84+
return RecipeUserId(user_id)</code></pre>
8085
</details>
8186
</section>
8287
<section>
@@ -90,6 +95,10 @@ <h2 class="section-title" id="header-submodules">Sub-modules</h2>
9095
<dd>
9196
<div class="desc"></div>
9297
</dd>
98+
<dt><code class="name"><a title="supertokens_python.auth_utils" href="auth_utils.html">supertokens_python.auth_utils</a></code></dt>
99+
<dd>
100+
<div class="desc"></div>
101+
</dd>
93102
<dt><code class="name"><a title="supertokens_python.constants" href="constants.html">supertokens_python.constants</a></code></dt>
94103
<dd>
95104
<div class="desc"></div>
@@ -165,6 +174,19 @@ <h2 class="section-title" id="header-submodules">Sub-modules</h2>
165174
<section>
166175
<h2 class="section-title" id="header-functions">Functions</h2>
167176
<dl>
177+
<dt id="supertokens_python.convert_to_recipe_user_id"><code class="name flex">
178+
<span>def <span class="ident">convert_to_recipe_user_id</span></span>(<span>user_id: str) ‑> <a title="supertokens_python.types.RecipeUserId" href="types.html#supertokens_python.types.RecipeUserId">RecipeUserId</a></span>
179+
</code></dt>
180+
<dd>
181+
<div class="desc"></div>
182+
<details class="source">
183+
<summary>
184+
<span>Expand source code</span>
185+
</summary>
186+
<pre><code class="python">def convert_to_recipe_user_id(user_id: str) -&gt; RecipeUserId:
187+
return RecipeUserId(user_id)</code></pre>
188+
</details>
189+
</dd>
168190
<dt id="supertokens_python.get_all_cors_headers"><code class="name flex">
169191
<span>def <span class="ident">get_all_cors_headers</span></span>(<span>) ‑> List[str]</span>
170192
</code></dt>
@@ -194,7 +216,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
194216
</details>
195217
</dd>
196218
<dt id="supertokens_python.init"><code class="name flex">
197-
<span>def <span class="ident">init</span></span>(<span>app_info: <a title="supertokens_python.supertokens.InputAppInfo" href="supertokens.html#supertokens_python.supertokens.InputAppInfo">InputAppInfo</a>, framework: typing_extensions.Literal['fastapi', 'flask', 'django'], supertokens_config: <a title="supertokens_python.supertokens.SupertokensConfig" href="supertokens.html#supertokens_python.supertokens.SupertokensConfig">SupertokensConfig</a>, recipe_list: List[Callable[[<a title="supertokens_python.supertokens.AppInfo" href="supertokens.html#supertokens_python.supertokens.AppInfo">AppInfo</a>], <a title="supertokens_python.recipe_module.RecipeModule" href="recipe_module.html#supertokens_python.recipe_module.RecipeModule">RecipeModule</a>]], mode: Optional[typing_extensions.Literal['asgi', 'wsgi']] = None, telemetry: Optional[bool] = None, debug: Optional[bool] = None)</span>
219+
<span>def <span class="ident">init</span></span>(<span>app_info: <a title="supertokens_python.supertokens.InputAppInfo" href="supertokens.html#supertokens_python.supertokens.InputAppInfo">InputAppInfo</a>, framework: Literal['fastapi', 'flask', 'django'], supertokens_config: <a title="supertokens_python.supertokens.SupertokensConfig" href="supertokens.html#supertokens_python.supertokens.SupertokensConfig">SupertokensConfig</a>, recipe_list: List[Callable[[<a title="supertokens_python.supertokens.AppInfo" href="supertokens.html#supertokens_python.supertokens.AppInfo">AppInfo</a>], <a title="supertokens_python.recipe_module.RecipeModule" href="recipe_module.html#supertokens_python.recipe_module.RecipeModule">RecipeModule</a>]], mode: Optional[Literal['asgi', 'wsgi']] = None, telemetry: Optional[bool] = None, debug: Optional[bool] = None)</span>
198220
</code></dt>
199221
<dd>
200222
<div class="desc"></div>
@@ -231,6 +253,7 @@ <h2>Index</h2>
231253
<ul>
232254
<li><code><a title="supertokens_python.async_to_sync_wrapper" href="async_to_sync_wrapper.html">supertokens_python.async_to_sync_wrapper</a></code></li>
233255
<li><code><a title="supertokens_python.asyncio" href="asyncio/index.html">supertokens_python.asyncio</a></code></li>
256+
<li><code><a title="supertokens_python.auth_utils" href="auth_utils.html">supertokens_python.auth_utils</a></code></li>
234257
<li><code><a title="supertokens_python.constants" href="constants.html">supertokens_python.constants</a></code></li>
235258
<li><code><a title="supertokens_python.exceptions" href="exceptions.html">supertokens_python.exceptions</a></code></li>
236259
<li><code><a title="supertokens_python.framework" href="framework/index.html">supertokens_python.framework</a></code></li>
@@ -252,6 +275,7 @@ <h2>Index</h2>
252275
</li>
253276
<li><h3><a href="#header-functions">Functions</a></h3>
254277
<ul class="">
278+
<li><code><a title="supertokens_python.convert_to_recipe_user_id" href="#supertokens_python.convert_to_recipe_user_id">convert_to_recipe_user_id</a></code></li>
255279
<li><code><a title="supertokens_python.get_all_cors_headers" href="#supertokens_python.get_all_cors_headers">get_all_cors_headers</a></code></li>
256280
<li><code><a title="supertokens_python.get_request_from_user_context" href="#supertokens_python.get_request_from_user_context">get_request_from_user_context</a></code></li>
257281
<li><code><a title="supertokens_python.init" href="#supertokens_python.init">init</a></code></li>

html/supertokens_python/ingredients/emaildelivery/types.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@ <h3>Ancestors</h3>
214214
</dd>
215215
<dt id="supertokens_python.ingredients.emaildelivery.types.EmailDeliveryInterface"><code class="flex name class">
216216
<span>class <span class="ident">EmailDeliveryInterface</span></span>
217-
<span>(</span><span>*args, **kwds)</span>
218217
</code></dt>
219218
<dd>
220219
<div class="desc"><p>Helper class that provides a standard way to create an ABC using

html/supertokens_python/ingredients/smsdelivery/types.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,6 @@ <h3>Ancestors</h3>
210210
</dd>
211211
<dt id="supertokens_python.ingredients.smsdelivery.types.SMSDeliveryInterface"><code class="flex name class">
212212
<span>class <span class="ident">SMSDeliveryInterface</span></span>
213-
<span>(</span><span>*args, **kwds)</span>
214213
</code></dt>
215214
<dd>
216215
<div class="desc"><p>Helper class that provides a standard way to create an ABC using

html/supertokens_python/normalised_url_domain.html

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -39,31 +39,29 @@ <h1 class="title">Module <code>supertokens_python.normalised_url_domain</code></
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
4342

43+
from __future__ import annotations
4444
from typing import TYPE_CHECKING
4545
from urllib.parse import urlparse
46-
4746
from .utils import is_an_ip_address
47+
from .exceptions import raise_general_exception
4848

4949
if TYPE_CHECKING:
5050
pass
51-
from .exceptions import raise_general_exception
5251

5352

5453
class NormalisedURLDomain:
5554
def __init__(self, url: str):
56-
self.__value = normalise_domain_path_or_throw_error(url)
55+
self.__value = normalise_url_domain_or_throw_error(url)
5756

5857
def get_as_string_dangerous(self):
5958
return self.__value
6059

6160

62-
def normalise_domain_path_or_throw_error(
61+
def normalise_url_domain_or_throw_error(
6362
input_str: str, ignore_protocol: bool = False
6463
) -&gt; str:
6564
input_str = input_str.strip().lower()
66-
6765
try:
6866
if (
6967
(not input_str.startswith(&#34;http://&#34;))
@@ -72,7 +70,6 @@ <h1 class="title">Module <code>supertokens_python.normalised_url_domain</code></
7270
):
7371
raise Exception(&#34;converting to proper URL&#34;)
7472
url_obj = urlparse(input_str)
75-
7673
if ignore_protocol:
7774
if url_obj.hostname is None:
7875
raise Exception(&#34;Should never come here&#34;)
@@ -84,17 +81,13 @@ <h1 class="title">Module <code>supertokens_python.normalised_url_domain</code></
8481
input_str = &#34;https://&#34; + url_obj.netloc
8582
else:
8683
input_str = url_obj.scheme + &#34;://&#34; + url_obj.netloc
87-
8884
return input_str
8985
except Exception:
9086
pass
91-
9287
if input_str.startswith(&#34;/&#34;):
9388
raise_general_exception(&#34;Please provide a valid domain name&#34;)
94-
9589
if input_str.startswith(&#34;.&#34;):
9690
input_str = input_str[1:]
97-
9891
if (
9992
(&#34;.&#34; in input_str or input_str.startswith(&#34;localhost&#34;))
10093
and (not input_str.startswith(&#34;http://&#34;))
@@ -103,7 +96,7 @@ <h1 class="title">Module <code>supertokens_python.normalised_url_domain</code></
10396
input_str = &#34;https://&#34; + input_str
10497
try:
10598
urlparse(input_str)
106-
return normalise_domain_path_or_throw_error(input_str, True)
99+
return normalise_url_domain_or_throw_error(input_str, True)
107100
except Exception:
108101
pass
109102
raise_general_exception(&#34;Please provide a valid domain name&#34;)</code></pre>
@@ -116,20 +109,19 @@ <h1 class="title">Module <code>supertokens_python.normalised_url_domain</code></
116109
<section>
117110
<h2 class="section-title" id="header-functions">Functions</h2>
118111
<dl>
119-
<dt id="supertokens_python.normalised_url_domain.normalise_domain_path_or_throw_error"><code class="name flex">
120-
<span>def <span class="ident">normalise_domain_path_or_throw_error</span></span>(<span>input_str: str, ignore_protocol: bool = False) ‑> str</span>
112+
<dt id="supertokens_python.normalised_url_domain.normalise_url_domain_or_throw_error"><code class="name flex">
113+
<span>def <span class="ident">normalise_url_domain_or_throw_error</span></span>(<span>input_str: str, ignore_protocol: bool = False) ‑> str</span>
121114
</code></dt>
122115
<dd>
123116
<div class="desc"></div>
124117
<details class="source">
125118
<summary>
126119
<span>Expand source code</span>
127120
</summary>
128-
<pre><code class="python">def normalise_domain_path_or_throw_error(
121+
<pre><code class="python">def normalise_url_domain_or_throw_error(
129122
input_str: str, ignore_protocol: bool = False
130123
) -&gt; str:
131124
input_str = input_str.strip().lower()
132-
133125
try:
134126
if (
135127
(not input_str.startswith(&#34;http://&#34;))
@@ -138,7 +130,6 @@ <h2 class="section-title" id="header-functions">Functions</h2>
138130
):
139131
raise Exception(&#34;converting to proper URL&#34;)
140132
url_obj = urlparse(input_str)
141-
142133
if ignore_protocol:
143134
if url_obj.hostname is None:
144135
raise Exception(&#34;Should never come here&#34;)
@@ -150,17 +141,13 @@ <h2 class="section-title" id="header-functions">Functions</h2>
150141
input_str = &#34;https://&#34; + url_obj.netloc
151142
else:
152143
input_str = url_obj.scheme + &#34;://&#34; + url_obj.netloc
153-
154144
return input_str
155145
except Exception:
156146
pass
157-
158147
if input_str.startswith(&#34;/&#34;):
159148
raise_general_exception(&#34;Please provide a valid domain name&#34;)
160-
161149
if input_str.startswith(&#34;.&#34;):
162150
input_str = input_str[1:]
163-
164151
if (
165152
(&#34;.&#34; in input_str or input_str.startswith(&#34;localhost&#34;))
166153
and (not input_str.startswith(&#34;http://&#34;))
@@ -169,7 +156,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
169156
input_str = &#34;https://&#34; + input_str
170157
try:
171158
urlparse(input_str)
172-
return normalise_domain_path_or_throw_error(input_str, True)
159+
return normalise_url_domain_or_throw_error(input_str, True)
173160
except Exception:
174161
pass
175162
raise_general_exception(&#34;Please provide a valid domain name&#34;)</code></pre>
@@ -192,7 +179,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
192179
</summary>
193180
<pre><code class="python">class NormalisedURLDomain:
194181
def __init__(self, url: str):
195-
self.__value = normalise_domain_path_or_throw_error(url)
182+
self.__value = normalise_url_domain_or_throw_error(url)
196183

197184
def get_as_string_dangerous(self):
198185
return self.__value</code></pre>
@@ -230,7 +217,7 @@ <h2>Index</h2>
230217
</li>
231218
<li><h3><a href="#header-functions">Functions</a></h3>
232219
<ul class="">
233-
<li><code><a title="supertokens_python.normalised_url_domain.normalise_domain_path_or_throw_error" href="#supertokens_python.normalised_url_domain.normalise_domain_path_or_throw_error">normalise_domain_path_or_throw_error</a></code></li>
220+
<li><code><a title="supertokens_python.normalised_url_domain.normalise_url_domain_or_throw_error" href="#supertokens_python.normalised_url_domain.normalise_url_domain_or_throw_error">normalise_url_domain_or_throw_error</a></code></li>
234221
</ul>
235222
</li>
236223
<li><h3><a href="#header-classes">Classes</a></h3>

0 commit comments

Comments
 (0)