Skip to content

🐍 Soothing pastel library for Python & Matplotlib

License

Notifications You must be signed in to change notification settings

catppuccin/python

Repository files navigation

Logo
Catppuccin for Python

Installation

Install with pip or your preferred dependency management tool.

pip install catppuccin

Documentation

For an API reference and usage examples, see our online documentation.

IPython Theme

A minimal configuration:

c.TerminalInteractiveShell.true_color = True
c.TerminalInteractiveShell.highlighting_style = "catppuccin-mocha"

Putting this into your IPython configuration and ensuring catppuccin[pygments] is installed in the same environment will give you Catppuccin Mocha syntax highlighting in the REPL. See here for an example of a more complete configuration.

Available IPython themes:

  • catppuccin-latte
  • catppuccin-frappe
  • catppuccin-macchiato
  • catppuccin-mocha

Contribution

If you are looking to contribute, please read through our CONTRIBUTING.md first!

Development

This project is maintained with uv. If you don't have uv yet, you can install it using the installation instructions.

Install the project's dependencies including extras:

uv sync --all-extras

Codegen

catppuccin/palette.py is generated by a build script based on the contents of palette.json.

To update after downloading a new palette JSON file:

uv run build.py

Formatting this file is done manually as with any other file, see Code Standards below.

Code Standards

All of the tools listed in this section are automatically installed by uv as part of the dev dependency group.

Unit Tests

Tests are run with pytest.

To run tests and display coverage:

pytest --cov catppuccin
Type Checking

Type checking is performed by mypy.

To run type checks:

mypy .
Lints and Formatting

Code linting and formatting is done by ruff.

To lint the code:

ruff check

To format the code:

ruff format

πŸ’ Thanks to

 

Copyright Β© 2022-present Catppuccin Org