kitcat


Namekitcat JSON
Version 1.2.0 PyPI version JSON
download
home_pageNone
SummaryMatplotlib backend for direct plotting in the terminal using Kitty graphics protocol.
upload_time2024-11-22 12:49:21
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="./demo1.gif" width="45%" />
  <img src="./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               | ✅        | Needs `terminal.integrated.enableImages` in settings |
| WezTerm              | ✅        |                                                      |
| tmux                 | ⏳        |                                                      |
| 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/22/f0/289b3d597e62680c4a7c269537c2d3f71a77b2c8a3f7ac819b4db8cb57d6/kitcat-1.2.0.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=\"./demo1.gif\" width=\"45%\" />\n  <img src=\"./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        | Needs `terminal.integrated.enableImages` in settings |\n| WezTerm              | \u2705        |                                                      |\n| tmux                 | \u23f3        |                                                      |\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.0",
    "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": "e67f9f56ad6d47b98b88573a3144a3e9e059ddaa4a28cdcdd0a6d8aa54e8c76c",
                "md5": "0ab772c7d257f53aee823d53a9753dfc",
                "sha256": "fa8ac2a25c5111c35d266583e9941fc96146f428dcedb4c91b57b1e31b9ae164"
            },
            "downloads": -1,
            "filename": "kitcat-1.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0ab772c7d257f53aee823d53a9753dfc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 5496,
            "upload_time": "2024-11-22T12:49:19",
            "upload_time_iso_8601": "2024-11-22T12:49:19.455242Z",
            "url": "https://files.pythonhosted.org/packages/e6/7f/9f56ad6d47b98b88573a3144a3e9e059ddaa4a28cdcdd0a6d8aa54e8c76c/kitcat-1.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "22f0289b3d597e62680c4a7c269537c2d3f71a77b2c8a3f7ac819b4db8cb57d6",
                "md5": "fbd458994f4d689da18d23904cf4b4c7",
                "sha256": "76700417339ee057678083cb5f33623f94b4da37f9cc131783ccdc0c9d476a37"
            },
            "downloads": -1,
            "filename": "kitcat-1.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "fbd458994f4d689da18d23904cf4b4c7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 3787,
            "upload_time": "2024-11-22T12:49:21",
            "upload_time_iso_8601": "2024-11-22T12:49:21.018361Z",
            "url": "https://files.pythonhosted.org/packages/22/f0/289b3d597e62680c4a7c269537c2d3f71a77b2c8a3f7ac819b4db8cb57d6/kitcat-1.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-22 12:49:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mil-ad",
    "github_project": "kitcat",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "kitcat"
}
        
Elapsed time: 0.49487s