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
- Host: GitHub
- URL: https://github.com/shysolocup/snapbyob
- Owner: shysolocup
- License: mit
- Created: 2024-08-23T17:07:04.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-05T18:46:30.000Z (over 1 year ago)
- Last Synced: 2025-08-24T17:35:18.416Z (8 months ago)
- Topics: build-your-own-blocks, buildyourownblocks, framework, frameworks, py, python, python3, snap, wrapper, wrapper-api
- Language: Python
- Homepage:
- Size: 486 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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());
```