Skip to main content

scratchclient

A scratch API wrapper for python.

Installation

Go to your terminal (not your python shell) and execute this command:

pip install scratchclient

If this didn't work for whatever reason, open your python shell and run the following:

import os; os.system("pip install scratchclient")

Example Usage

Basic Usage

from scratchclient import ScratchSession

session = ScratchSession("ceebee", "--uwu--")

# post comments
session.get_user("Paddle2See").post_comment("OwO")

# lots of other stuff
print(session.get_project(450216269).get_comments()[0].content)
print(session.get_studio(29251822).description)

Cloud Connection

from scratchclient import ScratchSession

session = ScratchSession("griffpatch", "SecurePassword7")

connection = session.create_cloud_connection(450216269)

connection.set_cloud_variable("variable name", 5000)

@connection.on("set")
def on_set(variable):
    print(variable.name, variable.value)

print(connection.get_cloud_variable("other variable"))

Documentation is available at https://cubeythecube.github.io/scratchclient.

All bugs should be reported to the github repository. If you need help or guideance, check out the forum topic.

Metadata

Release files for scratchclient 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scratchclient 1.0.1
File Size Uploaded Provenance Actions
scratchclient-1.0.1.tar.gz 25.7 kB Without provenance Details for scratchclient-1.0.1.tar.gz

Release files / scratchclient-1.0.1.tar.gz

Download URL scratchclient-1.0.1.tar.gz
Size 25.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f2a2a22e4c52f935a96f9de91f5996ddcd70bbab0217708ec47eadf3e7506ccd
BLAKE2b-256 checksum
How to use checksums
5c59a3eecee9357875975a5735abdfe89a2febffe94ccc254e56de0cc6362c04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Security for scratchclient 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page