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.

Source Distribution

win10batteryoptimizer-0.1.1.zip (5.0 kB view hashes)

Uploaded Source

Supported by

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