Skip to main content
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

Metadata

Release files for bbrpy 0.3.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bbrpy 0.3.5
File Size Uploaded Provenance
bbrpy-0.3.5.tar.gz 324.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for bbrpy 0.3.5
File Interpreter ABI Platform
bbrpy-0.3.5-py3-none-any.whl Python 3 none any Details

Total release size: 334.5 kB

Release files / bbrpy-0.3.5.tar.gz

Download URL bbrpy-0.3.5.tar.gz
Size 324.8 kB
Tags Source
SHA-256 checksum
How to use checksums
93c3f8f54fd0ee01102983710be7ff49a34621b2ea30246d1cdddbc0cd710c27
BLAKE2b-256 checksum
How to use checksums
f5887ac808ea631435f9bf396b5d3c11a8452938f562294ebf3b98bafc547705
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.7.10

Release files / bbrpy-0.3.5-py3-none-any.whl

Download URL bbrpy-0.3.5-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
545d3fab3cad3a94d436d6d641b15017c3453b06e6524dc6321876ff5274ede9
BLAKE2b-256 checksum
How to use checksums
b0ca22f4b09efb9f544647bd87d49fd331917430605376a7e556453a459fabd5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.7.10

Security for bbrpy 0.3.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page