ipysketch-lite


Nameipysketch-lite JSON
Version 0.3.1.post1 PyPI version JSON
download
home_pageNone
SummarySimple sketching tool for Jupyter notebooks
upload_time2024-11-11 02:24:10
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseCopyright (c) 2024 Matthew Andre Taylor
keywords jupyter sketch drawing canvas
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ipysketch_lite

A lite sketching utility for python notebooks, no sockets or extra dependencies 🎨

(no extra widget code)

Make sketches right in your notebook then use the sketch in your python code.

Try yourself:

<a href="https://matthewandretaylor.github.io/ipysketch_lite/jupyterlite/lab?path=lite_example.ipynb">
<img alt="jupyterlite badge" src="https://jupyterlite.rtfd.io/en/latest/_static/badge.svg">
</a>

![demo](https://github.com/user-attachments/assets/32504e77-a9d1-43c2-96ff-dc0acff48393)

[![PyPI](https://img.shields.io/pypi/v/ipysketch-lite.svg)](https://pypi.org/project/ipysketch-lite)
[![Docs](https://img.shields.io/badge/Docs-informational?logo=readthedocs&logoColor=white)](https://matthewandretaylor.github.io/ipysketch_lite/docs)

## Quickstart

To get started pip install the extension from [PyPI](https://pypi.org/project/ipysketch-lite)

This can be done using `pip` for jupyter environments

```bash
pip install ipysketch-lite
```

Or using `piplite` if you are using [jupyter lite](https://matthewandretaylor.github.io/ipysketch_lite/jupyterlite/lab?path=lite_example.ipynb)

```py
import piplite
await piplite.install("ipysketch_lite[extra]") # install the package and optionally pillow and numpy for the extra features
```

Start drawing a quick sketch in your notebook like this

```py
from ipysketch_lite import Sketch

sketch = Sketch()
```

Then add a new cell to retrieve the sketch in python

```py
sketch.data # Sketch image data as a base64 encoded string
```

```py
import matplotlib.pyplot as plt

# Plot the sketch image or do image manipulation
plt.imshow(sketch.image)
plt.show()
```

![example sketch](https://github.com/MatthewAndreTaylor/ipysketch_lite/blob/main/sketches/example.png?raw=true)

Sketches get updated in cells after draw updates

This means you can continue your sketch and get the new updated outputs

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ipysketch-lite",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "jupyter, sketch, drawing, canvas",
    "author": null,
    "author_email": "Matthew Taylor <matthew.taylor.andre@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/ed/8a/d2a1b7ee5ded25e7ea52dedf66208cee24e04fd0466cdf90a27490ce8800/ipysketch_lite-0.3.1.post1.tar.gz",
    "platform": null,
    "description": "# ipysketch_lite\n\nA lite sketching utility for python notebooks, no sockets or extra dependencies \ud83c\udfa8\n\n(no extra widget code)\n\nMake sketches right in your notebook then use the sketch in your python code.\n\nTry yourself:\n\n<a href=\"https://matthewandretaylor.github.io/ipysketch_lite/jupyterlite/lab?path=lite_example.ipynb\">\n<img alt=\"jupyterlite badge\" src=\"https://jupyterlite.rtfd.io/en/latest/_static/badge.svg\">\n</a>\n\n![demo](https://github.com/user-attachments/assets/32504e77-a9d1-43c2-96ff-dc0acff48393)\n\n[![PyPI](https://img.shields.io/pypi/v/ipysketch-lite.svg)](https://pypi.org/project/ipysketch-lite)\n[![Docs](https://img.shields.io/badge/Docs-informational?logo=readthedocs&logoColor=white)](https://matthewandretaylor.github.io/ipysketch_lite/docs)\n\n## Quickstart\n\nTo get started pip install the extension from [PyPI](https://pypi.org/project/ipysketch-lite)\n\nThis can be done using `pip` for jupyter environments\n\n```bash\npip install ipysketch-lite\n```\n\nOr using `piplite` if you are using [jupyter lite](https://matthewandretaylor.github.io/ipysketch_lite/jupyterlite/lab?path=lite_example.ipynb)\n\n```py\nimport piplite\nawait piplite.install(\"ipysketch_lite[extra]\") # install the package and optionally pillow and numpy for the extra features\n```\n\nStart drawing a quick sketch in your notebook like this\n\n```py\nfrom ipysketch_lite import Sketch\n\nsketch = Sketch()\n```\n\nThen add a new cell to retrieve the sketch in python\n\n```py\nsketch.data # Sketch image data as a base64 encoded string\n```\n\n```py\nimport matplotlib.pyplot as plt\n\n# Plot the sketch image or do image manipulation\nplt.imshow(sketch.image)\nplt.show()\n```\n\n![example sketch](https://github.com/MatthewAndreTaylor/ipysketch_lite/blob/main/sketches/example.png?raw=true)\n\nSketches get updated in cells after draw updates\n\nThis means you can continue your sketch and get the new updated outputs\n",
    "bugtrack_url": null,
    "license": "Copyright (c) 2024 Matthew Andre Taylor",
    "summary": "Simple sketching tool for Jupyter notebooks",
    "version": "0.3.1.post1",
    "project_urls": {
        "Homepage": "https://github.com/MatthewAndreTaylor/ipysketch_lite"
    },
    "split_keywords": [
        "jupyter",
        " sketch",
        " drawing",
        " canvas"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "820132a0e1cd72f4703337f50b7b3be20b6e9d1a21c1ecbfb3bee15c465eb475",
                "md5": "55058426b430cdb506119c6b9aa35c70",
                "sha256": "e68cb2c446feaec7ae3a3701881a3c4c2d521cd53bc320ba8b2e11f237eaa1b4"
            },
            "downloads": -1,
            "filename": "ipysketch_lite-0.3.1.post1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "55058426b430cdb506119c6b9aa35c70",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 6918,
            "upload_time": "2024-11-11T02:24:08",
            "upload_time_iso_8601": "2024-11-11T02:24:08.317317Z",
            "url": "https://files.pythonhosted.org/packages/82/01/32a0e1cd72f4703337f50b7b3be20b6e9d1a21c1ecbfb3bee15c465eb475/ipysketch_lite-0.3.1.post1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ed8ad2a1b7ee5ded25e7ea52dedf66208cee24e04fd0466cdf90a27490ce8800",
                "md5": "87c7af9ff880170479638d92e487cec0",
                "sha256": "aefe3e782336cad42447db6c104bf0427960fa3eef93524df625d64f4e5db0a6"
            },
            "downloads": -1,
            "filename": "ipysketch_lite-0.3.1.post1.tar.gz",
            "has_sig": false,
            "md5_digest": "87c7af9ff880170479638d92e487cec0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 6547,
            "upload_time": "2024-11-11T02:24:10",
            "upload_time_iso_8601": "2024-11-11T02:24:10.163406Z",
            "url": "https://files.pythonhosted.org/packages/ed/8a/d2a1b7ee5ded25e7ea52dedf66208cee24e04fd0466cdf90a27490ce8800/ipysketch_lite-0.3.1.post1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-11 02:24:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "MatthewAndreTaylor",
    "github_project": "ipysketch_lite",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "ipysketch-lite"
}
        
Elapsed time: 0.71413s