Skip to content
  • Live
  • Blog
  • Shop
  • Contact
  • About
  • Instagram
  • YouTube
  • Twitch
  • GitHub
CheerLights

CheerLights

We are all connected.

CheerLights on GitHub, Twitch, and Discord. We are all connected.
  • Learn
  • Build
  • Connect
  • Toggle search form

Official Python Package for the CheerLights API

Posted on November 1, 2024October 28, 2026 By Hans Scharler 1 Comment on Official Python Package for the CheerLights API

We just released an official Python Package for the CheerLights API. Use this package to interact with the CheerLights API hosted at ThingSpeak. This enables users to get the current CheerLights color, retrieve the color history, and perform various color-related utilities. The CheerLights API Python Package is distributed by PyPI, and its code is hosted on GitHub.

CheerLights Python Package on PyPi

Installation

The Python Package for the CheerLights API is easy to install using pip.

pip install cheerlights_api

Usage Examples

To use the CheerLights Python package, import it at the start of your script and use one of the defined methods like get_current_color.

import cheerlights_api

# Get the current color name and hex code
current_color = cheerlights_api.get_current_color()
print(current_color)  # Example: {'color': 'red', 'hex': '#FF0000'}

# Get the current color name
color_name = cheerlights_api.get_current_color_name()
print(color_name)  # Example: 'red'

# Get the current hex code
hex_code = cheerlights_api.get_current_hex()
print(hex_code)  # Example: '#FF0000'

# Get the history of colors
history = cheerlights_api.get_color_history(5)
for entry in history:
    print(f"{entry['timestamp']}: {entry['color']} ({entry['hex']})")

# Convert a color name to hex
hex_code = cheerlights_api.color_name_to_hex('green')
print(hex_code)  # '#00FF00'

# Convert hex code to RGB
rgb = cheerlights_api.hex_to_rgb('#00FF00')
print(rgb)  # (0, 255, 0)

# Check if a color is valid
is_valid = cheerlights_api.is_valid_color('purple')
print(is_valid)  # True

Share this:

  • Share on X (Opens in new window) X
  • Share on Facebook (Opens in new window) Facebook
  • Share on Tumblr (Opens in new window) Tumblr
  • Share on Reddit (Opens in new window) Reddit
  • More
  • Share on Pinterest (Opens in new window) Pinterest
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Email a link to a friend (Opens in new window) Email
  • Print (Opens in new window) Print

Related

Apps, News Tags:api, Python, Python Package

Post navigation

Previous Post: CheerLights JavaScript Widgets
Next Post: Arduino Library for CheerLights

Related Posts

CheerLights Android App Uncategorized
Draw the Latest CheerLights Color With Interactive Python on Trinket Projects
CheerLights API Updates – We Added HEX Color Values! News

Comment (1) on “Official Python Package for the CheerLights API”

  1. Pingback: Python Wrapper for the CheerLights API – CheerLights

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  • Build Your First CheerLights Light with WLED
  • CheerLights Updates: llms.txt and a Refreshed API Reference
  • Flash WLED on an ESP32-C3 and Sync It to CheerLights
  • CheerLights Terminal: The Current Color in ASCII Art
  • CheerLights MCP Server 2.0: Color History, Statistics, and Search

Copyright © 2026 CheerLights.

Powered by PressBook Grid Blogs theme

Loading Comments...