An open API service indexing awesome lists of open source software.

https://github.com/shysolocup/snapbyob

A Python framework for the efficient and streamlined creation of Snap! (Build Your Own Blocks) projects
https://github.com/shysolocup/snapbyob

build-your-own-blocks buildyourownblocks framework frameworks py python python3 snap wrapper wrapper-api

Last synced: about 2 months ago
JSON representation

A Python framework for the efficient and streamlined creation of Snap! (Build Your Own Blocks) projects

Awesome Lists containing this project

README

          

# Snap! (Build Your Own Blocks) Python
A framework for the efficient and streamlined creation of Snap! (Build Your Own Blocks) projects in Python

made to teach students how to use non-block coding with something familiar

- Full [documentation](https://github.com/shysolocup/snapbyob/wiki)
- Open source


```console
pip install snapbyob
```

```py
from snapbyob import Project, Enum
import asyncio;

proj = Project({
"name": "Example"
});

@proj.on("block.placed")
async def test(self, ctx):
print(ctx.name, ctx.category);

@proj.on("ping")
async def test(self, time):
a = await proj.scripts.insert('control.whenKeyPressed', Enum.keycode.a);
await a.scripts.insert('motion.move', x=10, y=10);

async def test():
await proj.ping();

asyncio.run(test());
```