Skip to main content

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)

Source distribution for ScratchExtensionTools 1.2.2
File Size Uploaded
scratchextensiontools-1.2.2.tar.gz 5.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ScratchExtensionTools 1.2.2
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

1.2.2 This release

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page