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 Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page