Skip to content

Commit 4d73959

Browse files
committed
adding dev-v0.16.7 tag to this commit to ensure building
1 parent 5281dfa commit 4d73959

File tree

4 files changed

+45
-19
lines changed

4 files changed

+45
-19
lines changed

html/supertokens_python/constants.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ <h1 class="title">Module <code>supertokens_python.constants</code></h1>
4242
from __future__ import annotations
4343

4444
SUPPORTED_CDI_VERSIONS = [&#34;3.0&#34;]
45-
VERSION = &#34;0.16.6&#34;
45+
VERSION = &#34;0.16.7&#34;
4646
TELEMETRY = &#34;/telemetry&#34;
4747
USER_COUNT = &#34;/users/count&#34;
4848
USER_DELETE = &#34;/user/remove&#34;

html/supertokens_python/index.html

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,10 @@ <h1 class="title">Package <code>supertokens_python</code></h1>
6262
recipe_list: List[Callable[[supertokens.AppInfo], RecipeModule]],
6363
mode: Optional[Literal[&#34;asgi&#34;, &#34;wsgi&#34;]] = None,
6464
telemetry: Optional[bool] = None,
65+
debug: Optional[bool] = None,
6566
):
6667
return Supertokens.init(
67-
app_info,
68-
framework,
69-
supertokens_config,
70-
recipe_list,
71-
mode,
72-
telemetry,
68+
app_info, framework, supertokens_config, recipe_list, mode, telemetry, debug
7369
)
7470

7571

@@ -198,7 +194,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
198194
</details>
199195
</dd>
200196
<dt id="supertokens_python.init"><code class="name flex">
201-
<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)</span>
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: 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>
202198
</code></dt>
203199
<dd>
204200
<div class="desc"></div>
@@ -213,14 +209,10 @@ <h2 class="section-title" id="header-functions">Functions</h2>
213209
recipe_list: List[Callable[[supertokens.AppInfo], RecipeModule]],
214210
mode: Optional[Literal[&#34;asgi&#34;, &#34;wsgi&#34;]] = None,
215211
telemetry: Optional[bool] = None,
212+
debug: Optional[bool] = None,
216213
):
217214
return Supertokens.init(
218-
app_info,
219-
framework,
220-
supertokens_config,
221-
recipe_list,
222-
mode,
223-
telemetry,
215+
app_info, framework, supertokens_config, recipe_list, mode, telemetry, debug
224216
)</code></pre>
225217
</details>
226218
</dd>

html/supertokens_python/logger.html

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ <h1 class="title">Module <code>supertokens_python.logger</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-
4342
import json
4443
import logging
4544
from datetime import datetime
@@ -53,11 +52,16 @@ <h1 class="title">Module <code>supertokens_python.logger</code></h1>
5352

5453
supertokens_dir = path.dirname(__file__)
5554

55+
56+
def enable_debug_logging():
57+
_logger.setLevel(logging.DEBUG)
58+
59+
5660
# Configure logger
5761
_logger = logging.getLogger(NAMESPACE)
5862
debug_env = getenv(DEBUG_ENV_VAR, &#34;&#34;).lower()
5963
if debug_env == &#34;1&#34;:
60-
_logger.setLevel(logging.DEBUG)
64+
enable_debug_logging()
6165

6266

6367
def _get_log_timestamp() -&gt; str:
@@ -109,6 +113,19 @@ <h1 class="title">Module <code>supertokens_python.logger</code></h1>
109113
<section>
110114
<h2 class="section-title" id="header-functions">Functions</h2>
111115
<dl>
116+
<dt id="supertokens_python.logger.enable_debug_logging"><code class="name flex">
117+
<span>def <span class="ident">enable_debug_logging</span></span>(<span>)</span>
118+
</code></dt>
119+
<dd>
120+
<div class="desc"></div>
121+
<details class="source">
122+
<summary>
123+
<span>Expand source code</span>
124+
</summary>
125+
<pre><code class="python">def enable_debug_logging():
126+
_logger.setLevel(logging.DEBUG)</code></pre>
127+
</details>
128+
</dd>
112129
<dt id="supertokens_python.logger.get_maybe_none_as_str"><code class="name flex">
113130
<span>def <span class="ident">get_maybe_none_as_str</span></span>(<span>o: Optional[str]) ‑> str</span>
114131
</code></dt>
@@ -216,6 +233,7 @@ <h2>Index</h2>
216233
</li>
217234
<li><h3><a href="#header-functions">Functions</a></h3>
218235
<ul class="">
236+
<li><code><a title="supertokens_python.logger.enable_debug_logging" href="#supertokens_python.logger.enable_debug_logging">enable_debug_logging</a></code></li>
219237
<li><code><a title="supertokens_python.logger.get_maybe_none_as_str" href="#supertokens_python.logger.get_maybe_none_as_str">get_maybe_none_as_str</a></code></li>
220238
</ul>
221239
</li>

html/supertokens_python/supertokens.html

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ <h1 class="title">Module <code>supertokens_python.supertokens</code></h1>
4747

4848
from typing_extensions import Literal
4949

50-
from supertokens_python.logger import get_maybe_none_as_str, log_debug_message
50+
from supertokens_python.logger import (
51+
get_maybe_none_as_str,
52+
log_debug_message,
53+
enable_debug_logging,
54+
)
5155

5256
from .constants import FDI_KEY_HEADER, RID_KEY_HEADER, USER_COUNT, USER_DELETE, USERS
5357
from .exceptions import SuperTokensError
@@ -178,6 +182,7 @@ <h1 class="title">Module <code>supertokens_python.supertokens</code></h1>
178182
recipe_list: List[Callable[[AppInfo], RecipeModule]],
179183
mode: Optional[Literal[&#34;asgi&#34;, &#34;wsgi&#34;]],
180184
telemetry: Optional[bool],
185+
debug: Optional[bool],
181186
):
182187
if not isinstance(app_info, InputAppInfo): # type: ignore
183188
raise ValueError(&#34;app_info must be an instance of InputAppInfo&#34;)
@@ -193,6 +198,8 @@ <h1 class="title">Module <code>supertokens_python.supertokens</code></h1>
193198
mode,
194199
)
195200
self.supertokens_config = supertokens_config
201+
if debug is True:
202+
enable_debug_logging()
196203
self._telemetry_status: str = &#34;NONE&#34;
197204
log_debug_message(
198205
&#34;Started SuperTokens with debug logging (supertokens.init called)&#34;
@@ -245,6 +252,7 @@ <h1 class="title">Module <code>supertokens_python.supertokens</code></h1>
245252
recipe_list: List[Callable[[AppInfo], RecipeModule]],
246253
mode: Optional[Literal[&#34;asgi&#34;, &#34;wsgi&#34;]],
247254
telemetry: Optional[bool],
255+
debug: Optional[bool],
248256
):
249257
if Supertokens.__instance is None:
250258
Supertokens.__instance = Supertokens(
@@ -254,6 +262,7 @@ <h1 class="title">Module <code>supertokens_python.supertokens</code></h1>
254262
recipe_list,
255263
mode,
256264
telemetry,
265+
debug,
257266
)
258267
PostSTInitCallbacks.run_post_init_callbacks()
259268

@@ -790,7 +799,7 @@ <h3>Methods</h3>
790799
</dd>
791800
<dt id="supertokens_python.supertokens.Supertokens"><code class="flex name class">
792801
<span>class <span class="ident">Supertokens</span></span>
793-
<span>(</span><span>app_info: <a title="supertokens_python.supertokens.InputAppInfo" href="#supertokens_python.supertokens.InputAppInfo">InputAppInfo</a>, framework: "Literal['fastapi', 'flask', 'django']", supertokens_config: <a title="supertokens_python.supertokens.SupertokensConfig" href="#supertokens_python.supertokens.SupertokensConfig">SupertokensConfig</a>, recipe_list: List[Callable[[<a title="supertokens_python.supertokens.AppInfo" href="#supertokens_python.supertokens.AppInfo">AppInfo</a>], RecipeModule]], mode: "Optional[Literal['asgi', 'wsgi']]", telemetry: Optional[bool])</span>
802+
<span>(</span><span>app_info: <a title="supertokens_python.supertokens.InputAppInfo" href="#supertokens_python.supertokens.InputAppInfo">InputAppInfo</a>, framework: "Literal['fastapi', 'flask', 'django']", supertokens_config: <a title="supertokens_python.supertokens.SupertokensConfig" href="#supertokens_python.supertokens.SupertokensConfig">SupertokensConfig</a>, recipe_list: List[Callable[[<a title="supertokens_python.supertokens.AppInfo" href="#supertokens_python.supertokens.AppInfo">AppInfo</a>], RecipeModule]], mode: "Optional[Literal['asgi', 'wsgi']]", telemetry: Optional[bool], debug: Optional[bool])</span>
794803
</code></dt>
795804
<dd>
796805
<div class="desc"></div>
@@ -809,6 +818,7 @@ <h3>Methods</h3>
809818
recipe_list: List[Callable[[AppInfo], RecipeModule]],
810819
mode: Optional[Literal[&#34;asgi&#34;, &#34;wsgi&#34;]],
811820
telemetry: Optional[bool],
821+
debug: Optional[bool],
812822
):
813823
if not isinstance(app_info, InputAppInfo): # type: ignore
814824
raise ValueError(&#34;app_info must be an instance of InputAppInfo&#34;)
@@ -824,6 +834,8 @@ <h3>Methods</h3>
824834
mode,
825835
)
826836
self.supertokens_config = supertokens_config
837+
if debug is True:
838+
enable_debug_logging()
827839
self._telemetry_status: str = &#34;NONE&#34;
828840
log_debug_message(
829841
&#34;Started SuperTokens with debug logging (supertokens.init called)&#34;
@@ -876,6 +888,7 @@ <h3>Methods</h3>
876888
recipe_list: List[Callable[[AppInfo], RecipeModule]],
877889
mode: Optional[Literal[&#34;asgi&#34;, &#34;wsgi&#34;]],
878890
telemetry: Optional[bool],
891+
debug: Optional[bool],
879892
):
880893
if Supertokens.__instance is None:
881894
Supertokens.__instance = Supertokens(
@@ -885,6 +898,7 @@ <h3>Methods</h3>
885898
recipe_list,
886899
mode,
887900
telemetry,
901+
debug,
888902
)
889903
PostSTInitCallbacks.run_post_init_callbacks()
890904

@@ -1293,7 +1307,7 @@ <h3>Static methods</h3>
12931307
</details>
12941308
</dd>
12951309
<dt id="supertokens_python.supertokens.Supertokens.init"><code class="name flex">
1296-
<span>def <span class="ident">init</span></span>(<span>app_info: <a title="supertokens_python.supertokens.InputAppInfo" href="#supertokens_python.supertokens.InputAppInfo">InputAppInfo</a>, framework: "Literal['fastapi', 'flask', 'django']", supertokens_config: <a title="supertokens_python.supertokens.SupertokensConfig" href="#supertokens_python.supertokens.SupertokensConfig">SupertokensConfig</a>, recipe_list: List[Callable[[<a title="supertokens_python.supertokens.AppInfo" href="#supertokens_python.supertokens.AppInfo">AppInfo</a>], RecipeModule]], mode: "Optional[Literal['asgi', 'wsgi']]", telemetry: Optional[bool])</span>
1310+
<span>def <span class="ident">init</span></span>(<span>app_info: <a title="supertokens_python.supertokens.InputAppInfo" href="#supertokens_python.supertokens.InputAppInfo">InputAppInfo</a>, framework: "Literal['fastapi', 'flask', 'django']", supertokens_config: <a title="supertokens_python.supertokens.SupertokensConfig" href="#supertokens_python.supertokens.SupertokensConfig">SupertokensConfig</a>, recipe_list: List[Callable[[<a title="supertokens_python.supertokens.AppInfo" href="#supertokens_python.supertokens.AppInfo">AppInfo</a>], RecipeModule]], mode: "Optional[Literal['asgi', 'wsgi']]", telemetry: Optional[bool], debug: Optional[bool])</span>
12971311
</code></dt>
12981312
<dd>
12991313
<div class="desc"></div>
@@ -1309,6 +1323,7 @@ <h3>Static methods</h3>
13091323
recipe_list: List[Callable[[AppInfo], RecipeModule]],
13101324
mode: Optional[Literal[&#34;asgi&#34;, &#34;wsgi&#34;]],
13111325
telemetry: Optional[bool],
1326+
debug: Optional[bool],
13121327
):
13131328
if Supertokens.__instance is None:
13141329
Supertokens.__instance = Supertokens(
@@ -1318,6 +1333,7 @@ <h3>Static methods</h3>
13181333
recipe_list,
13191334
mode,
13201335
telemetry,
1336+
debug,
13211337
)
13221338
PostSTInitCallbacks.run_post_init_callbacks()</code></pre>
13231339
</details>

0 commit comments

Comments
 (0)