MCPcopy Create free account
hub / github.com/TimMcCool/scratchattach / __init__

Method __init__

scratchattach/cloud/cloud.py:17–29  ·  view source on GitHub ↗
(self, *, project_id, _session=None)

Source from the content-addressed store, hash-verified

15
16class ScratchCloud(LogCloud):
17 def __init__(self, *, project_id, _session=None):
18 super().__init__()
19
20 self.project_id = project_id
21
22 # Configure this object's attributes specifically for being used with Scratch's cloud:
23 self.cloud_host = "wss://clouddata.scratch.mit.edu"
24 self.length_limit = 256
25 self._session = _session
26 if self._session is not None:
27 self.username = self._session.username
28 self.cookie = "scratchsessionsid=" + self._session.id + ";"
29 self.origin = "https://scratch.mit.edu"
30
31 def connect(self):
32 self._assert_auth() # Connecting to Scratch's cloud websocket requires a login to the Scratch website

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected