ScratchExtensionTools


NameScratchExtensionTools JSON
Version 1.2.2 PyPI version JSON
download
home_pageNone
SummaryTools to help build Scratch extensions in Python.
upload_time2025-08-17 08:27:30
maintainerNone
docs_urlNone
authorqiufeng
requires_python<4.0,>=3.8
licenseMIT
keywords scratch extension builder pscript
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Scratch Extension Tools

A Scratch Extension Tools.
It can help you made Scratch Extension.

## 📦 Installation
```bash
pip install ScratchExtensionTools
```

## 📜 Changelog
See [CHANGELOG.md](https://github.com/qiufengcute/ScratchExtensionTools/blob/main/CHANGELOG.md)


## QuickStart
```Python
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.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ScratchExtensionTools",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.8",
    "maintainer_email": null,
    "keywords": "scratch, extension, builder, pscript",
    "author": "qiufeng",
    "author_email": "appleidqiufeng@outlook.com",
    "download_url": "https://files.pythonhosted.org/packages/84/5d/afffcfbe22a45912ce1f9bb22428e06ee9c5bbbbc43243b86f74554aa394/scratchextensiontools-1.2.2.tar.gz",
    "platform": null,
    "description": "# Scratch Extension Tools\n\nA Scratch Extension Tools.\nIt can help you made Scratch Extension.\n\n## \ud83d\udce6 Installation\n```bash\npip install ScratchExtensionTools\n```\n\n## \ud83d\udcdc Changelog\nSee [CHANGELOG.md](https://github.com/qiufengcute/ScratchExtensionTools/blob/main/CHANGELOG.md)\n\n\n## QuickStart\n```Python\nfrom ScratchExtensionTools import ScratchExtensionBuilder\n\nbuilder = ScratchExtensionBuilder()\n\ndef hello_func():\n    print(\"Hello Scratch!\")\n\nbuilder.create_block(\n    opcode=\"say_hello\",\n    block_type=\"command\",\n    text=\"say hello\",\n    py_func=hello_func,\n    show_in=['sprite']  # Python side argument, exported as `filter` in Scratch JSON\n)\n\njs_code = builder.build_extension(\n    ext_id=\"demo\",\n    ext_name=\"Demo Extension\",\n    ext_color=\"#ffcc00\"\n)\n\nprint(js_code)  # => Scratch JS Extension\n```\n\n## \u26a0\ufe0f Note on filter / showin\n\nIn Scratch extension JSON, the property is filter.\nBut since filter is a Python built-in, this library uses the keyword showin on the Python side.\nIt will still output filter correctly in the generated Scratch extension JSON.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Tools to help build Scratch extensions in Python.",
    "version": "1.2.2",
    "project_urls": {
        "Changelog": "https://github.com/qiufengcute/ScratchExtensionTools/blob/main/CHANGELOG.md",
        "Homepage": "https://github.com/qiufengcute/ScratchExtensionTools",
        "Repository": "https://github.com/qiufengcute/ScratchExtensionTools"
    },
    "split_keywords": [
        "scratch",
        " extension",
        " builder",
        " pscript"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b1103da9d4bde52ee95bd0dd5d5ba11276a3160bf5e10cbdf356e6932ca66bbf",
                "md5": "5b7a9d0e6db18e35f72532e02cbe3a28",
                "sha256": "bf06b33b630876b4d58f78b484b015b03069ef73c23b0183bde67a612fc932b6"
            },
            "downloads": -1,
            "filename": "scratchextensiontools-1.2.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5b7a9d0e6db18e35f72532e02cbe3a28",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 6169,
            "upload_time": "2025-08-17T08:27:28",
            "upload_time_iso_8601": "2025-08-17T08:27:28.948020Z",
            "url": "https://files.pythonhosted.org/packages/b1/10/3da9d4bde52ee95bd0dd5d5ba11276a3160bf5e10cbdf356e6932ca66bbf/scratchextensiontools-1.2.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "845dafffcfbe22a45912ce1f9bb22428e06ee9c5bbbbc43243b86f74554aa394",
                "md5": "87d044f71355d190b10acb223f5ab9ed",
                "sha256": "59a739f6abefddc4186a02c5cd6764fcb058e048244ec44890106ff97fd5ca6d"
            },
            "downloads": -1,
            "filename": "scratchextensiontools-1.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "87d044f71355d190b10acb223f5ab9ed",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8",
            "size": 5591,
            "upload_time": "2025-08-17T08:27:30",
            "upload_time_iso_8601": "2025-08-17T08:27:30.217429Z",
            "url": "https://files.pythonhosted.org/packages/84/5d/afffcfbe22a45912ce1f9bb22428e06ee9c5bbbbc43243b86f74554aa394/scratchextensiontools-1.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-17 08:27:30",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "qiufengcute",
    "github_project": "ScratchExtensionTools",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "scratchextensiontools"
}
        
Elapsed time: 2.21531s