Discuss Scratch

wvj
Scratcher
1000+ posts

scratchclient - A scratch API wrapper for python

kccuber wrote:

help. i keep getting a syntaxerror every time i try installing this package. maybe it's an issue with my python install because
pip install requests
didn't work either
try
py -m pip install requests

Chiroyce
Scratcher
1000+ posts

scratchclient - A scratch API wrapper for python

try this -
pip3 install requests







April Fools' topics:
New Buildings in Scratch's headquarters
Give every Scratcher an M1 MacBook Air
Scratch should let users edit other Scratchers' projects
Make a statue for Jeffalo
Scratch Tech Tips™
Make a Chiroyce statue emoji


<img src=“x” onerror=“alert('XSS vulnerability discovered')”>

this is a test sentence
Maximouse
Scratcher
1000+ posts

scratchclient - A scratch API wrapper for python

dhuls wrote:

kccuber wrote:

help. i keep getting a syntaxerror every time i try installing this package. maybe it's an issue with my python install because
pip install requests
didn't work either
import os
os.system('pip install scratchclient')
(src)
This should behave exactly the same as typing “pip install scratchclient” into the terminal. The issue might be that kccuber isn't trying to run the command in the right place.


This is Maximouse's signature. Learn more about signatures.
Chiroyce
Scratcher
1000+ posts

scratchclient - A scratch API wrapper for python

Maximouse wrote:

This should behave exactly the same as typing “pip install scratchclient” into the terminal. The issue might be that kccuber isn't trying to run the command in the right place.
Yep, @kccuber open up command prompt and run this
pip install scratchclient
or
pip3 install scratchclient







April Fools' topics:
New Buildings in Scratch's headquarters
Give every Scratcher an M1 MacBook Air
Scratch should let users edit other Scratchers' projects
Make a statue for Jeffalo
Scratch Tech Tips™
Make a Chiroyce statue emoji


<img src=“x” onerror=“alert('XSS vulnerability discovered')”>

this is a test sentence
NFlex23
Scratcher
1000+ posts

scratchclient - A scratch API wrapper for python

What's the point of the share() method of session.get_project(id)? It could never be called since the ID would appear to be invalid.

Help improve the Advanced Topics (Really!)
Before you create a topic:
Always search for duplicates or other similar topics before making an umbrella topic, e.g., “The Mac Topic”.
  • Is it about something you are planning on making but haven't made yet? If so, please wait to post until you have created a working prototype. This is a key factor to keeping the ATs as clean as possible.
  • The ATs aren't technical support. It is perfectly valid to ask questions about things related to programming, but not issues with external websites, apps, or devices. Most sites have their own support system; try asking there!
  • Is it related to something you are making in Scratch? (This includes OSes and other Scratch projects) If so, please post in Collaboration, Show and Tell, or another similar forum.
  • Is your topic questionably “advanced”? Try browsing the other forums to see if your topic fits better in one of those.
  • Issues with Scratch itself should be put in Bugs and Glitches.
Before you post: Is what you're posting likely to start an argument or derail the thread (e.g., browsers, operating systems)? If so, please re-think your post!





Chiroyce
Scratcher
1000+ posts

scratchclient - A scratch API wrapper for python

NFlex23 wrote:

What's the point of the share() method of session.get_project(id)? It could never be called since the ID would appear to be invalid.
hmm… but since we're logged in it may work







April Fools' topics:
New Buildings in Scratch's headquarters
Give every Scratcher an M1 MacBook Air
Scratch should let users edit other Scratchers' projects
Make a statue for Jeffalo
Scratch Tech Tips™
Make a Chiroyce statue emoji


<img src=“x” onerror=“alert('XSS vulnerability discovered')”>

this is a test sentence
NFlex23
Scratcher
1000+ posts

scratchclient - A scratch API wrapper for python

Also, would it be possible to implement:
session.get_project(id).set_title("Text")
Since you can set the thumbnail of a project and the title of a studio, I thought it would be possible.

Last edited by NFlex23 (June 27, 2021 14:30:55)


