kitcat


Namekitcat JSON
Version 1.2.1 PyPI version JSON
download
home_pageNone
SummaryMatplotlib backend for direct plotting in the terminal using Kitty graphics protocol.
upload_time2024-12-26 15:01:40
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT License Copyright (c) 2024 Milad Alizadeh Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords kitty matplotlib
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # kitcat

This project introduces a new `kitcat` backend for Matplotlib that allows plots to be displayed directly in the terminal. It utilizes the "agg" backend for rendering plots before sending them to the terminal.

- Direct Matplotlib plotting in terminal emulators that support [Kitty](https://sw.kovidgoyal.net/kitty/graphics-protocol/) or [iTerm2](https://iterm2.com/documentation-images.html) graphics protocols.
- Works seamlessly over SSH.

<p float="left">
  <img src="https://raw.githubusercontent.com/mil-ad/kitcat/main/demo1.gif" width="45%" />
  <img src="https://raw.githubusercontent.com/mil-ad/kitcat/main/demo2.gif" width="45%" />
</p>

## Terminal Emulator Support

Not all terminal emulators support Kitty or iTerm2 graphics protocols. I haven't done extensive testing, so please let me know if you find other emulators that are compatible, and I will update the list accordingly.

| Terminal Emulator    | Supported | Notes                                                |
| -------------------- | --------- | ---------------------------------------------------- |
| Kitty                | ✅        |                                                      |
| iTerm2               | ✅        |                                                      |
| VSCode               | ✅        | Requires `terminal.integrated.enableImages` in settings |
| WezTerm              | ✅        |                                                      |
| tmux                 | ✅        | Requires `allow-passthrough on` in tmux config       |
| Zellij               | ❌        |                                                      |
| Alacritty            | ❌        |                                                      |
| Warp                 | ❌        |                                                      |
| Terminal.app (macOS) | ❌        |                                                      |
| wayst                | ✅        |                                                      |


## Installation

```
pip install kitcat
```

## Usage

Select `kitcat` backend after importing matplotlib:

```py
import matplotlib
matplotlib.use("kitcat")
```

## Acknowledgements

I discovered [matplotlib-backend-kitty](https://github.com/jktr/matplotlib-backend-kitty) repository, which provides similar functionality in Kitty. I aimed to create a simpler solution that works across any terminal supporting the protocol.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "kitcat",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "kitty, matplotlib",
    "author": null,
    "author_email": "Milad Alizadeh <git@mil.ad>",
    "download_url": "https://files.pythonhosted.org/packages/f9/ab/adfda6eb04e2bfa973aa80f9d9fc5ce1a97f5c72bc39818ffafec2fe3770/kitcat-1.2.1.tar.gz",
    "platform": null,
    "description": "# kitcat\n\nThis project introduces a new `kitcat` backend for Matplotlib that allows plots to be displayed directly in the terminal. It utilizes the \"agg\" backend for rendering plots before sending them to the terminal.\n\n- Direct Matplotlib plotting in terminal emulators that support [Kitty](https://sw.kovidgoyal.net/kitty/graphics-protocol/) or [iTerm2](https://iterm2.com/documentation-images.html) graphics protocols.\n- Works seamlessly over SSH.\n\n<p float=\"left\">\n  <img src=\"https://raw.githubusercontent.com/mil-ad/kitcat/main/demo1.gif\" width=\"45%\" />\n  <img src=\"https://raw.githubusercontent.com/mil-ad/kitcat/main/demo2.gif\" width=\"45%\" />\n</p>\n\n## Terminal Emulator Support\n\nNot all terminal emulators support Kitty or iTerm2 graphics protocols. I haven't done extensive testing, so please let me know if you find other emulators that are compatible, and I will update the list accordingly.\n\n| Terminal Emulator    | Supported | Notes                                                |\n| -------------------- | --------- | ---------------------------------------------------- |\n| Kitty                | \u2705        |                                                      |\n| iTerm2               | \u2705        |                                                      |\n| VSCode               | \u2705        | Requires `terminal.integrated.enableImages` in settings |\n| WezTerm              | \u2705        |                                                      |\n| tmux                 | \u2705        | Requires `allow-passthrough on` in tmux config       |\n| Zellij               | \u274c        |                                                      |\n| Alacritty            | \u274c        |                                                      |\n| Warp                 | \u274c        |                                                      |\n| Terminal.app (macOS) | \u274c        |                                                      |\n| wayst                | \u2705        |                                                      |\n\n\n## Installation\n\n```\npip install kitcat\n```\n\n## Usage\n\nSelect `kitcat` backend after importing matplotlib:\n\n```py\nimport matplotlib\nmatplotlib.use(\"kitcat\")\n```\n\n## Acknowledgements\n\nI discovered [matplotlib-backend-kitty](https://github.com/jktr/matplotlib-backend-kitty) repository, which provides similar functionality in Kitty. I aimed to create a simpler solution that works across any terminal supporting the protocol.\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 Milad Alizadeh  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "Matplotlib backend for direct plotting in the terminal using Kitty graphics protocol.",
    "version": "1.2.1",
    "project_urls": {
        "Issues": "https://github.com/mil-ad/kitcat/issues",
        "Repository": "https://github.com/mil-ad/kitcat.git"
    },
    "split_keywords": [
        "kitty",
        " matplotlib"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "654d9242e87398776ac23f29b2b03128eda36c93c94a66be9a28978fabf1b1d4",
                "md5": "cddcc90b51e8e1d11c006ad3b55c5d84",
                "sha256": "0620ff2c112040a833a04c52b674e342184b2f17676131f096a3198d7040620c"
            },
            "downloads": -1,
            "filename": "kitcat-1.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "cddcc90b51e8e1d11c006ad3b55c5d84",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 5541,
            "upload_time": "2024-12-26T15:01:39",
            "upload_time_iso_8601": "2024-12-26T15:01:39.013670Z",
            "url": "https://files.pythonhosted.org/packages/65/4d/9242e87398776ac23f29b2b03128eda36c93c94a66be9a28978fabf1b1d4/kitcat-1.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f9abadfda6eb04e2bfa973aa80f9d9fc5ce1a97f5c72bc39818ffafec2fe3770",
                "md5": "d29396706006b2a209982c8665a51502",
                "sha256": "6e236f3a002d494531bc3b411fbf19e8c1bfa6af6b8657acdc30efa246e92ec8"
            },
            "downloads": -1,
            "filename": "kitcat-1.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "d29396706006b2a209982c8665a51502",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 3833,
            "upload_time": "2024-12-26T15:01:40",
            "upload_time_iso_8601": "2024-12-26T15:01:40.602030Z",
            "url": "https://files.pythonhosted.org/packages/f9/ab/adfda6eb04e2bfa973aa80f9d9fc5ce1a97f5c72bc39818ffafec2fe3770/kitcat-1.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-26 15:01:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mil-ad",
    "github_project": "kitcat",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "kitcat"
}
        
Elapsed time: 0.39448s