supertokens-python icon indicating copy to clipboard operation
supertokens-python copied to clipboard

Request for AIOHTTP client

Open rishabhpoddar opened this issue 4 years ago • 2 comments

https://github.com/supertokens/supertokens-core/issues/53

rishabhpoddar avatar Oct 09 '21 05:10 rishabhpoddar

Hello @rishabhpoddar Can i try to help on this? Let me know your feedback.

divyanshudimri avatar Jan 06 '22 18:01 divyanshudimri

hey @divyanshudimri sure! We are happy that you would like to help out.

On a high level, the way the python SDK is built is that it exposes a few APIs based on what the user wants to use. These APIs are written in a web framework agnostic manner. This means that the same API logic is shared across different web frameworks (django, flask, fastpi at the moment). This is achieved by the API logic using a base request and response class, which are implemented by the various web frameworks.

There is also a middleware function that needs to be implemented for each of these frameworks which is responsible for intercepting all API calls and calling the internal middleware function that actually handles the call if needed. An example of this for flask is here.

Finally, you would need to implement the verify_session middleware which can be used by the user for session verification. This would call the internal verify_session function. An example of this for flask is here

The contributing guide for python is empty at the moment, so feel free to join our discord community and I can help you setup the dev env fairly quickly.

rishabhpoddar avatar Jan 07 '22 04:01 rishabhpoddar