Skip to main content

A scratch API wrapper for Python.

Project description

scratchclient

A scratch API wrapper for python.

Based off of https://github.com/edqx/node-scratch-client, and ilcheese2's cloud code based on my own.

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 on the way.

All bugs should be reported to the github repository or my Scratch profile.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scratchclient-0.4.6.tar.gz (9.3 kB view details)

Uploaded Source

File details

Details for the file scratchclient-0.4.6.tar.gz.

File metadata

  • Download URL: scratchclient-0.4.6.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.8.0 tqdm/4.61.0 CPython/3.8.10

File hashes

Hashes for scratchclient-0.4.6.tar.gz
Algorithm Hash digest
SHA256 2484c07aedca505d07f604a8ca3a2db9903a025c4311cc6ac0a8e05af912d152
MD5 23c28912e69a547725b4f661a54dca60
BLAKE2b-256 5d5c68c7f0d531144221e3b5862bab2b4b02d13c47782443a4eed640cee2d14a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page