Skip to main content

🐍 Soothing pastel theme for Python.

Project description

Logo
Catppuccin for Python

Installation

Install with pip or your preferred dependency management tool.

pip install catppuccin

Usage

>>> from catppuccin import Flavour
>>> Flavour.latte().mauve.hex
'8839ef'
>>> Flavour.mocha().teal.rgb
(148, 226, 213)

Flavour is a dataclass, so you can inspect its fields to get access to the full set of colour names and values:

>>> from dataclasses import fields
>>> flavour = Flavour.frappe()
>>> for field in fields(flavour):
        colour = getattr(flavour, field.name)
        print(f"{field.name}: #{colour.hex}")
rosewater: #f2d5cf
flamingo: #eebebe
pink: #f4b8e4
...
base: #303446
mantle: #292c3c
crust: #232634

Pygments Styles

This package provides a Pygments style for each of the four Catppuccin flavours.

Install Catppuccin with the pygments feature to include the relevant dependencies:

pip install catppuccin[pygments]

The styles are registered as importlib entrypoints, which allows Pygments to find them by name:

>>> from pygments.styles import get_style_by_name
>>> get_style_by_name("catppuccin-frappe")
catppuccin.extras.pygments.FrappeStyle

The following style names are available:

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

They can also be accessed by directly importing them:

from catppuccin.extras.pygments import MacchiatoStyle

Contribution

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

Development

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

Install the project's dependencies including extras:

poetry install -E pygments

Code Standards

Before committing changes, it is recommended to run the following tools to ensure consistency in the codebase.

isort .
black .
pylint catppuccin
mypy .
pytest --cov catppuccin

These tools are all installed as part of the dev dependency group with Poetry. You can use poetry shell to automatically put these tools in your path.

💝 Thanks to

 

Copyright © 2022-present Catppuccin Org

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

catppuccin-1.2.0.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

catppuccin-1.2.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file catppuccin-1.2.0.tar.gz.

File metadata

  • Download URL: catppuccin-1.2.0.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.11.3 Linux/5.15.0-1035-azure

File hashes

Hashes for catppuccin-1.2.0.tar.gz
Algorithm Hash digest
SHA256 85436de911e7b50cda9835f549d841cd28f7a51ff1c5bea5a70cef627ab0388a
MD5 1b8aa9ff29758abcc3a054ad598400c3
BLAKE2b-256 4b52d01bbbaa56d10f36c500e19ad566d0f162fded567609e7ca06896e5ea58e

See more details on using hashes here.

File details

Details for the file catppuccin-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: catppuccin-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.11.3 Linux/5.15.0-1035-azure

File hashes

Hashes for catppuccin-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4549e0450da82cec563491c37eb1c073446272e378d613f4d8d25750df4af5d5
MD5 58fcd2a4fc93ca43f3af3a230fd2c84b
BLAKE2b-256 e6211c8fcda8f8f14ff9e06ff57999b10fc73ec0a911cce5cf1dfe77a58f2acf

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