Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » scratchattach - A Scratch API wrapper (Python)
- EpicCoderGamer1000
-
Scratcher
82 posts
scratchattach - A Scratch API wrapper (Python)
Hey I also use vs code for all of my coding using scratch attach and I used the terminal inside vs code to install scratchattach. I did not use the cmd to install scratch attach. Hope this helps!(#2276)bump for my post(#2268)I used VS Code for coding and cmd for downloadingI already installed scratchattach but it says I haven't. Can anyone help?
Picture here btw: https://u.cubeupload.com/eason_9_lol/Screenshot2024012015.png
(also cloud logs are up!!!!)
What are you using to code
Also you don't need to use the cloud emoji to set a var
- Mooaus2940
-
Scratcher
90 posts
scratchattach - A Scratch API wrapper (Python)
Hello, im austin and im wondering, do you use the scratches api, or did you make your own?
- Air_heads
-
Scratcher
98 posts
scratchattach - A Scratch API wrapper (Python)
Hello, im austin and im wondering, do you use the scratches api, or did you make your own?
Scratchattach utilizes the API provided by Scratch.
- Mooaus2940
-
Scratcher
90 posts
scratchattach - A Scratch API wrapper (Python)
Ok, how did they get the Auth token?Hello, im austin and im wondering, do you use the scratches api, or did you make your own?
Scratchattach utilizes the API provided by Scratch.
- Eason_9
-
Scratcher
1000+ posts
scratchattach - A Scratch API wrapper (Python)
(#2283)Is it required to use the terminal inside vs code to install scratch attach for it to work?
Hey I also use vs code for all of my coding using scratch attach and I used the terminal inside vs code to install scratchattach. I did not use the cmd to install scratch attach. Hope this helps!
- ajskateboarder
-
Scratcher
1000+ posts
scratchattach - A Scratch API wrapper (Python)
I'm pretty sure scratchattach POSTs user credentials to scratch.mit.edu/login and gets the session ID cookie from the response, which is basically the token used to do user-specific actionsOk, how did they get the Auth token?Hello, im austin and im wondering, do you use the scratches api, or did you make your own?
Scratchattach utilizes the API provided by Scratch.
It doesn't matter what terminal you use, but the terminal in VSCode is recommended since it opens alongside code(#2283)Is it required to use the terminal inside vs code to install scratch attach for it to work?
Hey I also use vs code for all of my coding using scratch attach and I used the terminal inside vs code to install scratchattach. I did not use the cmd to install scratch attach. Hope this helps!
Last edited by ajskateboarder (Jan. 22, 2024 13:05:26)
- Eason_9
-
Scratcher
1000+ posts
scratchattach - A Scratch API wrapper (Python)
(#2288)umm then how about this?
It doesn't matter what terminal you use, but the terminal in VSCode is recommended since it opens alongside code
(#2267)
I already installed scratchattach but it says I haven't. Can anyone help?
Picture here btw: https://u.cubeupload.com/eason_9_lol/Screenshot2024012015.png
- EpicCoderGamer1000
-
Scratcher
82 posts
scratchattach - A Scratch API wrapper (Python)
Its better to use the terminal in vs code because thats how i got scratchattach to work(#2288)umm then how about this?
It doesn't matter what terminal you use, but the terminal in VSCode is recommended since it opens alongside code(#2267)
I already installed scratchattach but it says I haven't. Can anyone help?
Picture here btw: https://u.cubeupload.com/eason_9_lol/Screenshot2024012015.png
- caftingdead261
-
Scratcher
100+ posts
scratchattach - A Scratch API wrapper (Python)
I don't get it what is so bad about scratch attach?bro, remove the module. delete it now. people are hacking with it like crazy!Just like every useful tool, scratchattach can be abused. However, deleting the library would harm Scratch's Python dev community while it wouldn't stop hackers at all: There are plenty of other libraries that support setting cloud variables (many of these existed before scratchattach). Hackers could just use one of these libraries instead.
can someone tell me?
- ScratchTheCoder12345
-
Scratcher
500+ posts
scratchattach - A Scratch API wrapper (Python)
W W W CLOUD LOGS ARE BACK!!!
- ajskateboarder
-
Scratcher
1000+ posts
scratchattach - A Scratch API wrapper (Python)
People are using it for various “exploits” by setting cloud variables to values so they can show up on the leaderboard. Deleting the module is pointless – what really should be done on Scratch's part is securing their cloud variable interfacesI don't get it what is so bad about scratch attach?bro, remove the module. delete it now. people are hacking with it like crazy!Just like every useful tool, scratchattach can be abused. However, deleting the library would harm Scratch's Python dev community while it wouldn't stop hackers at all: There are plenty of other libraries that support setting cloud variables (many of these existed before scratchattach). Hackers could just use one of these libraries instead.
can someone tell me?
- Eason_9
-
Scratcher
1000+ posts
scratchattach - A Scratch API wrapper (Python)
(#2290)bump for my post(#2288)umm then how about this?
It doesn't matter what terminal you use, but the terminal in VSCode is recommended since it opens alongside code(#2267)
I already installed scratchattach but it says I haven't. Can anyone help?
Picture here btw: https://u.cubeupload.com/eason_9_lol/Screenshot2024012015.png
- EpicCoderGamer1000
-
Scratcher
82 posts
scratchattach - A Scratch API wrapper (Python)
So you must have downloaded the file onto your pc when you ran the command in the cmd. To use scratchattach in vs code download scratchattach using the terminal in vs code.(#2290)bump for my post(#2288)umm then how about this?
It doesn't matter what terminal you use, but the terminal in VSCode is recommended since it opens alongside code(#2267)
I already installed scratchattach but it says I haven't. Can anyone help?
Picture here btw: https://u.cubeupload.com/eason_9_lol/Screenshot2024012015.png
- Eason_9
-
Scratcher
1000+ posts
scratchattach - A Scratch API wrapper (Python)
(#2281)I tried, but it said that requirements are already satisfied and refused to download
So you must have downloaded the file onto your pc when you ran the command in the cmd. To use scratchattach in vs code download scratchattach using the terminal in vs code.
Last edited by Eason_9 (Jan. 30, 2024 06:34:50)
- caftingdead261
-
Scratcher
100+ posts
scratchattach - A Scratch API wrapper (Python)
Don't you need to own the project to change them?People are using it for various “exploits” by setting cloud variables to values so they can show up on the leaderboard. Deleting the module is pointless – what really should be done on Scratch's part is securing their cloud variable interfacesI don't get it what is so bad about scratch attach?bro, remove the module. delete it now. people are hacking with it like crazy!Just like every useful tool, scratchattach can be abused. However, deleting the library would harm Scratch's Python dev community while it wouldn't stop hackers at all: There are plenty of other libraries that support setting cloud variables (many of these existed before scratchattach). Hackers could just use one of these libraries instead.
can someone tell me?
- TheMobileGames
-
Scratcher
100+ posts
scratchattach - A Scratch API wrapper (Python)
Don't you need to own the project to change them?No, you can change the variables of any project as long as you aren’t banned from the Scratch API and have the Scratcher rank of course. It’s actually very very helpful to me whenever I need to change some variables on my project with an alt account instead.
- AKLCool
-
Scratcher
28 posts
scratchattach - A Scratch API wrapper (Python)
Hello! Im using scratchattach on my macbook, and installed it via homebrew. I have this code: import importlib
import scratchattach
importlib.reload(scratchattach)
import scratchattach as scratch3
session = scratch3.login(“AKLCool”, “REDACTED”)
conn = session.connect_cloud(project_id=“797826863”)
conn.set_var(“pencolour”, “0”)
but, when i run it, i get this:
REDACTED@192-168-1-21 ~ % /usr/local/bin/python3 /Users/REDACTED/scratchattach.py
Traceback (most recent call last):
File “/Users/REDACTED/scratchattach.py”, line 2, in <module>
import scratchattach
File “/Users/lREDACTED/scratchattach.py”, line 4, in <module>
importlib.reload(scratchattach)
File “/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/importlib/__init__.py”, line 131, in reload
_bootstrap._exec(spec, module)
File “/Users/REDACTED/scratchattach.py”, line 8, in <module>
session = scratch3.login(“AKLCool”, “REDACTED”)
^^^^^^^^^^^^^^
AttributeError: module ‘scratchattach’ has no attribute ‘login’
im running this code on vs code, and i dont know how to fix it! please help me
import scratchattach
importlib.reload(scratchattach)
import scratchattach as scratch3
session = scratch3.login(“AKLCool”, “REDACTED”)
conn = session.connect_cloud(project_id=“797826863”)
conn.set_var(“pencolour”, “0”)
but, when i run it, i get this:
REDACTED@192-168-1-21 ~ % /usr/local/bin/python3 /Users/REDACTED/scratchattach.py
Traceback (most recent call last):
File “/Users/REDACTED/scratchattach.py”, line 2, in <module>
import scratchattach
File “/Users/lREDACTED/scratchattach.py”, line 4, in <module>
importlib.reload(scratchattach)
File “/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/importlib/__init__.py”, line 131, in reload
_bootstrap._exec(spec, module)
File “/Users/REDACTED/scratchattach.py”, line 8, in <module>
session = scratch3.login(“AKLCool”, “REDACTED”)
^^^^^^^^^^^^^^
AttributeError: module ‘scratchattach’ has no attribute ‘login’
im running this code on vs code, and i dont know how to fix it! please help me
- EpicCoderGamer1000
-
Scratcher
82 posts
scratchattach - A Scratch API wrapper (Python)
Why are you bumping your posts? Is there a problem or something?(#2282)bump for my post(#2281)I tried, but it said that requirements are already satisfied and refused to download
So you must have downloaded the file onto your pc when you ran the command in the cmd. To use scratchattach in vs code download scratchattach using the terminal in vs code.

