BatteryPy
Cross-platform battery information tool built with pure Python. Get detailed battery stats on Windows, Linux, and macOS with zero dependencies.
Why BatteryPy?
Cross-Platform
Works seamlessly on Windows, Linux, and macOS without any platform-specific dependencies or installations.
Pure Python
Built entirely with Python standard library. No external dependencies, no complex installations, just pure Python goodness.
Lightning Fast
Optimized for performance with minimal memory footprint. Get battery information in milliseconds, not seconds.
Detailed Info
Get comprehensive battery data including charge level, health status, time remaining, and power source information.
Easy Integration
Simple API design makes it effortless to integrate into your existing Python projects and applications.
Open Source
Completely open source and free to use. Contribute, modify, and distribute according to your needs.
Quick Installation
pip install batterypy
# Or clone from GitHub
git clone https://github.com/yourusername/batterypy.git
cd batterypy
python setup.py install
Basic Usage
# Check if running on battery
if batterypy.is_battery():
print("Running on battery power!")
# Get detailed battery information
info = batterypy.get_info()
print(f"Battery: {info['percentage']}%")
print(f"Status: {info['status']}")