Scratch Extension Tools
A Scratch Extension Tools. It can help you made Scratch Extension.
📦 Installation
pip install ScratchExtensionTools
📜 Changelog
See CHANGELOG.md
QuickStart
from ScratchExtensionTools import ScratchExtensionBuilder
builder = ScratchExtensionBuilder()
def hello_func():
print("Hello Scratch!")
builder.create_block(
opcode="say_hello",
block_type="command",
text="say hello",
py_func=hello_func,
show_in=['sprite'] # Python side argument, exported as `filter` in Scratch JSON
)
js_code = builder.build_extension(
ext_id="demo",
ext_name="Demo Extension",
ext_color="#ffcc00"
)
print(js_code) # => Scratch JS Extension
⚠️ Note on filter / showin
In Scratch extension JSON, the property is filter. But since filter is a Python built-in, this library uses the keyword showin on the Python side. It will still output filter correctly in the generated Scratch extension JSON.
Release files for ScratchExtensionTools 1.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| scratchextensiontools-1.2.2.tar.gz | 5.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| scratchextensiontools-1.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.8 kB
Release files / scratchextensiontools-1.2.2.tar.gz
| Download URL | scratchextensiontools-1.2.2.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
59a739f6abefddc4186a02c5cd6764fcb058e048244ec44890106ff97fd5ca6d
|
|
BLAKE2b-256 checksum How to use checksums |
845dafffcfbe22a45912ce1f9bb22428e06ee9c5bbbbc43243b86f74554aa394
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.12.9 Windows/11
|
Release files / scratchextensiontools-1.2.2-py3-none-any.whl
| Download URL | scratchextensiontools-1.2.2-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bf06b33b630876b4d58f78b484b015b03069ef73c23b0183bde67a612fc932b6
|
|
BLAKE2b-256 checksum How to use checksums |
b1103da9d4bde52ee95bd0dd5d5ba11276a3160bf5e10cbdf356e6932ca66bbf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.12.9 Windows/11
|