Skip to content

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

License

Notifications You must be signed in to change notification settings

shysolocup/snapbyob

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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


pip install snapbyob
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());

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published