Skip to main content

An easy-to-use Python library for maintaing the optimal battery life for windows 10

Project description

##Battery Optimizer

An easy-to-use Python library for maintaing the optimal battery life for windows 10.


## Installation

```
pip install win10batteryoptimizer
```

## Requirements

### Installation of pywin32
```
pypiwin32
setuptools
time
win10toast
```

## Example

```
from win10batteryoptimizer import Notifier
notifier = Notifier()
battery_percent = notifier.get_battery_level()
battery_line_status = notifier.get_battery_line()
while ((int)(battery_percent>80) and (int)(battery_line_status)):
notifier.create_plug_out_toast()
time.sleep(600)
while ((int)(battery_percent<40) and (int)(battery_line_status)==0):
notifier.create_plug_in_toast()
time.sleep(600)
while ((int)(battery_percent)>39 and (int)(battery_percent)<81):
time.sleep(600)
```

Project details


Download files

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

Files for win10batteryoptimizer, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size win10batteryoptimizer-0.1.1.zip (5.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page