Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > SDKs >

Possible to use xero-python with django

Started by Ragnar Barnsby -   in SDKs

I am trying to use the xero-python SDK with Django. I have looked at the example projects which use Flask. Flask has a root/file level session object that can be accessed by the SDKs oauth2_token_getter and oauth2_token_saver functions no problem. Djangos session exists inside request.session which only exists inside the view function, so request.session can't be accessed by these separate oauth2_token_getter and oauth2_token_saver functions which are called by the SDK and don't pass the request or the session to the function.

Is the xero-python SDK not compatible with Django? Is there a way to make this work?