Skip to content

Commit

Permalink
adding dev-v0.16.7 tag to this commit to ensure building
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabhpoddar committed Nov 3, 2023
1 parent 5281dfa commit 4d73959
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 19 deletions.
2 changes: 1 addition & 1 deletion html/supertokens_python/constants.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ <h1 class="title">Module <code>supertokens_python.constants</code></h1>
from __future__ import annotations

SUPPORTED_CDI_VERSIONS = [&#34;3.0&#34;]
VERSION = &#34;0.16.6&#34;
VERSION = &#34;0.16.7&#34;
TELEMETRY = &#34;/telemetry&#34;
USER_COUNT = &#34;/users/count&#34;
USER_DELETE = &#34;/user/remove&#34;
Expand Down
18 changes: 5 additions & 13 deletions html/supertokens_python/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,10 @@ <h1 class="title">Package <code>supertokens_python</code></h1>
recipe_list: List[Callable[[supertokens.AppInfo], RecipeModule]],
mode: Optional[Literal[&#34;asgi&#34;, &#34;wsgi&#34;]] = None,
telemetry: Optional[bool] = None,
debug: Optional[bool] = None,
):
return Supertokens.init(
app_info,
framework,
supertokens_config,
recipe_list,
mode,
telemetry,
app_info, framework, supertokens_config, recipe_list, mode, telemetry, debug
)


Expand Down Expand Up @@ -198,7 +194,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
</details>
</dd>
<dt id="supertokens_python.init"><code class="name flex">
<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>
<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>
</code></dt>
<dd>
<div class="desc"></div>
Expand All @@ -213,14 +209,10 @@ <h2 class="section-title" id="header-functions">Functions</h2>
recipe_list: List[Callable[[supertokens.AppInfo], RecipeModule]],
mode: Optional[Literal[&#34;asgi&#34;, &#34;wsgi&#34;]] = None,
telemetry: Optional[bool] = None,
debug: Optional[bool] = None,
):
return Supertokens.init(
app_info,
framework,
supertokens_config,
recipe_list,
mode,
telemetry,
app_info, framework, supertokens_config, recipe_list, mode, telemetry, debug
)</code></pre>
</details>
</dd>
Expand Down
22 changes: 20 additions & 2 deletions html/supertokens_python/logger.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ <h1 class="title">Module <code>supertokens_python.logger</code></h1>
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

import json
import logging
from datetime import datetime
Expand All @@ -53,11 +52,16 @@ <h1 class="title">Module <code>supertokens_python.logger</code></h1>

supertokens_dir = path.dirname(__file__)


def enable_debug_logging():
_logger.setLevel(logging.DEBUG)


# Configure logger
_logger = logging.getLogger(NAMESPACE)
debug_env = getenv(DEBUG_ENV_VAR, &#34;&#34;).lower()
if debug_env == &#34;1&#34;:
_logger.setLevel(logging.DEBUG)
enable_debug_logging()


def _get_log_timestamp() -&gt; str:
Expand Down Expand Up @@ -109,6 +113,19 @@ <h1 class="title">Module <code>supertokens_python.logger</code></h1>
<section>
<h2 class="section-title" id="header-functions">Functions</h2>
<dl>
<dt id="supertokens_python.logger.enable_debug_logging"><code class="name flex">
<span>def <span class="ident">enable_debug_logging</span></span>(<span>)</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def enable_debug_logging():
_logger.setLevel(logging.DEBUG)</code></pre>
</details>
</dd>
<dt id="supertokens_python.logger.get_maybe_none_as_str"><code class="name flex">
<span>def <span class="ident">get_maybe_none_as_str</span></span>(<span>o: Optional[str]) ‑> str</span>
</code></dt>
Expand Down Expand Up @@ -216,6 +233,7 @@ <h2>Index</h2>
</li>
<li><h3><a href="#header-functions">Functions</a></h3>
<ul class="">
<li><code><a title="supertokens_python.logger.enable_debug_logging" href="#supertokens_python.logger.enable_debug_logging">enable_debug_logging</a></code></li>
<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>
</ul>
</li>
Expand Down
22 changes: 19 additions & 3 deletions html/supertokens_python/supertokens.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ <h1 class="title">Module <code>supertokens_python.supertokens</code></h1>

from typing_extensions import Literal

from supertokens_python.logger import get_maybe_none_as_str, log_debug_message
from supertokens_python.logger import (
get_maybe_none_as_str,
log_debug_message,
enable_debug_logging,
)

from .constants import FDI_KEY_HEADER, RID_KEY_HEADER, USER_COUNT, USER_DELETE, USERS
from .exceptions import SuperTokensError
Expand Down Expand Up @@ -178,6 +182,7 @@ <h1 class="title">Module <code>supertokens_python.supertokens</code></h1>
recipe_list: List[Callable[[AppInfo], RecipeModule]],
mode: Optional[Literal[&#34;asgi&#34;, &#34;wsgi&#34;]],
telemetry: Optional[bool],
debug: Optional[bool],
):
if not isinstance(app_info, InputAppInfo): # type: ignore
raise ValueError(&#34;app_info must be an instance of InputAppInfo&#34;)
Expand All @@ -193,6 +198,8 @@ <h1 class="title">Module <code>supertokens_python.supertokens</code></h1>
mode,
)
self.supertokens_config = supertokens_config
if debug is True:
enable_debug_logging()
self._telemetry_status: str = &#34;NONE&#34;
log_debug_message(
&#34;Started SuperTokens with debug logging (supertokens.init called)&#34;
Expand Down Expand Up @@ -245,6 +252,7 @@ <h1 class="title">Module <code>supertokens_python.supertokens</code></h1>
recipe_list: List[Callable[[AppInfo], RecipeModule]],
mode: Optional[Literal[&#34;asgi&#34;, &#34;wsgi&#34;]],
telemetry: Optional[bool],
debug: Optional[bool],
):
if Supertokens.__instance is None:
Supertokens.__instance = Supertokens(
Expand All @@ -254,6 +262,7 @@ <h1 class="title">Module <code>supertokens_python.supertokens</code></h1>
recipe_list,
mode,
telemetry,
debug,
)
PostSTInitCallbacks.run_post_init_callbacks()

Expand Down Expand Up @@ -790,7 +799,7 @@ <h3>Methods</h3>
</dd>
<dt id="supertokens_python.supertokens.Supertokens"><code class="flex name class">
<span>class <span class="ident">Supertokens</span></span>
<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>
<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>
</code></dt>
<dd>
<div class="desc"></div>
Expand All @@ -809,6 +818,7 @@ <h3>Methods</h3>
recipe_list: List[Callable[[AppInfo], RecipeModule]],
mode: Optional[Literal[&#34;asgi&#34;, &#34;wsgi&#34;]],
telemetry: Optional[bool],
debug: Optional[bool],
):
if not isinstance(app_info, InputAppInfo): # type: ignore
raise ValueError(&#34;app_info must be an instance of InputAppInfo&#34;)
Expand All @@ -824,6 +834,8 @@ <h3>Methods</h3>
mode,
)
self.supertokens_config = supertokens_config
if debug is True:
enable_debug_logging()
self._telemetry_status: str = &#34;NONE&#34;
log_debug_message(
&#34;Started SuperTokens with debug logging (supertokens.init called)&#34;
Expand Down Expand Up @@ -876,6 +888,7 @@ <h3>Methods</h3>
recipe_list: List[Callable[[AppInfo], RecipeModule]],
mode: Optional[Literal[&#34;asgi&#34;, &#34;wsgi&#34;]],
telemetry: Optional[bool],
debug: Optional[bool],
):
if Supertokens.__instance is None:
Supertokens.__instance = Supertokens(
Expand All @@ -885,6 +898,7 @@ <h3>Methods</h3>
recipe_list,
mode,
telemetry,
debug,
)
PostSTInitCallbacks.run_post_init_callbacks()

Expand Down Expand Up @@ -1293,7 +1307,7 @@ <h3>Static methods</h3>
</details>
</dd>
<dt id="supertokens_python.supertokens.Supertokens.init"><code class="name flex">
<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>
<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>
</code></dt>
<dd>
<div class="desc"></div>
Expand All @@ -1309,6 +1323,7 @@ <h3>Static methods</h3>
recipe_list: List[Callable[[AppInfo], RecipeModule]],
mode: Optional[Literal[&#34;asgi&#34;, &#34;wsgi&#34;]],
telemetry: Optional[bool],
debug: Optional[bool],
):
if Supertokens.__instance is None:
Supertokens.__instance = Supertokens(
Expand All @@ -1318,6 +1333,7 @@ <h3>Static methods</h3>
recipe_list,
mode,
telemetry,
debug,
)
PostSTInitCallbacks.run_post_init_callbacks()</code></pre>
</details>
Expand Down

0 comments on commit 4d73959

Please sign in to comment.