Skip to content

Commit

Permalink
adding dev-v0.14.1 tag to this commit to ensure building
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabhpoddar committed May 23, 2023
1 parent f3e6bb2 commit 8567ab5
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 15 deletions.
10 changes: 5 additions & 5 deletions html/supertokens_python/asyncio/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,18 @@ <h1 class="title">Module <code>supertokens_python.asyncio</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.
from typing import List, Union, Optional, Dict
from typing import Dict, List, Optional, Union

from supertokens_python import Supertokens
from supertokens_python.interfaces import (
CreateUserIdMappingOkResult,
DeleteUserIdMappingOkResult,
GetUserIdMappingOkResult,
UnknownMappingError,
UnknownSupertokensUserIDError,
UpdateOrDeleteUserIdMappingInfoOkResult,
UserIdMappingAlreadyExistsError,
UserIDTypes,
UnknownMappingError,
GetUserIdMappingOkResult,
DeleteUserIdMappingOkResult,
UpdateOrDeleteUserIdMappingInfoOkResult,
)
from supertokens_python.types import UsersResponse

Expand Down
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;2.21&#34;]
VERSION = &#34;0.14.0&#34;
VERSION = &#34;0.14.1&#34;
TELEMETRY = &#34;/telemetry&#34;
USER_COUNT = &#34;/users/count&#34;
USER_DELETE = &#34;/user/remove&#34;
Expand Down
29 changes: 27 additions & 2 deletions html/supertokens_python/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,11 @@ <h1 class="title">Package <code>supertokens_python</code></h1>
# License for the specific language governing permissions and limitations
# under the License.

from typing import Any, Callable, Dict, List, Optional, Union

from typing_extensions import Literal
from typing import Callable, List, Union

from supertokens_python.framework.request import BaseRequest

from . import supertokens
from .recipe_module import RecipeModule
Expand All @@ -66,7 +69,13 @@ <h1 class="title">Package <code>supertokens_python</code></h1>


def get_all_cors_headers() -&gt; List[str]:
return supertokens.Supertokens.get_instance().get_all_cors_headers()</code></pre>
return supertokens.Supertokens.get_instance().get_all_cors_headers()


def get_request_from_user_context(
user_context: Optional[Dict[str, Any]],
) -&gt; Optional[BaseRequest]:
return Supertokens.get_instance().get_request_from_user_context(user_context)</code></pre>
</details>
</section>
<section>
Expand Down Expand Up @@ -168,6 +177,21 @@ <h2 class="section-title" id="header-functions">Functions</h2>
return supertokens.Supertokens.get_instance().get_all_cors_headers()</code></pre>
</details>
</dd>
<dt id="supertokens_python.get_request_from_user_context"><code class="name flex">
<span>def <span class="ident">get_request_from_user_context</span></span>(<span>user_context: Optional[Dict[str, Any]]) ‑> Optional[<a title="supertokens_python.framework.request.BaseRequest" href="framework/request.html#supertokens_python.framework.request.BaseRequest">BaseRequest</a>]</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def get_request_from_user_context(
user_context: Optional[Dict[str, Any]],
) -&gt; Optional[BaseRequest]:
return Supertokens.get_instance().get_request_from_user_context(user_context)</code></pre>
</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>
</code></dt>
Expand Down Expand Up @@ -227,6 +251,7 @@ <h2>Index</h2>
<li><h3><a href="#header-functions">Functions</a></h3>
<ul class="">
<li><code><a title="supertokens_python.get_all_cors_headers" href="#supertokens_python.get_all_cors_headers">get_all_cors_headers</a></code></li>
<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>
<li><code><a title="supertokens_python.init" href="#supertokens_python.init">init</a></code></li>
</ul>
</li>
Expand Down
60 changes: 58 additions & 2 deletions html/supertokens_python/supertokens.html
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,22 @@ <h1 class="title">Module <code>supertokens_python.supertokens</code></h1>
&#34;errorHandler: Matched with recipeID: %s&#34;, recipe.get_recipe_id()
)
return await recipe.handle_error(request, err, response)
raise err</code></pre>
raise err

def get_request_from_user_context( # pylint: disable=no-self-use
self,
user_context: Optional[Dict[str, Any]] = None,
) -&gt; Optional[BaseRequest]:
if user_context is None:
return None

if &#34;_default&#34; not in user_context:
return None

