Discuss Scratch

ajskateboarder
Scratcher
1000+ posts

scratchattach - A Scratch API wrapper (Python)

AwesomeApaar wrote:

how do you use the api for hacking
By changing variables on a different project - and it's not really a hack. Check out the scratchattach wiki to learn how to use scratchattach, and of course, make sure you know Python well
CoolMathStuff
Scratcher
9 posts

scratchattach - A Scratch API wrapper (Python)

My code isn't working right, I think scratch API is down:

import os
from keep_alive import keep_alive

os.system(“pip install scratchattach”)
os.system(“pip install requests”)
import scratchattach as scratch3
import requests
import json

keep_alive()

session = scratch3.Session(os.environ, username=“CoolMathStuff”)
conn = session.connect_cloud(project_id=“968644178”)

client = scratch3.CloudRequests(conn)

@client.request
def get_user(argument1):
print(f“requests for user {argument1}”)
user = scratch3.get_user(argument1)
return user.message_count()

@client.event
def on_ready():
print(“Request handler is ready”)

client.run()

Either that, or replit doesn't have the right library…

Last edited by CoolMathStuff (Feb. 24, 2024 23:42:37)


Knightbot63
Scratcher
1000+ posts

scratchattach - A Scratch API wrapper (Python)

CoolMathStuff wrote:

My code isn't working right, I think scratch API is down
What is the error you are getting when trying to run the code?

Team 0% has cleared every Super Mario Maker 1 online level!
Trimming the Herbs being a TAS after 6 years of attempts.
Highlight + Shift + Down

2 Years on Scratch……
Real grind to 1,000,000 Animal Crossing Nook Miles, Current: 900,050
I don't use Scratch as much as I used to like in 2022-2023… Heavily inactive due to School and a big project.
This part you're seeing is a Signature. This has nothing to do with my post.
I have 2 more Challenge Board tiles until I 100% the Challenge Board in Smash Ultimate. Last ones are from online.

Captain Falcon VS. Level 9 Captain Falcon. I won with 3 stocks.

:)




































Subscribe to Caseoh_ on twitch.
I want to work on making it possible to put caseoh on the ban page for Scratch.
scaryghost14
Scratcher
46 posts

scratchattach - A Scratch API wrapper (Python)

cool

