Skip to main content

IPython magic command for displaying images in kitty terminal

Project description

ipython-icat

PyPI version

Installation

You can install ipython-icat using pip:

pip install ipython-icat

Requirements

  • Python 3.9+
  • IPython
  • matplotlib
  • Pillow (PIL)
  • kitty terminal

Usage

Loading the Extension

In your IPython session, load the extension:

%load_ext icat

Displaying Matplotlib Plots

To use the kitty backend for matplotlib:

%plt_icat

After running this command, any matplotlib plots you create will be displayed directly in your kitty terminal.

Displaying Images

To display an image file or a PIL Image object:

%icat path/to/your/image.jpg

or

from PIL import Image
img = Image.open('path/to/your/image.jpg')
%icat img

You can also resize the image when displaying:

%icat path/to/your/image.jpg -w 300 -h 200

Features

  • Display matplotlib plots directly in kitty terminal
  • Show PIL Image objects or image files
  • Resize images on display
  • Seamless integration with IPython workflow

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Contact

If you have any questions or feedback, please open an issue on the GitHub repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ipython_icat-0.2.2.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

ipython_icat-0.2.2-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file ipython_icat-0.2.2.tar.gz.

File metadata

  • Download URL: ipython_icat-0.2.2.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for ipython_icat-0.2.2.tar.gz
Algorithm Hash digest
SHA256 1985ce0812de41e91dc1075b81304169c75157233db2a06ccc444ced5fe1a5ab
MD5 f910a813f13a4e6964ba260b02759551
BLAKE2b-256 747a5c3e81e90c638ce602ba322265e1d0311040cf41d9a311a55494f9644141

See more details on using hashes here.

File details

Details for the file ipython_icat-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: ipython_icat-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for ipython_icat-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 86c3b6174af39d191b882400f6a9ebe332c0113ab24e79527e014aca9940875b
MD5 8f6f33a30a44cfaa9237ce3d7fe701ef
BLAKE2b-256 9e6fdbcc09544f7b8b22fb06d85c60ba4506abe1999f54658580374c66c324c5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page