Metadata-Version: 2.1
Name: scratchcloud
Version: 1.0.0
Summary: An event-based asynchronous wrapper for scratch.mit.edu cloud variables.
Home-page: https://github.com/yuwex/scratchcloud
Author: yuwex
License: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: MIT License
Classifier: Intended Audience :: Education
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.8.0
Description-Content-Type: text/markdown
Requires-Dist: aiohttp (>=3.8.0)
Requires-Dist: websockets (>=10.1)
Provides-Extra: docs
Requires-Dist: sphinx (==4.3.2) ; extra == 'docs'
Requires-Dist: sphinx-rtd-theme (==1.0.0) ; extra == 'docs'

# scratchcloud
An asynchronous pythonic wrapper for scratch.mit.edu cloud websocket connections.

## Features
 * Efficient asynchronous connection to Scratch
 * Event-based handling of cloud variables
 * Built-in reconnecting

## Extensions
 * Fetching data from the Scratch API
 * Easy encoding and decoding of variables
 * Sending and receiving large cloud payloads
 * Finding who changed a cloud variable

## Example
```python
from scratchcloud import CloudClient, CloudChange

client = CloudClient('SS-2', '588579111')

@client.event
async def on_connect():
    print('Connected!')

@client.event
async def on_disconnect():
    print('Disconnected!')

@client.event
async def on_message(cloud: CloudChange):
    print(f"{cloud.name} was set to {cloud.value}!")
    await client.set_cloud(cloud.name, "123")

client.run("SuperSecretPassword22")
```

## Links
 * [Docs](https://yuwex.github.io/scratchcloud)
 * [Scratch](https://scratch.mit.edu)
 * [Python Asyncio](https://docs.python.org/3/library/asyncio.html)

