BatteryPy is a lightweight, pure-Python library designed for Windows, allowing you to easily and quickly retrieve detailed battery information and status. Whether you're monitoring battery health, charge level, or power source, BatteryPy provides a fast and efficient way to access crucial battery data without relying on external dependencies.
-
Cross-platform (Windows, Linux; macOS support coming soon)
-
Easy & Fast !
-
Provide accurate inforamtions
-
Pure python (No need for external dependencies)
- Clone the repo :
git clone https://github.com/aymenbrahimdjelloul/BatteryPy.git
- Navigate to the project folder :
cd BatteryPy - Run it :
python3 run.py
pip install batterypy# First import the Battery class object from the BatteryPy module
from batterypy import Battery
# Create battery class object
battery = Battery()
# Print out the battery percentage
print(battery.battery_percentage)We would like to extend our sincere gratitude to the following:
- The Python community for creating such an incredible and versatile language.
- The open-source contributors whose tools and libraries inspired this project.
- All the users and testers who provided invaluable feedback and suggestions to make BatteryPy better.
- GitHub for providing a platform for collaboration and sharing this project with the world.
Your support and contributions help make open-source development a thriving and rewarding experience!
MIT License
Copyright (c) 2023-2025 Aymen Brahim Djelloul
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

