Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » scratchclient - A scratch API wrapper for python
- god286
- Scratcher
1000+ posts
scratchclient - A scratch API wrapper for python
if you use replit, do not put things in the env file. instead use the lock button on the sidebar to get access into env. Don't forget to put your password in a .env file, especially if you are using an online IDE.
Here are some of my followers!
I joined: 5 years, 9 months, 24 days ago (31/03/2018)
I have: 479 followers
In total, I have attained: 1,403 loves, 1,145 favourites, and 33,731 views.
Fun Fact: If my account continued to gain followers at a similar rate to right now, in 14,210 years I would reach the number of followers griffpatch has today! Try to imagine how many followers he would have then!
Thank you everyone!
Script created by god286.
- MyMessage
- Scratcher
100+ posts
scratchclient - A scratch API wrapper for python
Thanks it works, also yes I was going to use .envHow do I read a variable value in a certain project?
I tried using the connection.get_cloud_variable(“VARIABLENAMEHERE”) in different ways, but I'm having trouble with it.
This should work:Don't forget to put your password in a .env file, especially if you are using an online IDE.import os from scratchclient import ScratchSession session = ScratchSession("MyMessage", os.getenv("password")) project_id = xxxxxxxxxx connection = session.create_cloud_connection(project_id) print(connection.get_cloud_variable("cloud_1"))
MSG CLAN
MyMessage
- kccuber
- Scratcher
1000+ posts
scratchclient - A scratch API wrapper for python
NO. If you use Replit click the Lock Icon to make envs. I think .env files may not be actually hidden, so redact your password from there (IF YOU USED REPLIT) and change your passwordThanks it works, also yes I was going to use .envHow do I read a variable value in a certain project?
I tried using the connection.get_cloud_variable(“VARIABLENAMEHERE”) in different ways, but I'm having trouble with it.
This should work:Don't forget to put your password in a .env file, especially if you are using an online IDE.import os from scratchclient import ScratchSession session = ScratchSession("MyMessage", os.getenv("password")) project_id = xxxxxxxxxx connection = session.create_cloud_connection(project_id) print(connection.get_cloud_variable("cloud_1"))
- MyMessage
- Scratcher
100+ posts
scratchclient - A scratch API wrapper for python
Yes, I saw that part of the discussion too, apologies for not referencing it.NO. If you use Replit click the Lock Icon to make envs. I think .env files may not be actually hidden, so redact your password from there (IF YOU USED REPLIT) and change your passwordThanks it works, also yes I was going to use .envHow do I read a variable value in a certain project?
I tried using the connection.get_cloud_variable(“VARIABLENAMEHERE”) in different ways, but I'm having trouble with it.
This should work:Don't forget to put your password in a .env file, especially if you are using an online IDE.import os from scratchclient import ScratchSession session = ScratchSession("MyMessage", os.getenv("password")) project_id = xxxxxxxxxx connection = session.create_cloud_connection(project_id) print(connection.get_cloud_variable("cloud_1"))
MSG CLAN
MyMessage
- BoopBoop92
- Scratcher
4 posts
scratchclient - A scratch API wrapper for python
slight issue: i've been trying to get my code to work since this morning (woke up at like 6:30) since it worked the day earlier. now it keeps coming back with errors about trying to log in, help?
from keep_alive import keep_alive
keep_alive()
import os
scratch_username = “BoopBoop92”
my_secret = os.environ'login' (also this isnt a part of the code but i believe brackets messes it up so there are none on here)
from scratchclient import ScratchSession
session = ScratchSession(scratch_username, my_secret)
connection = session.create_cloud_connection(627859798)
connection.set_cloud_variable(“annoyance”, 50000)
(side note: the keep_alive() function is for what it says, it shouldn't effect anything)
(also error keeps coming back as the incorrect username or password thing)
from keep_alive import keep_alive
keep_alive()
import os
scratch_username = “BoopBoop92”
my_secret = os.environ'login' (also this isnt a part of the code but i believe brackets messes it up so there are none on here)
from scratchclient import ScratchSession
session = ScratchSession(scratch_username, my_secret)
connection = session.create_cloud_connection(627859798)
connection.set_cloud_variable(“annoyance”, 50000)
(side note: the keep_alive() function is for what it says, it shouldn't effect anything)
(also error keeps coming back as the incorrect username or password thing)
Last edited by BoopBoop92 (Jan. 13, 2022 21:39:22)
- mrcoat
- Scratcher
100+ posts
scratchclient - A scratch API wrapper for python
Whenever I got an error with logging in, the scratch website is either down, or the login service is. slight issue: i've been trying to get my code to work since this morning (woke up at like 6:30) since it worked the day earlier. now it keeps coming back with errors about trying to log in, help?
from keep_alive import keep_alive
keep_alive()
import os
scratch_username = “BoopBoop92”
my_secret = os.environ
from scratchclient import ScratchSession
session = ScratchSession(scratch_username, my_secret)
connection = session.create_cloud_connection(627859798)
connection.set_cloud_variable(“annoyance”, 50000)
(side note: the keep_alive() function is for what it says, it shouldn't effect anything)
(also error keeps coming back as the incorrect username or password thing)
My cartoon
Watch My Show!
I was gonna put an image of the studio but it didn't work.
Cool thing I made
when [Awesomeness v] > (100)
forever
play sound [Victory v] until done
set rotation style [The best style v]
go to [The party v]
end
- BoopBoop92
- Scratcher
4 posts
scratchclient - A scratch API wrapper for python
i even tried logging in myself, it worked perfectly fineWhenever I got an error with logging in, the scratch website is either down, or the login service is. slight issue: i've been trying to get my code to work since this morning (woke up at like 6:30) since it worked the day earlier. now it keeps coming back with errors about trying to log in, help?
from keep_alive import keep_alive
keep_alive()
import os
scratch_username = “BoopBoop92”
my_secret = os.environ
from scratchclient import ScratchSession
session = ScratchSession(scratch_username, my_secret)
connection = session.create_cloud_connection(627859798)
connection.set_cloud_variable(“annoyance”, 50000)
(side note: the keep_alive() function is for what it says, it shouldn't effect anything)
(also error keeps coming back as the incorrect username or password thing)
- BoopBoop92
- Scratcher
4 posts
scratchclient - A scratch API wrapper for python
ok i think this is an issue with scratchclient since i have double checked almost everything and tried different methods but nothing works.
- god286
- Scratcher
1000+ posts
scratchclient - A scratch API wrapper for python
Where you define my_secret did you mean to put this? scratch_username = “BoopBoop92”
my_secret = os.environ
from scratchclient import ScratchSession
my_secret = os.environ['PASSWORD']
Here are some of my followers!
I joined: 5 years, 9 months, 24 days ago (31/03/2018)
I have: 479 followers
In total, I have attained: 1,403 loves, 1,145 favourites, and 33,731 views.
Fun Fact: If my account continued to gain followers at a similar rate to right now, in 14,210 years I would reach the number of followers griffpatch has today! Try to imagine how many followers he would have then!
Thank you everyone!
Script created by god286.
- BoopBoop92
- Scratcher
4 posts
scratchclient - A scratch API wrapper for python
i put ‘login’ with brackets on the sides after os.environ idk why it doesnt show though i think brackets messes it upWhere you define my_secret did you mean to put this? scratch_username = “BoopBoop92”
my_secret = os.environ
from scratchclient import ScratchSessionmy_secret = os.environ['PASSWORD']
Last edited by BoopBoop92 (Jan. 13, 2022 21:36:48)
- ToastersUnited
- Scratcher
1000+ posts
scratchclient - A scratch API wrapper for python
I think it should be normal bracketsi put ‘login’ with brackets on the sides after os.environ idk why it doesnt show though i think brackets messes it upWhere you define my_secret did you mean to put this? scratch_username = “BoopBoop92”
my_secret = os.environ
from scratchclient import ScratchSessionmy_secret = os.environ['PASSWORD']
os.environ('PASSWORD')
Sign on the M18 Motorway warning that horses, horse-drawn vehicles, pedestrians and bicycles are forbidden.
Road signs in the Republic of Ireland do not differ greatly from those used elsewhere in Europe – with the notable exception that hazard or warning signs follow the “New World” style of a yellow diamond. The symbols used on these warning signs do, nevertheless, resemble much more closely those used (on red-bordered white or yellow triangles) in the rest of Europe than many of those seen in the United States.
Typical road signs in rural areas of the Republic of Ireland. Here, a fingerpost with old road number and Bord Fáilte logo. Signpost located in Rathangan, Co. Kildare.
Regulatory signs (relating to limits and prohibitions) differ very little from those used in the rest of Europe.
The system of directional signs is based upon, and is very similar to, that employed in the United Kingdom, but is bilingual everywhere except in the Gaeltacht, where only the Irish language is used on signs.
In Ireland, the highest category of road is a motorway (mótarbhealach, plural: mótarbhealaí), indicated by the prefix M followed by a one- or two-digit number (the number of the national route of which each motorway forms a part). The motorway network consists entirely of motorway-grade dual carriageways and is largely focused upon Dublin. There are also several three-lane motorways, while Ireland's busiest road, the M50, incorporates four-lane, five-lane, and six-lane stretches.
- robotkid828
- Scratcher
100+ posts
scratchclient - A scratch API wrapper for python
looks like its like a random issue, should go away soonI think it should be normal bracketsi put ‘login’ with brackets on the sides after os.environ idk why it doesnt show though i think brackets messes it upWhere you define my_secret did you mean to put this? scratch_username = “BoopBoop92”
my_secret = os.environ
from scratchclient import ScratchSessionmy_secret = os.environ['PASSWORD']
os.environ('PASSWORD')
Last edited by robotkid828 (Jan. 14, 2022 02:18:41)
the robotkid828 suddenly appears!
random programmer/game developer here, probably wont be on scratch much other than the forums.
- Chiroyce
- Scratcher
1000+ posts
scratchclient - A scratch API wrapper for python
you sure you used square brackets and not ( ? i put ‘login’ with brackets on the sides after os.environ idk why it doesnt show though i think brackets messes it up
my_secret = os.environ['login']
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
- 9pfs
- Scratcher
100+ posts
scratchclient - A scratch API wrapper for python
WHY DID PEOPLE HELP THEM??? NOW THEY'RE DDOSING GRIFFPATCH'S PROJECTS!!! THE FACT THAT THEY HAD A KEEP-ALIVE SCRIPT SHOULD'VE BEEN A RED FLAG!!! WHY????????you sure you used square brackets and not ( ? i put ‘login’ with brackets on the sides after os.environ idk why it doesnt show though i think brackets messes it upmy_secret = os.environ['login']
Update to Chrome 98 immediately More info
Share
topic/571765 MUST be apologized for.
Turns out, it was!!!
- ajsya
- Scratcher
1000+ posts
scratchclient - A scratch API wrapper for python
?WHY DID PEOPLE HELP THEM??? NOW THEY'RE DDOSING GRIFFPATCH'S PROJECTS!!! THE FACT THAT THEY HAD A KEEP-ALIVE SCRIPT SHOULD'VE BEEN A RED FLAG!!! WHY????????you sure you used square brackets and not ( ? i put ‘login’ with brackets on the sides after os.environ idk why it doesnt show though i think brackets messes it upmy_secret = os.environ['login']
That's just so their replit doesn't die…
- dhuls
- Scratcher
1000+ posts
scratchclient - A scratch API wrapper for python
(#476)This user ended up ddosing Griffpatch's cloud projects?WHY DID PEOPLE HELP THEM??? NOW THEY'RE DDOSING GRIFFPATCH'S PROJECTS!!! THE FACT THAT THEY HAD A KEEP-ALIVE SCRIPT SHOULD'VE BEEN A RED FLAG!!! WHY????????you sure you used square brackets and not ( ? i put ‘login’ with brackets on the sides after os.environ idk why it doesnt show though i think brackets messes it upmy_secret = os.environ['login']
That's just so their replit doesn't die…
Or so I heard.
- god286
- Scratcher
1000+ posts
scratchclient - A scratch API wrapper for python
yeah it did happen. This user ended up ddosing Griffpatch's cloud projects
Or so I heard.
but lets not get offtopic
Here are some of my followers!
I joined: 5 years, 9 months, 24 days ago (31/03/2018)
I have: 479 followers
In total, I have attained: 1,403 loves, 1,145 favourites, and 33,731 views.
Fun Fact: If my account continued to gain followers at a similar rate to right now, in 14,210 years I would reach the number of followers griffpatch has today! Try to imagine how many followers he would have then!
Thank you everyone!
Script created by god286.
- JackK211424
- Scratcher
500+ posts
scratchclient - A scratch API wrapper for python
Not like they could have known, after all, they probably arent fortune tellers.WHY DID PEOPLE HELP THEM??? NOW THEY'RE DDOSING GRIFFPATCH'S PROJECTS!!! THE FACT THAT THEY HAD A KEEP-ALIVE SCRIPT SHOULD'VE BEEN A RED FLAG!!! WHY????????you sure you used square brackets and not ( ? i put ‘login’ with brackets on the sides after os.environ idk why it doesnt show though i think brackets messes it upmy_secret = os.environ['login']
Also what is a keep alive script?
Last edited by JackK211424 (Jan. 15, 2022 23:15:33)
- hiPeeps124816
- Scratcher
500+ posts
scratchclient - A scratch API wrapper for python
a script that keeps your project alive until you stop itNot like they could have known, after all, they probably arent fortune tellers.WHY DID PEOPLE HELP THEM??? NOW THEY'RE DDOSING GRIFFPATCH'S PROJECTS!!! THE FACT THAT THEY HAD A KEEP-ALIVE SCRIPT SHOULD'VE BEEN A RED FLAG!!! WHY????????you sure you used square brackets and not ( ? i put ‘login’ with brackets on the sides after os.environ idk why it doesnt show though i think brackets messes it upmy_secret = os.environ['login']
Also what is a keep alive script?
Generation 7: First time you see this? Copy and paste it on top of your signature in the forums and increase generation by 1.
thethethethethethethethethethethethethethethethethethethethethethethethethethethethethethethethethethethethethethethethethethethethethethethe
Specs -
OS: macOS 11.6.4
Browser: Varies, usually Safari 15.3 or Opera GX 83 or Firefox 96
Computer: Late 2013 MacBook Pro 2.4GHz Dual Core Intel Core i5
highlight and shift down arrow
;
- Chiroyce
- Scratcher
1000+ posts
scratchclient - A scratch API wrapper for python
I thought this was a topic where you're meant to help… WHY DID PEOPLE HELP THEM??? NOW THEY'RE DDOSING GRIFFPATCH'S PROJECTS!!! THE FACT THAT THEY HAD A KEEP-ALIVE SCRIPT SHOULD'VE BEEN A RED FLAG!!! WHY????????
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