Skip to main content

Better Battery Report for Windows

Project description

BBRPY logo

✨ Better Battery Report: A Python CLI tool that generates enhanced battery reports for Windows systems ✨

Code Quality Release codecov PyPI Latest Release PyPI Downloads versions


📋 Features

  • Display basic battery information
  • Generate battery health reports with interactive visualizations
  • Export reports as HTML files with Plotly graphs
  • Track battery capacity changes over time

📦 Installation

Since this is a CLI application, it's recommended to run it using uvx:

uvx bbrpy

[!IMPORTANT] This will only install the essential dependencies for running the tool, making it lightweight and portable. For extended use, it may be necessary to install extra dependency groups as well.

It can also be installed into a persistent environment and added to the PATH:

uv tool install bbrpy

Alternatively, you can install it globally using pip:

pip install bbrpy

💻 Usage

The tool provides two main commands:

Display Battery Information

bbrpy info

This command shows basic battery information including:

  • Report scan time
  • Capacity Status (current / design)

Generate Battery Report

bbrpy report [--output PATH] [--format FORMAT]

Options:

  • --output, -o: Specify the output path for the report (default: "./reports/battery_report")
  • --format, -f: Report format: 'custom' (interactive html), 'standard' (Windows html), or 'raw' (xml data) (default: "custom")

This command:

  1. Generates a battery report using powercfg
  2. Creates a report in the specified format:
    • custom: Interactive visualization of battery capacity history with Plotly
    • standard: Default Windows HTML battery report
    • raw: XML data used for parsing
  3. Opens HTML reports in your default web browser automatically

📘 Requirements

  • Windows operating system
  • Python 3.12 or higher
  • Administrative privileges (for powercfg command)

⚙️ Technical Details

  • powercfg Windows command-line tool for battery data
  • pydantic_xml for the default report serialization
  • plotly for interactive visualizations
  • pandas for data processing
  • typer for CLI interface

©️ License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bbrpy-0.3.5.tar.gz (324.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bbrpy-0.3.5-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file bbrpy-0.3.5.tar.gz.

File metadata

  • Download URL: bbrpy-0.3.5.tar.gz
  • Upload date:
  • Size: 324.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.7.10

File hashes

Hashes for bbrpy-0.3.5.tar.gz
Algorithm Hash digest
SHA256 93c3f8f54fd0ee01102983710be7ff49a34621b2ea30246d1cdddbc0cd710c27
MD5 9f36fb9f5f14e50e25d2069a9232f5dc
BLAKE2b-256 f5887ac808ea631435f9bf396b5d3c11a8452938f562294ebf3b98bafc547705

See more details on using hashes here.

File details

Details for the file bbrpy-0.3.5-py3-none-any.whl.

File metadata

  • Download URL: bbrpy-0.3.5-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.7.10

File hashes

Hashes for bbrpy-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 545d3fab3cad3a94d436d6d641b15017c3453b06e6524dc6321876ff5274ede9
MD5 1cb811e8b9c6f1f05123198463643c7f
BLAKE2b-256 b0ca22f4b09efb9f544647bd87d49fd331917430605376a7e556453a459fabd5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page