ScratchAPI is a Scratch API interface written in Python
Project description
==========
ScratchAPI
==========
`Scratch <https://scratch.mit.edu>`_ API Interface
ScratchAPI is a scratch API interface written in `Python <https://www.python.org/>`_.
To get started, install it with ``setup.py``
Logging in
==========
To use the api, you must log in to your scratch account:
::
import scratchapi
scratch = scratchapi.ScratchUserSession('Username', 'password')
Now, you can verify your session to see if you logged in correctly:
::
scratch.tools.verify_session()
There are a lot of things you can you when you're logged in!
Take ownership of a new project:
::
scratch.lib.utils.request(path='/internalapi/project/new/set/?v=v442&title=Project', server=scratch.PROJECTS_SERVER, method='POST', payload={})
Follow Someone:
::
scratch.users.follow('Bob')
Set a cloud variable:
::
s.cloud.set_var('Variable', 12345, 4453648)
Credits
=======
The cloud data interface information was acquired from various topics on the `Scratch Forums <https://scratch.mit.edu/discuss>`_.
`TheLogFather <https://github.com/TheLogFather>`_` helped out with various wrappers and conveniences for cloud data.
ScratchAPI
==========
`Scratch <https://scratch.mit.edu>`_ API Interface
ScratchAPI is a scratch API interface written in `Python <https://www.python.org/>`_.
To get started, install it with ``setup.py``
Logging in
==========
To use the api, you must log in to your scratch account:
::
import scratchapi
scratch = scratchapi.ScratchUserSession('Username', 'password')
Now, you can verify your session to see if you logged in correctly:
::
scratch.tools.verify_session()
There are a lot of things you can you when you're logged in!
Take ownership of a new project:
::
scratch.lib.utils.request(path='/internalapi/project/new/set/?v=v442&title=Project', server=scratch.PROJECTS_SERVER, method='POST', payload={})
Follow Someone:
::
scratch.users.follow('Bob')
Set a cloud variable:
::
s.cloud.set_var('Variable', 12345, 4453648)
Credits
=======
The cloud data interface information was acquired from various topics on the `Scratch Forums <https://scratch.mit.edu/discuss>`_.
`TheLogFather <https://github.com/TheLogFather>`_` helped out with various wrappers and conveniences for cloud data.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
scratchapi-1.0.0.zip
(8.9 kB
view hashes)
scratchapi-1.0.0.tar.gz
(6.4 kB
view hashes)
Built Distribution
Close
Hashes for scratchapi-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e02259ebcb852c3b31174ab0fa3b695b255c1f89081d8c97fbc89a3a23366a2e |
|
MD5 | b1ff50ea64c4f7de2ef03d312f52b747 |
|
BLAKE2b-256 | a75e535c2c66ee3cd2dad1bf8cd07148ed8f3d2df51bcf74e693f3300057380d |