Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » scratchattach - A Scratch API wrapper (Python)
- youhan_school
-
Scratcher
41 posts
scratchattach - A Scratch API wrapper (Python)
*installs right away*You doesn't need to use python, you can also use replit.
- youhan_school
-
Scratcher
41 posts
scratchattach - A Scratch API wrapper (Python)
when green flag clicked
forever
broadcast [ someone is cool!]
end
when I receive [ someone is cool!]
say [Timmccool is cool]
- YOSHIPAUL11
-
Scratcher
67 posts
scratchattach - A Scratch API wrapper (Python)
Which is better to learn for future programers? Python or C?
- YOSHIPAUL11
-
Scratcher
67 posts
scratchattach - A Scratch API wrapper (Python)
Thx(#85)Python. C isn't used quite as often anymore, and Python will probably have a lot more job opportunities.
Which is better to learn for future programers? Python or C?
- YOSHIPAUL11
-
Scratcher
67 posts
scratchattach - A Scratch API wrapper (Python)
And for a project beginner an advice?(#85)Python. C isn't used quite as often anymore, and Python will probably have a lot more job opportunities.
Which is better to learn for future programers? Python or C?
- Joshisaurio
-
Scratcher
100+ posts
scratchattach - A Scratch API wrapper (Python)
I once used ScratchConnect, but I'll probably switch to this library since it looks like it has more options or use both
- Joshisaurio
-
Scratcher
100+ posts
scratchattach - A Scratch API wrapper (Python)
Which is better to learn for future programers? Python or C?Python I think it's very easy to understand but REALLY powerful.
- Joshisaurio
-
Scratcher
100+ posts
scratchattach - A Scratch API wrapper (Python)
C isn't used quite as often anymore, and Python will probably have a lot more job opportunities.Yeah
- ISTILLMAKESTUFF
-
Scratcher
500+ posts
scratchattach - A Scratch API wrapper (Python)
now i have 692 followers if i have 7 followers more i have 700
if @TimMcCool followsPlease don't post offtopic stuffme i will be crazy for 3 days (I DON'T THINK HE FOLLOWS ME)
- kccuber
-
Scratcher
1000+ posts
scratchattach - A Scratch API wrapper (Python)
I once used ScratchConnect, but I'll probably switch to this library since it looks like it has more options or use bothI think you should use both, there are strengths and weaknesses for both modules.
- Joshisaurio
-
Scratcher
100+ posts
scratchattach - A Scratch API wrapper (Python)
And for a project beginner an advice?Maybe start simple using the
print("Hi there!")
#This is a variable: color = "Blue" #And this is a list: foods = ["Pizza", "Spaghetti", "Ice cream"]
#Create a function: def askcolor(): color = input("Say a color please \n") #Ask a color answer = input(f'Use {color} or change color? \nAnswer with "Yes" to change color\n') #The F adds variables, \n is a new line if answer == "Yes": return color #Gives the value of the color said else: askcolor() #Will repeat the function colors = [] for i in range(0, 5) colors.append(askcolor()) #Add a color using the function we made earlier for i in range(0, 5): print(f"Color #{i}: \n {colors[i]}") #This will print out th list
I didn't try out this code, I just typed it out here but it might have a few bugs. But it's pretty simple so I doubt it. It's pretty simple, it asks for 5 colors, and then it prints out those 5 colors. You can understand it pretty quickly. Once you learn that, you can go farther into tuples and dictionaries, the numpy library, and then start using other libraries to start making windows ()but that's more advanced

A code edit that you could use is Pycharm, it's pretty good, for making UI, start with Turtle (It's integrated, you just have to import it) and once you get the hang of it you can use Pygame or another library to make UI.
(Woa this took me 30 mins to write lol it's my longest forum post yet
)- Joshisaurio
-
Scratcher
100+ posts
scratchattach - A Scratch API wrapper (Python)
there are strengths and weaknesses for both modules.Yeah I mean both have their pros and cons I think ScratchConnect is prob better for fetching data but I'm not sure since I haven't used ScratchAttach but I'll start a test today
- YOSHIPAUL11
-
Scratcher
67 posts
scratchattach - A Scratch API wrapper (Python)
Thx u r awsomeAnd for a project beginner an advice?Maybe start simple using thelearn how to use the variables and listsprint("Hi there!")How to use functions, and loops and call them, here's an example Python program:#This is a variable: color = "Blue" #And this is a list: foods = ["Pizza", "Spaghetti", "Ice cream"]#Create a function: def askcolor(): color = input("Say a color please \n") #Ask a color answer = input(f'Use {color} or change color? \nAnswer with "Yes" to change color\n') #The F adds variables, \n is a new line if answer == "Yes": return color #Gives the value of the color said else: askcolor() #Will repeat the function colors = [] for i in range(0, 5) colors.append(askcolor()) #Add a color using the function we made earlier for i in range(0, 5): print(f"Color #{i}: \n {colors[i]}") #This will print out th list
I didn't try out this code, I just typed it out here but it might have a few bugs. But it's pretty simple so I doubt it. It's pretty simple, it asks for 5 colors, and then it prints out those 5 colors. You can understand it pretty quickly. Once you learn that, you can go farther into tuples and dictionaries, the numpy library, and then start using other libraries to start making windows ()but that's more advanced
A code edit that you could use is Pycharm, it's pretty good, for making UI, start with Turtle (It's integrated, you just have to import it) and once you get the hang of it you can use Pygame or another library to make UI.
(Woa this took me 30 mins to write lol it's my longest forum post yet)
- -FreeEngines-
-
Scratcher
100+ posts
scratchattach - A Scratch API wrapper (Python)
replit is run in the browser, has nothing to do with your pcIf replit shuts down, you're most likely using it wronglyIt doesn't 100% mean it is your fault. Maybe replit server has some problems… OR your computer needs a restart.
- Socialix
-
Scratcher
1000+ posts
scratchattach - A Scratch API wrapper (Python)
afaik scratch doesn't like requests coming from replit. i don't know though, i don't use replit.If replit shuts down, you're most likely using it wronglyIt doesn't 100% mean it is your fault. Maybe replit server has some problems… OR your computer needs a restart.
- coolcoder1213
-
Scratcher
100+ posts
scratchattach - A Scratch API wrapper (Python)
Is this how Blocky was created?
Also, check out s2py, it has a cloud database feature. Maybe use that.
Also, check out s2py, it has a cloud database feature. Maybe use that.
- MooMoo5678star
-
Scratcher
39 posts
scratchattach - A Scratch API wrapper (Python)
when green flag clicked
say [this is 101 post!] for (2) secs

- TimMcCool
-
Scratcher
100+ posts
scratchattach - A Scratch API wrapper (Python)
im having an error with this code
import scratchattach as scratch3
import random as r
import time
session = scratch3.login(“scratchyjimjam”, “*********”)
while True:
number = str(r.randint(100,690000000))
project = session.connect_project(number)
print(number)
dijeudhwuidh = project.author
i get this error:
Traceback (most recent call last):
File “C:\Users\scrat\Videos\userfinder.py”, line 10, in <module>
dijeudhwuidh = project.author
AttributeError: ‘PartialProject’ object has no attribute ‘author’
?
You can't get the author of a project that you can't access.
Read this for more information: https://github.com/TimMcCool/scratchattach#unshared-projects–scratch3partialproject
Last edited by TimMcCool (May 14, 2022 18:06:02)
- Discussion Forums
- » Advanced Topics
-
» scratchattach - A Scratch API wrapper (Python)
