MCPcopy Create free account
hub / github.com/O365/python-o365 / create_session

Method create_session

O365/excel.py:80–90  ·  view source on GitHub ↗

Request a new session id

(self)

Source from the content-addressed store, hash-verified

78 return self.session_id is not None
79
80 def create_session(self):
81 """ Request a new session id """
82
83 url = self.build_url(self._endpoints.get('create_session'))
84 response = self.con.post(url, data={'persistChanges': self.persist})
85 if not response:
86 raise RuntimeError('Could not create session as requested by the user.')
87 data = response.json()
88 self.session_id = data.get('id')
89
90 return True
91
92 def refresh_session(self):
93 """ Refresh the current session id """

Callers 2

prepare_requestMethod · 0.95
__init__Method · 0.80

Calls 4

build_urlMethod · 0.80
jsonMethod · 0.80
getMethod · 0.45
postMethod · 0.45

Tested by

no test coverage detected