Help improve the Advanced Topics (Really!)
Before you create a topic:
Always search for duplicates or other similar topics before making an umbrella topic, e.g., “The Mac Topic”.
  • Is it about something you are planning on making but haven't made yet? If so, please wait to post until you have created a working prototype. This is a key factor to keeping the ATs as clean as possible.
  • The ATs aren't technical support. It is perfectly valid to ask questions about things related to programming, but not issues with external websites, apps, or devices. Most sites have their own support system; try asking there!
  • Is it related to something you are making in Scratch? (This includes OSes and other Scratch projects) If so, please post in Collaboration, Show and Tell, or another similar forum.
  • Is your topic questionably “advanced”? Try browsing the other forums to see if your topic fits better in one of those.
  • Issues with Scratch itself should be put in Bugs and Glitches.
Before you post: Is what you're posting likely to start an argument or derail the thread (e.g., browsers, operating systems)? If so, please re-think your post!





NFlex23
Scratcher
1000+ posts

scratchclient - A scratch API wrapper for python

Chiroyce wrote:

NFlex23 wrote:

What's the point of the share() method of session.get_project(id)? It could never be called since the ID would appear to be invalid.
hmm… but since we're logged in it may work

It doesn't work for me..

Help improve the Advanced Topics (Really!)
Before you create a topic:
Always search for duplicates or other similar topics before making an umbrella topic, e.g., “The Mac Topic”.
  • Is it about something you are planning on making but haven't made yet? If so, please wait to post until you have created a working prototype. This is a key factor to keeping the ATs as clean as possible.
  • The ATs aren't technical support. It is perfectly valid to ask questions about things related to programming, but not issues with external websites, apps, or devices. Most sites have their own support system; try asking there!
  • Is it related to something you are making in Scratch? (This includes OSes and other Scratch projects) If so, please post in Collaboration, Show and Tell, or another similar forum.
  • Is your topic questionably “advanced”? Try browsing the other forums to see if your topic fits better in one of those.
  • Issues with Scratch itself should be put in Bugs and Glitches.
Before you post: Is what you're posting likely to start an argument or derail the thread (e.g., browsers, operating systems)? If so, please re-think your post!





NFlex23
Scratcher
1000+ posts

scratchclient - A scratch API wrapper for python

Also,
session.get_user("NFlex23").profile.set_status("This text was made with ScratchClient")
isn't working for me.

Help improve the Advanced Topics (Really!)
Before you create a topic:
Always search for duplicates or other similar topics before making an umbrella topic, e.g., “The Mac Topic”.
  • Is it about something you are planning on making but haven't made yet? If so, please wait to post until you have created a working prototype. This is a key factor to keeping the ATs as clean as possible.
  • The ATs aren't technical support. It is perfectly valid to ask questions about things related to programming, but not issues with external websites, apps, or devices. Most sites have their own support system; try asking there!
  • Is it related to something you are making in Scratch? (This includes OSes and other Scratch projects) If so, please post in Collaboration, Show and Tell, or another similar forum.
  • Is your topic questionably “advanced”? Try browsing the other forums to see if your topic fits better in one of those.
  • Issues with Scratch itself should be put in Bugs and Glitches.
Before you post: Is what you're posting likely to start an argument or derail the thread (e.g., browsers, operating systems)? If so, please re-think your post!





Touchcreator
Scratcher
500+ posts

scratchclient - A scratch API wrapper for python

my code wont even run, i can only type in console

Press crtl+shift+down after highlighting part of my siggy, or install a scrollbar siggy extension to see more.
See this project! It's 3d models in Scratch! (For real this time) 500 posts!
http://internetometer.com/image/48189.png

Also,


ScratchCatHELLO
Scratcher
1000+ posts

scratchclient - A scratch API wrapper for python

Touchcreator wrote:

my code wont even run, i can only type in console

…clarify?





ScratchCatHELLO
I have 5600+ posts, I've been on scratch for 5 1/2 years, I'm a Forum Helper™ and I have a Scratch Wiki account!
I like: Python, CSS, Javascript, Rust



Python 3 Text Adventure
cool new browser game - cursed laughing-crying emoji - Illuminati - you know waterbenders, but do you know stock-imagebenders? - snek - vibin' - Bump song (vevo) - Speed bump - yee - fred - m i c k e y
Chiroyce
Scratcher
1000+ posts

scratchclient - A scratch API wrapper for python

Touchcreator wrote:

my code wont even run, i can only type in console
save the file with the extension of .py, for example -
main.py
then double click on the file in file explorer / finder







April Fools' topics:
New Buildings in Scratch's headquarters
Give every Scratcher an M1 MacBook Air
Scratch should let users edit other Scratchers' projects
Make a statue for Jeffalo
Scratch Tech Tips™
Make a Chiroyce statue emoji


