Skip to content

LilaShiba/python_packages

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

51 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ•βœ¨ CLI Tools Suite πŸ§™β€β™€οΈ

A modular command-line toolkit for device control, data retrieval, and network operations β€” built in Python 3.13+.


Overview

This suite provides a unified command interface for interacting with APIs, connected devices, and local systems.
Each command lives in its own module under cmds/, while shared functionality (like networking, environment setup, and I/O) resides in utils/.


Command Modules

Command Description
wut Dictionary and internal command reference utilities. 🐾
nyc MTA bus & train tracker
weather NOAA weather updates & predictions ✨
sky NASA astronomical object feed and space event info. 🌟
lights Govee smart light controller with preset themes. πŸ§™β€β™€οΈ
scan Local network IP discovery and mapping tool. πŸ•
sensors Tricorder-style input manager for connected sensors. πŸ§™β€β™€οΈ

Project Structure

.
β”œβ”€β”€ build/
β”‚   └── lib/
β”‚       β”œβ”€β”€ cmds/
β”‚       └── utils/
β”œβ”€β”€ cmds/
β”‚   β”œβ”€β”€ define.py
β”‚   β”œβ”€β”€ lights.py
β”‚   β”œβ”€β”€ neo.py
β”‚   β”œβ”€β”€ scan_network.py
β”‚   β”œβ”€β”€ sky.py
β”‚   β”œβ”€β”€ weather.py
β”‚   └── ...
β”œβ”€β”€ utils/
β”‚   β”œβ”€β”€ api_gate.py
β”‚   β”œβ”€β”€ localize.py
β”‚   └── rpi_light_switch.py
β”œβ”€β”€ setup.py
└── .env

Key Module: lights.py

The lights module interfaces with the Govee REST API to control smart lights.
It includes caching, preset color themes, and brightness/state management.

Features

  • Device discovery with caching at ~/.cache/govee_devices.json 🐾
  • Power and brightness control
  • Preset color themes (including custom ones like trans, witch, cuddle) ✨
  • Automatic .env key loading and validation πŸ§™β€β™€οΈ

Environment Variables


GOVEE_API_KEY=

Example Usage


# List all cached devices
python -m lights --list

# Turn lights on
python -m lights --state on

# Set brightness to 75%
python -m lights --brightness 75

# Activate a color preset
python -m lights --color witch

Installation


pip install -e .

Development Notes

  • All modules are import-safe and compatible with standalone CLI execution. πŸ•
  • The .env file should be placed one directory above the module root for global use. ✨
  • Cached data is stored under the user’s home directory (~/.cache/). πŸ§™β€β™€οΈ

About

CLI Tools Suite

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages