{"id":41956,"date":"2021-08-24T10:35:36","date_gmt":"2021-08-24T08:35:36","guid":{"rendered":"https:\/\/eiposgrados.com\/?p=41956"},"modified":"2021-10-29T16:09:26","modified_gmt":"2021-10-29T14:09:26","slug":"schedule-a-low-battery-notification-in-windows","status":"publish","type":"post","link":"https:\/\/eiposgrados.com\/eng\/python-blog\/schedule-a-low-battery-notification-in-windows\/","title":{"rendered":"Low battery notification scheduled in Python"},"content":{"rendered":"<p>Today we are going to teach you<strong> schedule a low battery notification in Windows<\/strong>. You will see how simple it is and how little code we will use.<\/p>\n\n\n\n<p>As we have already told you many times, Python is a very simple, clean and full of possibilities language. It is booming and the job offer increases every day. If you want to continue learning, we invite you to discover our <a href=\"https:\/\/eiposgrados.com\/eng\/master-in-python\/\">Master in Advanced Programming in Python for Big Data, Hacking and Machine Learning<\/a><strong>, <\/strong>where in just 12 months you will become a qualified expert with extensive knowledge in Big Data, Hacking and Machine Learning.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Libraries to schedule a low battery notification in Windows<\/h2>\n\n\n\n<p>We will need<strong> several libraries:<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>psutil<\/strong><\/li><\/ol>\n\n\n\n<p><strong>&gt;pip install psutil<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\"><li><strong>pynotifier<\/strong><\/li><\/ol>\n\n\n\n<p><strong>&gt;pip install py-notifier<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\"><li><strong>win10toast<\/strong><\/li><\/ol>\n\n\n\n<p><strong>&gt;pip install win10toast<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">We start creating the notification<\/h2>\n\n\n\n<p>Once we have everything ready, we start creating our notification.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/eiposgrados.com\/wp-content\/uploads\/2021\/08\/notificacion-bateria-baja-programada-en-python-.png\" alt=\"\" class=\"wp-image-41957\" width=\"427\" height=\"418\" title=\"\"><\/figure><\/div>\n\n\n\n<p>We can change the minimum battery percentage from where we want the notification to alert us, simply by changing the value inside the \u201cif\u201d.<\/p>","protected":false},"excerpt":{"rendered":"<p>Let&#039;s see how to schedule a low battery notification in Windows using Python. It is very simple and we will use little code. Go ahead!<\/p>","protected":false},"author":1,"featured_media":51567,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[407],"tags":[],"class_list":["post-41956","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog-python"],"acf":[],"_links":{"self":[{"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/posts\/41956","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/comments?post=41956"}],"version-history":[{"count":0,"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/posts\/41956\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/media\/51567"}],"wp:attachment":[{"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/media?parent=41956"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/categories?post=41956"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eiposgrados.com\/eng\/wp-json\/wp\/v2\/tags?post=41956"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}