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 details)

Uploaded Source

File details

Details for the file win10batteryoptimizer-0.1.1.zip.

File metadata

File hashes

Hashes for win10batteryoptimizer-0.1.1.zip
Algorithm Hash digest
SHA256 fa827ea25c99fdd846885a09d35011e610dcf7f5f7c33760a4b62e26e656c4d9
MD5 423123a5fb7f97b3cc1c7ab551e2e830
BLAKE2b-256 d23c37ada1cc7e1e74dbcbe7b0041bf527ffa7a350d46243d595d6d9bd0505aa

See more details on using hashes here.

Supported by

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