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


Release history Release notifications

This version
History Node

0.1.1

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
win10batteryoptimizer-0.1.1.zip (5.0 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page