MCPcopy Index your code
hub / github.com/rawpython/remi / main

Method main

examples/session_app.py:172–188  ·  view source on GitHub ↗
(self, name='world')

Source from the content-addressed store, hash-verified

170 super(MyApp, self).__init__(*args)
171
172 def main(self, name='world'):
173 self.login_manager = LoginManager(CookieInterface(self), 5)
174 self.login_manager.on_session_expired.do(self.on_logout)
175
176 wid = gui.VBox(width=200, height=300, margin='0px auto')
177 btlogin = gui.Button('LOGIN')
178 btlogin.onclick.do(self.on_login)
179 btrenew = gui.Button('RENEW BEFORE EXPIRATION')
180 btrenew.onclick.do(self.on_renew)
181
182 self.lblsession_status = gui.Label('NOT LOGGED IN')
183
184 wid.append(btlogin)
185 wid.append(btrenew)
186 wid.append(self.lblsession_status)
187
188 return wid
189
190 def on_login(self, emitter):
191 self.login_manager.renew_session()

Callers

nothing calls this directly

Calls 4

LoginManagerClass · 0.85
CookieInterfaceClass · 0.85
doMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected