🐍 Soothing pastel theme for Python.
Project description

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-lattecatppuccin-frappecatppuccin-macchiatocatppuccin-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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file catppuccin-1.3.0.tar.gz.
File metadata
- Download URL: catppuccin-1.3.0.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.11.3 Linux/5.15.0-1036-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
771b5e6af110270b73aa82c478788b34ab0e7233234973349ea3ab36ad5ed96d
|
|
| MD5 |
c7f4bace9fb272541d2abdc8885def0c
|
|
| BLAKE2b-256 |
2d756d647bcb23273940d5c9b2f73e7d890f6f3a770c86858c5f903127dd3423
|
File details
Details for the file catppuccin-1.3.0-py3-none-any.whl.
File metadata
- Download URL: catppuccin-1.3.0-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.11.3 Linux/5.15.0-1036-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c488f440313ab4e35142ea46bfe78966eb329fc40fd31bd1e2ef9654797bc647
|
|
| MD5 |
19e1a72e4f0fef7049dd50b4ac6dd72e
|
|
| BLAKE2b-256 |
3e0dc1e832ced0fe6528c577746f87ddfbba6990bdca4e04a6df5aa6bd6adc31
|