Skip to main content

Improved Version Of The Scratch API Wrapper By CubeyTheCube

Project description

Improvement #1 | vv1.3 Changelog

Made most functions return a status code, some of the functions are:

  • .delete()
  • .report()
  • .set_*()
  • Studio.add_project()
  • Studio.remove_project()
  • Studio.open_to_public()
  • Studio.close_to_public()
  • Studio.toggle_commenting()

etc...

scratchclientImproved

Improved version of the Scratch API wrapper by CubeyTheCube. I will mainly fix errors.

Installation

Go to your terminal (Not your Python shell) and execute this command:

pip install scratchclientImproved

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

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

Example Usage

Basic Usage

from scratchclientImproved import ScratchSession

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

# Post comments
session.get_user("User").post_comment("OwO")

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

Cloud Connection

from scratchclientImproved 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://StellarSt0rm.github.io/scratchclientImproved.

All bugs should be reported to the Github repository.

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

scratchclientImproved-1.3.tar.gz (24.2 kB view details)

Uploaded Source

Built Distribution

scratchclientImproved-1.3-py3-none-any.whl (30.1 kB view details)

Uploaded Python 3

File details

Details for the file scratchclientImproved-1.3.tar.gz.

File metadata

  • Download URL: scratchclientImproved-1.3.tar.gz
  • Upload date:
  • Size: 24.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for scratchclientImproved-1.3.tar.gz
Algorithm Hash digest
SHA256 f3bb344809fd344f1d20fc51a674175e921b07c170d97fce9c79dcaf9010c014
MD5 118e60c9f47048d9afe5e0a759f6eb4f
BLAKE2b-256 e8025d3fa3aa4190adf2de7dc264ea925c89c5de6b65db0e3686541f95155730

See more details on using hashes here.

File details

Details for the file scratchclientImproved-1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for scratchclientImproved-1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ecc623923ce0d96c2418c733dbd9ffbde2299a8f92e1c1f041805259e02a3e8f
MD5 9ac9264abbebb89afc9b4fbb96d19ef6
BLAKE2b-256 61f9f1c2435f60276fdaee32dfb787398f2ba4875d71fc416e45d9eab2a7a6d0

See more details on using hashes here.

Supported by

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