scratchattach


Namescratchattach JSON
Version 1.7.3 PyPI version JSON
download
home_pagehttps://github.com/TimMcCool/scratchattach
SummaryAn Scratch API Wrapper for scratch.mit.edu
upload_time2024-05-24 21:37:24
maintainerNone
docs_urlNone
authorTimMcCool
requires_pythonNone
licenseNone
keywords scratch api scratchattach scratch api python scratch python scratch for python scratch scratch cloud scratch cloud variables scratch bot
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Scratch API wrapper with support for almost all site features. Created by [TimMcCool](https://scratch.mit.edu/users/TimMcCool/).

This library can set cloud variables, follow Scratchers, post comments and do so much more! It has special features that make it easy to transmit data through cloud variables.

<p align="left">
  <img width="160" height="133" src="https://github.com/TimMcCool/scratchattach/blob/main/logos/logo_dark_transparent_eyes.svg">
</p>

[![PyPI status](https://img.shields.io/pypi/status/scratchattach.svg)](https://pypi.python.org/pypi/scratchattach/)
[![PyPI download month](https://img.shields.io/pypi/dm/scratchattach.svg)](https://pypi.python.org/pypi/scratchattach/)
[![PyPI version shields.io](https://img.shields.io/pypi/v/scratchattach.svg)](https://pypi.python.org/pypi/scratchattach/)
[![GitHub license](https://badgen.net/github/license/TimMcCool/scratchattach)](https://github.com/TimMcCool/scratchattach/blob/master/LICENSE)
[![Documentation Status](https://readthedocs.org/projects/scratchattach/badge/?version=latest)](https://scratchattach.readthedocs.io/en/latest/?badge=latest)

# Links

- **[Documentation](https://github.com/TimMcCool/scratchattach/wiki)**
- [Extended documentation (WIP)](https://scratchattach.readthedocs.io/en/latest/)
- [Examples](https://github.com/TimMcCool/scratchattach/wiki/Examples)
- [Change log](https://github.com/TimMcCool/scratchattach/blob/main/CHANGELOG.md)

Report bugs by opening an issue on this repository. If you need help or guideance, leave a comment in the [official forum topic](https://scratch.mit.edu/discuss/topic/603418/
). Projects made using scratchattach can be added to [this Scratch studio](https://scratch.mit.edu/studios/31478892/).

# Example usage

```py
import scratchattach as scratch3

session = scratch3.login("username", "password")
conn = session.connect_cloud("project_id")

conn.set_var("variable", value)
```

**[More examples](https://github.com/TimMcCool/scratchattach/wiki/Examples)**

# Getting started

**Installation:**

Run the following command in your command prompt / shell:

```
pip install -U scratchattach
```

**Logging in with username / password:**

```python
import scratchattach as scratch3

session = scratch3.login("username", "password")
```

`login()` returns a `Session` object that saves your login.

**Logging in with a sessionId:** *You can get your session id from your browser's cookies. [More information](https://github.com/TimMcCool/scratchattach/wiki/Get-your-session-id)*
```python
import scratchattach as scratch3

session = scratch3.Session("sessionId", username="username") #The username field is case sensitive
```

**Connect to the Scratch cloud:**

```python
conn = session.connect_cloud("project_id")
```

**Get / Set a cloud var:**

```python
value = scratch3.get_var("project_id", "variable")
conn.set_var("variable", "value") #the variable name is specified without the cloud emoji
```

**Follow a user / love a project:**

```python
user_to_follow = session.connect_user("username")
user_to_follow.follow()
project_to_love = session.connect_project("project_id")
project_to_love.love()
```

**All scratchattach features are documented in the [documentation](https://github.com/TimMcCool/scratchattach/wiki/#cloud-variables).**

# Contributors

- Allmost all code by TimMcCool.
- See the GitHub repository for full list of contributors.
- Create a pull request to contribute code yourself.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/TimMcCool/scratchattach",
    "name": "scratchattach",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "scratch api, scratchattach, scratch api python, scratch python, scratch for python, scratch, scratch cloud, scratch cloud variables, scratch bot",
    "author": "TimMcCool",
    "author_email": "timmccool.scratch@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/b7/a8/432dafcab9c9c39d8c063de753e1c15442306a64c83cbd6e493e9b1e229f/scratchattach-1.7.3.tar.gz",
    "platform": null,
    "description": "Scratch API wrapper with support for almost all site features. Created by [TimMcCool](https://scratch.mit.edu/users/TimMcCool/).\r\n\r\nThis library can set cloud variables, follow Scratchers, post comments and do so much more! It has special features that make it easy to transmit data through cloud variables.\r\n\r\n<p align=\"left\">\r\n  <img width=\"160\" height=\"133\" src=\"https://github.com/TimMcCool/scratchattach/blob/main/logos/logo_dark_transparent_eyes.svg\">\r\n</p>\r\n\r\n[![PyPI status](https://img.shields.io/pypi/status/scratchattach.svg)](https://pypi.python.org/pypi/scratchattach/)\r\n[![PyPI download month](https://img.shields.io/pypi/dm/scratchattach.svg)](https://pypi.python.org/pypi/scratchattach/)\r\n[![PyPI version shields.io](https://img.shields.io/pypi/v/scratchattach.svg)](https://pypi.python.org/pypi/scratchattach/)\r\n[![GitHub license](https://badgen.net/github/license/TimMcCool/scratchattach)](https://github.com/TimMcCool/scratchattach/blob/master/LICENSE)\r\n[![Documentation Status](https://readthedocs.org/projects/scratchattach/badge/?version=latest)](https://scratchattach.readthedocs.io/en/latest/?badge=latest)\r\n\r\n# Links\r\n\r\n- **[Documentation](https://github.com/TimMcCool/scratchattach/wiki)**\r\n- [Extended documentation (WIP)](https://scratchattach.readthedocs.io/en/latest/)\r\n- [Examples](https://github.com/TimMcCool/scratchattach/wiki/Examples)\r\n- [Change log](https://github.com/TimMcCool/scratchattach/blob/main/CHANGELOG.md)\r\n\r\nReport bugs by opening an issue on this repository. If you need help or guideance, leave a comment in the [official forum topic](https://scratch.mit.edu/discuss/topic/603418/\r\n). Projects made using scratchattach can be added to [this Scratch studio](https://scratch.mit.edu/studios/31478892/).\r\n\r\n# Example usage\r\n\r\n```py\r\nimport scratchattach as scratch3\r\n\r\nsession = scratch3.login(\"username\", \"password\")\r\nconn = session.connect_cloud(\"project_id\")\r\n\r\nconn.set_var(\"variable\", value)\r\n```\r\n\r\n**[More examples](https://github.com/TimMcCool/scratchattach/wiki/Examples)**\r\n\r\n# Getting started\r\n\r\n**Installation:**\r\n\r\nRun the following command in your command prompt / shell:\r\n\r\n```\r\npip install -U scratchattach\r\n```\r\n\r\n**Logging in with username / password:**\r\n\r\n```python\r\nimport scratchattach as scratch3\r\n\r\nsession = scratch3.login(\"username\", \"password\")\r\n```\r\n\r\n`login()` returns a `Session` object that saves your login.\r\n\r\n**Logging in with a sessionId:** *You can get your session id from your browser's cookies. [More information](https://github.com/TimMcCool/scratchattach/wiki/Get-your-session-id)*\r\n```python\r\nimport scratchattach as scratch3\r\n\r\nsession = scratch3.Session(\"sessionId\", username=\"username\") #The username field is case sensitive\r\n```\r\n\r\n**Connect to the Scratch cloud:**\r\n\r\n```python\r\nconn = session.connect_cloud(\"project_id\")\r\n```\r\n\r\n**Get / Set a cloud var:**\r\n\r\n```python\r\nvalue = scratch3.get_var(\"project_id\", \"variable\")\r\nconn.set_var(\"variable\", \"value\") #the variable name is specified without the cloud emoji\r\n```\r\n\r\n**Follow a user / love a project:**\r\n\r\n```python\r\nuser_to_follow = session.connect_user(\"username\")\r\nuser_to_follow.follow()\r\nproject_to_love = session.connect_project(\"project_id\")\r\nproject_to_love.love()\r\n```\r\n\r\n**All scratchattach features are documented in the [documentation](https://github.com/TimMcCool/scratchattach/wiki/#cloud-variables).**\r\n\r\n# Contributors\r\n\r\n- Allmost all code by TimMcCool.\r\n- See the GitHub repository for full list of contributors.\r\n- Create a pull request to contribute code yourself.\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "An Scratch API Wrapper for scratch.mit.edu",
    "version": "1.7.3",
    "project_urls": {
        "Homepage": "https://github.com/TimMcCool/scratchattach"
    },
    "split_keywords": [
        "scratch api",
        " scratchattach",
        " scratch api python",
        " scratch python",
        " scratch for python",
        " scratch",
        " scratch cloud",
        " scratch cloud variables",
        " scratch bot"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9dd7ead069d531515b765f5e1a21c2cb220f565913667ef84b3cb539f0bccf0d",
                "md5": "78f25919651449b5ba05c620145b5164",
                "sha256": "1c7caff3dcdca782a14966eccb327e7227df7703f69f357804be6bfc607fb39b"
            },
            "downloads": -1,
            "filename": "scratchattach-1.7.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "78f25919651449b5ba05c620145b5164",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 39783,
            "upload_time": "2024-05-24T21:37:19",
            "upload_time_iso_8601": "2024-05-24T21:37:19.753452Z",
            "url": "https://files.pythonhosted.org/packages/9d/d7/ead069d531515b765f5e1a21c2cb220f565913667ef84b3cb539f0bccf0d/scratchattach-1.7.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b7a8432dafcab9c9c39d8c063de753e1c15442306a64c83cbd6e493e9b1e229f",
                "md5": "de31e26de26a4e2d336558f0fbea1c48",
                "sha256": "6f187f4d6b1e692f825718cf8184e10675d11c8a73ebf774a19427eb26bce12c"
            },
            "downloads": -1,
            "filename": "scratchattach-1.7.3.tar.gz",
            "has_sig": false,
            "md5_digest": "de31e26de26a4e2d336558f0fbea1c48",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 34458,
            "upload_time": "2024-05-24T21:37:24",
            "upload_time_iso_8601": "2024-05-24T21:37:24.399766Z",
            "url": "https://files.pythonhosted.org/packages/b7/a8/432dafcab9c9c39d8c063de753e1c15442306a64c83cbd6e493e9b1e229f/scratchattach-1.7.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-24 21:37:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "TimMcCool",
    "github_project": "scratchattach",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "scratchattach"
}
        
Elapsed time: 0.29132s