-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for TM1SessionID or cookiejar in RESTService #31
Comments
Yes. That would be a nice feature. I think the most intuitive way to do it is through an optional string argument (session_id) in the TM1Service / RESTService Constructor. How come you have a sessionid at hand before initializing TM1py? |
Currently, i'm grabbing the session cookie from RESTService._s. For the time being, I'm doing an ugly patch of RESTService._get_cookies to add in basic persistent session support via exporting/importing to/from a temp file, however a supported mechanism to export the session and reinitialize TM1Service or RESTService with that session would be ideal.
|
Thanks for the sample code! I like the use of pickle. I am thinking about serializing the full TM1Service instance into a pickle file.
I think it would serve the purpose and it should be easy and intuitive. |
Yes, that sounds perfect! |
Hi, I pushed the new release to Github and PyPI.
|
@MariusWirtz This is awesome, thank you! |
It would be useful if TM1py supported initializing a RESTService with an additional TM1SessionId or session cookiejar parameter to bypass the authentication process on the TM1 server. An LDAP authentication request can take 10-20s for us (or can be delayed if there are waits on the TM1 server), so caching the session is a necessity for us.
The text was updated successfully, but these errors were encountered: