From 7a57bdef1f886d6a583983fb1ef75b800692897e Mon Sep 17 00:00:00 2001 From: Hans Scharler Date: Thu, 31 Oct 2024 15:03:14 -0400 Subject: [PATCH] Update package name --- README.md | 18 +++++++++--------- setup.py | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 666b8fc..82c52ae 100644 --- a/README.md +++ b/README.md @@ -7,40 +7,40 @@ A Python package to interact with the CheerLights API. It allows users to get th You can install the package using pip: ```bash -pip install cheerlights-api +pip install cheerlights_api ``` ## Usage Examples ```python -import cheerlights-api +import cheerlights_api # Get the current color name and hex code -current_color = cheerlights.get_current_color() +current_color = cheerlights_api.get_current_color() print(current_color) # Example: {'color': 'red', 'hex': '#FF0000'} # Get the current color name -color_name = cheerlights.get_current_color_name() +color_name = cheerlights_api.get_current_color_name() print(color_name) # Example: 'red' # Get the current hex code -hex_code = cheerlights.get_current_hex() +hex_code = cheerlights_api.get_current_hex() print(hex_code) # Example: '#FF0000' # Get the history of colors -history = cheerlights.get_color_history(5) +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.color_name_to_hex('green') +hex_code = cheerlights_api.color_name_to_hex('green') print(hex_code) # '#00FF00' # Convert hex code to RGB -rgb = cheerlights.hex_to_rgb('#00FF00') +rgb = cheerlights_api.hex_to_rgb('#00FF00') print(rgb) # (0, 255, 0) # Check if a color is valid -is_valid = cheerlights.is_valid_color('purple') +is_valid = cheerlights_api.is_valid_color('purple') print(is_valid) # True ``` diff --git a/setup.py b/setup.py index 616dc39..727972a 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from setuptools import setup, find_packages setup( - name='cheerlights-api', + name='cheerlights_api', version='0.1.0', description='A Python package to interact with the CheerLights API.', long_description=open('README.md').read(),