if not isinstance(user_context[&#34;_default&#34;], dict):
return None

return user_context.get(&#34;_default&#34;, {}).get(&#34;request&#34;)</code></pre>
</details>
</section>
<section>
Expand Down Expand Up @@ -1150,7 +1165,22 @@ <h3>Methods</h3>
&#34;errorHandler: Matched with recipeID: %s&#34;, recipe.get_recipe_id()
)
return await recipe.handle_error(request, err, response)
raise err</code></pre>
raise err

def get_request_from_user_context( # pylint: disable=no-self-use
self,
user_context: Optional[Dict[str, Any]] = None,
) -&gt; Optional[BaseRequest]:
if user_context is None:
return None

if &#34;_default&#34; not in user_context:
return None

if not isinstance(user_context[&#34;_default&#34;], dict):
return None

return user_context.get(&#34;_default&#34;, {}).get(&#34;request&#34;)</code></pre>
</details>
<h3>Static methods</h3>
<dl>
Expand Down Expand Up @@ -1353,6 +1383,31 @@ <h3>Methods</h3>
return list(headers_set)</code></pre>
</details>
</dd>
<dt id="supertokens_python.supertokens.Supertokens.get_request_from_user_context"><code class="name flex">
<span>def <span class="ident">get_request_from_user_context</span></span>(<span>self, user_context: Optional[Dict[str, Any]] = None) ‑> Optional[BaseRequest]</span>
</code></dt>
<dd>
<div class="desc"></div>
<details class="source">
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def get_request_from_user_context( # pylint: disable=no-self-use
self,
user_context: Optional[Dict[str, Any]] = None,
) -&gt; Optional[BaseRequest]:
if user_context is None:
return None

if &#34;_default&#34; not in user_context:
return None

if not isinstance(user_context[&#34;_default&#34;], dict):
return None

return user_context.get(&#34;_default&#34;, {}).get(&#34;request&#34;)</code></pre>
</details>
</dd>
<dt id="supertokens_python.supertokens.Supertokens.get_user_count"><code class="name flex">
<span>async def <span class="ident">get_user_count</span></span>(<span>self, include_recipe_ids: Union[None, List[str]]) ‑> int</span>
</code></dt>
Expand Down Expand Up @@ -1705,6 +1760,7 @@ <h4><code><a title="supertokens_python.supertokens.Supertokens" href="#supertoke
<li><code><a title="supertokens_python.supertokens.Supertokens.delete_user_id_mapping" href="#supertokens_python.supertokens.Supertokens.delete_user_id_mapping">delete_user_id_mapping</a></code></li>
<li><code><a title="supertokens_python.supertokens.Supertokens.get_all_cors_headers" href="#supertokens_python.supertokens.Supertokens.get_all_cors_headers">get_all_cors_headers</a></code></li>
<li><code><a title="supertokens_python.supertokens.Supertokens.get_instance" href="#supertokens_python.supertokens.Supertokens.get_instance">get_instance</a></code></li>
<li><code><a title="supertokens_python.supertokens.Supertokens.get_request_from_user_context" href="#supertokens_python.supertokens.Supertokens.get_request_from_user_context">get_request_from_user_context</a></code></li>
<li><code><a title="supertokens_python.supertokens.Supertokens.get_user_count" href="#supertokens_python.supertokens.Supertokens.get_user_count">get_user_count</a></code></li>
<li><code><a title="supertokens_python.supertokens.Supertokens.get_user_id_mapping" href="#supertokens_python.supertokens.Supertokens.get_user_id_mapping">get_user_id_mapping</a></code></li>
<li><code><a title="supertokens_python.supertokens.Supertokens.get_users" href="#supertokens_python.supertokens.Supertokens.get_users">get_users</a></code></li>
Expand Down
10 changes: 5 additions & 5 deletions html/supertokens_python/syncio/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,19 @@ <h1 class="title">Module <code>supertokens_python.syncio</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.
from typing import List, Union, Optional, Dict
from typing import Dict, List, Optional, Union

from supertokens_python import Supertokens
from supertokens_python.async_to_sync_wrapper import sync
from supertokens_python.interfaces import (
CreateUserIdMappingOkResult,
DeleteUserIdMappingOkResult,
GetUserIdMappingOkResult,
UnknownMappingError,
UnknownSupertokensUserIDError,
UpdateOrDeleteUserIdMappingInfoOkResult,
UserIdMappingAlreadyExistsError,
UserIDTypes,
UnknownMappingError,
GetUserIdMappingOkResult,
DeleteUserIdMappingOkResult,
UpdateOrDeleteUserIdMappingInfoOkResult,
)
from supertokens_python.types import UsersResponse

Expand Down

0 comments on commit 8567ab5

Please sign in to comment.