<img src=“x” onerror=“alert('XSS vulnerability discovered')”>

this is a test sentence
ScratchCatHELLO
Scratcher
1000+ posts

scratchclient - A scratch API wrapper for python

wvj wrote:

kccuber wrote:

help. i keep getting a syntaxerror every time i try installing this package. maybe it's an issue with my python install because
pip install requests
didn't work either
try
py -m pip install requests

py?!





ScratchCatHELLO
I have 5600+ posts, I've been on scratch for 5 1/2 years, I'm a Forum Helper™ and I have a Scratch Wiki account!
I like: Python, CSS, Javascript, Rust



Python 3 Text Adventure
cool new browser game - cursed laughing-crying emoji - Illuminati - you know waterbenders, but do you know stock-imagebenders? - snek - vibin' - Bump song (vevo) - Speed bump - yee - fred - m i c k e y
ScratchCatHELLO
Scratcher
1000+ posts

scratchclient - A scratch API wrapper for python

Chiroyce wrote:

Touchcreator wrote:

my code wont even run, i can only type in console
save the file with the extension of .py, for example -
main.py
then double click on the file in file explorer / finder

I think you have to run them via terminal or command prompt





ScratchCatHELLO
I have 5600+ posts, I've been on scratch for 5 1/2 years, I'm a Forum Helper™ and I have a Scratch Wiki account!
I like: Python, CSS, Javascript, Rust



Python 3 Text Adventure
cool new browser game - cursed laughing-crying emoji - Illuminati - you know waterbenders, but do you know stock-imagebenders? - snek - vibin' - Bump song (vevo) - Speed bump - yee - fred - m i c k e y
Maximouse
Scratcher
1000+ posts

scratchclient - A scratch API wrapper for python

ScratchCatHELLO wrote:

py?!
On Windows py is the “Python Launcher” that can be used even if Python is not in the PATH.


This is Maximouse's signature. Learn more about signatures.
Chiroyce
Scratcher
1000+ posts

scratchclient - A scratch API wrapper for python

ScratchCatHELLO wrote:

I think you have to run them via terminal or command prompt
yeah do this then
cd {folder_path_for_file}
python {FILENAME}.py







April Fools' topics:
New Buildings in Scratch's headquarters
Give every Scratcher an M1 MacBook Air
Scratch should let users edit other Scratchers' projects
Make a statue for Jeffalo
Scratch Tech Tips™
Make a Chiroyce statue emoji


<img src=“x” onerror=“alert('XSS vulnerability discovered')”>

this is a test sentence
JackK211424
Scratcher
500+ posts

scratchclient - A scratch API wrapper for python

So I fixed my ssl error by reinstalling python. If anybody else has this issue try this first.
(Oh the joys of when you spend hours trying to figure something out and you just have to take 30 seconds to fix the issue in the end)

JackK211424
Scratcher
500+ posts

scratchclient - A scratch API wrapper for python

I found what I think is kinda a strange behavior.

With the set event variable.value is “☁ varName”

With the set_cloud_variable function the variable name can be “☁ varName” or “varName”

Raihan142857
Scratcher
1000+ posts

scratchclient - A scratch API wrapper for python

JackK211424 wrote:

I found what I think is kinda a strange behavior.

With the set event variable.value is “☁ varName”

With the set_cloud_variable function the variable name can be “☁ varName” or “varName”
Why is that strange behavior? That's intentional.

I use scratch.
GF: I'll dump you. BF: hex dump or binary dump?










ScratchCatHELLO
Scratcher
1000+ posts

scratchclient - A scratch API wrapper for python

JackK211424 wrote:

I found what I think is kinda a strange behavior.

With the set event variable.value is “☁ varName”

With the set_cloud_variable function the variable name can be “☁ varName” or “varName”

this makes sense. I wouldn't want to have the ☁ symbol copied constantly





ScratchCatHELLO
I have 5600+ posts, I've been on scratch for 5 1/2 years, I'm a Forum Helper™ and I have a Scratch Wiki account!
I like: Python, CSS, Javascript, Rust



Python 3 Text Adventure
cool new browser game - cursed laughing-crying emoji - Illuminati - you know waterbenders, but do you know stock-imagebenders? - snek - vibin' - Bump song (vevo) - Speed bump - yee - fred - m i c k e y

Powered by DjangoBB