-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #517 from supertokens/auto-transpiling
Auto transpiling to catchup to node sdk (as of 19.0 branch of node sdk)
- Loading branch information
Showing
251 changed files
with
21,844 additions
and
3,760 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
You are an expert Python and Typescript developer. Your job is to convert node code (in typescript) into Python code. The python code then goes into this SDK. The python code style should keep in mind: | ||
- Avoid using TypeDict | ||
- Avoid using generic Dict as much as possible, except when defining the types for `user_context`. | ||
- If a function has multiple `status` strings as outputs, then define one unique class per unique `status` string. The class name should be such that it indicates the status it is associated with. | ||
- Variable and function names should be in snake_case. Class names in PascalCase. | ||
- Whenever importing `Literal`, import it from `typing_extensions`, and not `types`. | ||
- Do not use `|` for OR type, instead use `Union` | ||
- When defining API interface functions, make sure the output classes inherit from `APIResponse` class, and that they have a `to_json` function defined whose output matches the structure of the provided Typescript code output objects. | ||
|
||
The semantic of the python code should be the same as what's of the provided Typescript code. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Python: Flask, supertokens-website tests", | ||
"type": "python", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/tests/frontendIntegration/flask-server/app.py", | ||
"args": [ | ||
"--port", | ||
"8080" | ||
], | ||
"cwd": "${workspaceFolder}/tests/frontendIntegration/flask-server", | ||
"env": { | ||
"FLASK_DEBUG": "1" | ||
}, | ||
"jinja": true | ||
}, | ||
{ | ||
"name": "Python: FastAPI, supertokens-website tests", | ||
"type": "python", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/tests/frontendIntegration/fastapi-server/app.py", | ||
"args": [ | ||
"--port", | ||
"8080" | ||
], | ||
"cwd": "${workspaceFolder}/tests/frontendIntegration/fastapi-server", | ||
"env": { | ||
"FLASK_DEBUG": "1" | ||
}, | ||
"jinja": true | ||
}, | ||
{ | ||
"name": "Python: Flask, supertokens-auth-react tests", | ||
"type": "python", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/tests/auth-react/flask-server/app.py", | ||
"args": [ | ||
"--port", | ||
"8083" | ||
], | ||
"cwd": "${workspaceFolder}/tests/auth-react/flask-server", | ||
"env": { | ||
"FLASK_DEBUG": "1" | ||
}, | ||
"jinja": true | ||
}, | ||
{ | ||
"name": "Python: FastAPI, supertokens-auth-react tests", | ||
"type": "python", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/tests/auth-react/fastapi-server/app.py", | ||
"args": [ | ||
"--port", | ||
"8083" | ||
], | ||
"cwd": "${workspaceFolder}/tests/auth-react/fastapi-server", | ||
"jinja": true | ||
}, | ||
{ | ||
"name": "Python: Django, supertokens-auth-react tests", | ||
"type": "python", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/tests/auth-react/django3x/manage.py", | ||
"args": [ | ||
"runserver", | ||
"0.0.0.0:8083" | ||
], | ||
"env": { | ||
"PYTHONPATH": "${workspaceFolder}" | ||
}, | ||
"cwd": "${workspaceFolder}/tests/auth-react/django3x", | ||
"jinja": true | ||
}, | ||
{ | ||
"name": "Python: backend-sdk-testing repo", | ||
"type": "python", | ||
"request": "launch", | ||
"program": "${workspaceFolder}/tests/test-server/app.py", | ||
"cwd": "${workspaceFolder}/tests/test-server", | ||
"env": { | ||
"SUPERTOKENS_ENV": "testing", | ||
"API_PORT": "3030", | ||
"ST_CONNECTION_URI": "http://localhost:8081" | ||
}, | ||
"console": "integratedTerminal" | ||
}, | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"_comment": "contains a list of core-driver interfaces branch names that this core supports", | ||
"versions": [ | ||
"3.1" | ||
"5.1" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,3 +85,5 @@ uvicorn==0.18.2 | |
Werkzeug==2.0.3 | ||
wrapt==1.13.3 | ||
zipp==3.7.0 | ||
pyotp==2.9.0 | ||
aiofiles==23.2.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,13 +19,16 @@ | |
"Fastapi", | ||
"uvicorn==0.18.2", | ||
"python-dotenv==0.19.2", | ||
"pyotp<3", | ||
"aiofiles==23.2.1", | ||
] | ||
), | ||
"flask": ( | ||
[ | ||
"flask_cors", | ||
"Flask", | ||
"python-dotenv==0.19.2", | ||
"pyotp<3", | ||
] | ||
), | ||
"django": ( | ||
|
@@ -35,6 +38,7 @@ | |
"django-stubs==1.9.0", | ||
"uvicorn==0.18.2", | ||
"python-dotenv==0.19.2", | ||
"pyotp<3", | ||
] | ||
), | ||
"django2x": ( | ||
|
@@ -44,6 +48,7 @@ | |
"django-stubs==1.9.0", | ||
"gunicorn==20.1.0", | ||
"python-dotenv==0.19.2", | ||
"pyotp<3", | ||
] | ||
), | ||
"drf": ( | ||
|
@@ -57,6 +62,7 @@ | |
"uvicorn==0.18.2", | ||
"python-dotenv==0.19.2", | ||
"tzdata==2021.5", | ||
"pyotp<3", | ||
] | ||
), | ||
} | ||
|
@@ -83,7 +89,7 @@ | |
|
||
setup( | ||
name="supertokens_python", | ||
version="0.24.4", | ||
version="0.25.0", | ||
author="SuperTokens", | ||
license="Apache 2.0", | ||
author_email="[email protected]", | ||
|
@@ -121,10 +127,11 @@ | |
"asgiref>=3.4.1,<4", | ||
"typing_extensions>=4.1.1,<5.0.0", | ||
"Deprecated==1.2.13", | ||
"phonenumbers==8.13.47", | ||
"twilio==9.3.3", | ||
"phonenumbers<9", | ||
"twilio<10", | ||
"aiosmtplib>=1.1.6,<4.0.0", | ||
"pkce==1.0.3", | ||
"pyotp<3", | ||
], | ||
python_requires=">=3.7", | ||
include_package_data=True, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.