Giter Site home page Giter Site logo

mas6y6 / scratchattach Goto Github PK

View Code? Open in Web Editor NEW

This project forked from timmccool/scratchattach

0.0 0.0 0.0 3.85 MB

Scratch API wrapper with support for almost all site features and cloud requests framework

License: MIT License

Python 100.00%

scratchattach's Introduction

Scratch API wrapper with support for almost all site features. Created by TimMcCool.

This library can set cloud variables, follow Scratchers, post comments and do so much more! It has special features that make it easy to transmit data through cloud variables.

PyPI status PyPI download month PyPI version shields.io GitHub license Documentation Status

Links

Report bugs by opening an issue on this repository. If you need help or guideance, leave a comment in the official forum topic. Projects made using scratchattach can be added to this Scratch studio.

Example usage

import scratchattach as scratch3

session = scratch3.login("username", "password")
conn = session.connect_cloud("project_id")

conn.set_var("variable", value)

More examples

Getting started

Installation:

Run the following command in your command prompt / shell:

pip install -U scratchattach

Logging in with username / password:

import scratchattach as scratch3

session = scratch3.login("username", "password")

login() returns a Session object that saves your login.

Logging in with a sessionId: You can get your session id from your browser's cookies. More information

import scratchattach as scratch3

session = scratch3.Session("sessionId", username="username") #The username field is case sensitive

Connect to the Scratch cloud:

conn = session.connect_cloud("project_id")

Get / Set a cloud var:

value = scratch3.get_var("project_id", "variable")
conn.set_var("variable", "value") #the variable name is specified without the cloud emoji

Follow a user / love a project:

user_to_follow = session.connect_user("username")
user_to_follow.follow()
project_to_love = session.connect_project("project_id")
project_to_love.love()

All scratchattach features are documented in the documentation.

Contributors

  • Allmost all code by TimMcCool.
  • See the GitHub repository for full list of contributors.
  • Create a pull request to contribute code yourself.

scratchattach's People

Contributors

timmccool avatar namtacs avatar lizard-official avatar the-cloud-dev avatar grigoryshink avatar eitan222 avatar rc9910-scratch avatar madu59 avatar quantum-codes avatar engineerrunner avatar ententapl avatar noverd avatar grisshink avatar p-nutsk avatar redstone-dev avatar thecommcraft avatar jamesmedley avatar mas6y6 avatar yuwex avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.