play https://scratch.mit.edu/projects/860188790/ it is fun follow scaryghost14
when I receive [I'm board v]
follow [scaryghost14]
ScratchTheCoder12345
Scratcher
500+ posts

scratchattach - A Scratch API wrapper (Python)

errplane wrote:

Lurdumoloch wrote:

How can you run the python code 24/7 for free?

self-hosting, you still have to pay the electricity bill, but that's probably fine.


*parents*

Hello, I'm Brandon a Python developer who loves math and coding.
he/him
Feel free to message me with any questions
Eason_9
Scratcher
1000+ posts

scratchattach - A Scratch API wrapper (Python)

Eason_9 wrote:

(#2282)

EpicCoderGamer1000 wrote:

(#2281)
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.
I tried, but it said that requirements are already satisfied and refused to download

bump for my post

*This is my signature, learn what it is here! Scroll down by highlighting anywhere and press shift and the down arrow key.

Need some feedback? Click here and we can help!
If you have some time to spare, perhaps go read my Scratch Wiki essays!
And since I'm here I should probably advertise my projects but I can't find a good project I made.
11 (almost 12) - He/Him
nexoalex
Scratcher
50 posts

scratchattach - A Scratch API wrapper (Python)

ajskateboarder wrote:

AwesomeApaar wrote:

how do you use the api for hacking
By changing variables on a different project - and it's not really a hack. Check out the scratchattach wiki to learn how to use scratchattach, and of course, make sure you know Python well
it is possible to hack like i have a concept to hack cloud variables but ill just wait till i make a vid
ajskateboarder
Scratcher
1000+ posts

scratchattach - A Scratch API wrapper (Python)

nexoalex wrote:

ajskateboarder wrote:

AwesomeApaar wrote:

how do you use the api for hacking
By changing variables on a different project - and it's not really a hack. Check out the scratchattach wiki to learn how to use scratchattach, and of course, make sure you know Python well
it is possible to hack like i have a concept to hack cloud variables but ill just wait till i make a vid
I never said it was impossible..
DocParker
Scratcher
7 posts

scratchattach - A Scratch API wrapper (Python)

supersonic734 wrote:

Scratch3.py isn't working for me.
Use pycharm and install it
ScratchTheCoder12345
Scratcher
500+ posts

scratchattach - A Scratch API wrapper (Python)

DocParker wrote:

supersonic734 wrote:

Scratch3.py isn't working for me.
Use pycharm and install it
PyCharm isn't free?

Hello, I'm Brandon a Python developer who loves math and coding.
he/him
Feel free to message me with any questions
TimMcCool
Scratcher
100+ posts

scratchattach - A Scratch API wrapper (Python)

Update - v1.6.2

- Added `client.stop()` to cloud requests (will stop cloud request handler and all background event handlers)
- You can now access the letters used by the encoder: `scratch3.encoder.letters`
- Added `scratch3.Encoding.replace_char(“old_char”, “new_char”)`
- Added `studio.accept_invite()`
- Added `project.upload_json_from(“other_project_id”)`
- `scratch3.connect_tw_cloud(“project_id”)` - “project_id” arg can now be a non-integer
- Added `daemon` argument to `client.run()` (cloud requests)

Developer of scratchattach, the most popular Python Scratch API wrapper
TimMcCool
Scratcher
100+ posts

scratchattach - A Scratch API wrapper (Python)

ScratchTheCoder12345 wrote:

DocParker wrote:

supersonic734 wrote:

Scratch3.py isn't working for me.
Use pycharm and install it
PyCharm isn't free?
PyCharm community edition is free

Last edited by TimMcCool (Feb. 28, 2024 12:21:42)


Developer of scratchattach, the most popular Python Scratch API wrapper
ajskateboarder
Scratcher
1000+ posts

scratchattach - A Scratch API wrapper (Python)

DocParker wrote:

supersonic734 wrote:

Scratch3.py isn't working for me.
Use pycharm and install it
You can use any editor/IDE to install scratchattach, by the way
leahcimto
Scratcher
1000+ posts

scratchattach - A Scratch API wrapper (Python)

so are we all just going to pretend that this isn't a complete copy of scratchclient
grandpasp
Scratcher
36 posts

scratchattach - A Scratch API wrapper (Python)

leahcimto wrote:

so are we all just going to pretend that this isn't a complete copy of scratchclient
As ScratchAttach is just a wrapper for the Scratch API, it must be expected to be functionally the same as any other.
scaryghost14
Scratcher
46 posts

scratchattach - A Scratch API wrapper (Python)

pycharm works right?

play https://scratch.mit.edu/projects/860188790/ it is fun follow scaryghost14
when I receive [I'm board v]
follow [scaryghost14]
TimMcCool
Scratcher
100+ posts

scratchattach - A Scratch API wrapper (Python)

leahcimto wrote:

so are we all just going to pretend that this isn't a complete copy of scratchclient
scratchattach has more and better features than scratchclient.

It's not just an API wrapper, but a tool for sending data through cloud variables fastly and easily (built-in encoding, cloud requests framework). It can still be used as an API wrapper tho. scratchattach supports more API endpoints than scratchclient, and many scratchattach features don't require a login which can be an advantage.

scaryghost14 wrote:

pycharm works right?
yes, all IDEs should work

Last edited by TimMcCool (March 5, 2024 18:42:28)


Developer of scratchattach, the most popular Python Scratch API wrapper
AwesomePeopleOutTher
Scratcher
20 posts

scratchattach - A Scratch API wrapper (Python)

scaryghost14 wrote:

pycharm works right?
pycharm works very well with scratchattach and makes it incredibly easy to install scratchattach.

AwesomePeopleOutTher
hellopeepos1
Scratcher
7 posts

scratchattach - A Scratch API wrapper (Python)

Just a quick question, but can ScratchAttach be used to make an account system for a game or no? Because considering that Python can store values sent through the cloud into a local variable, you can just have it be saved in the IDE and send the data when requested. Either that or I'm getting it completely wrong lol.

Last edited by hellopeepos1 (March 9, 2024 13:55:13)

scaryghost14
Scratcher
46 posts

scratchattach - A Scratch API wrapper (Python)

TimMcCool wrote:

leahcimto wrote:

so are we all just going to pretend that this isn't a complete copy of scratchclient
scratchattach has more and better features than scratchclient.

It's not just an API wrapper, but a tool for sending data through cloud variables fastly and easily (built-in encoding, cloud requests framework). It can still be used as an API wrapper tho. scratchattach supports more API endpoints than scratchclient, and many scratchattach features don't require a login which can be an advantage.

scaryghost14 wrote:

pycharm works right?
yes, all IDEs should work
thx

play https://scratch.mit.edu/projects/860188790/ it is fun follow scaryghost14
when I receive [I'm board v]
follow [scaryghost14]

Powered by DjangoBB