BatteryPy

Cross-platform battery information tool built with pure Python. Get detailed battery stats on Windows, Linux, and macOS with zero dependencies.

BatteryPy Monitor
78%
Status
Discharging
Time Remaining
3h 42m
Health
Good (89%)
Power Source
Battery
Voltage
12.6V
Temperature
32°C

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

# Install via pip
pip install batterypy

# Or clone from GitHub
git clone https://github.com/yourusername/batterypy.git
cd batterypy
python setup.py install

Basic Usage

import batterypy

# 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']}")