{"id":408,"date":"2014-08-26T10:24:51","date_gmt":"2014-08-26T15:24:51","guid":{"rendered":"http:\/\/muthii.com\/blog\/?p=408"},"modified":"2014-08-26T10:24:51","modified_gmt":"2014-08-26T15:24:51","slug":"love-oop-python","status":"publish","type":"post","link":"https:\/\/muthii.com\/blog\/?p=408","title":{"rendered":"Love OOP Python"},"content":{"rendered":"<p>Python makes it easy to automate manual tasks. Over time I have accumulated some scripts each for a different task  but not sharing any code between them but having some similar logic, basically a few of them were having duplicate logic. So this week as I was adding another script to download and add the latest plex media server to my local repo, I came over an article about OOP python on Stackoverflow.<br \/>\nAfter creating a class for all the common logic in my scripts I was able to reduce the size of most of them by over half, I make my living writing OOP code for java but OOP for python was new to me. I wish there was OOP for bash \ud83d\ude42 I have a bunch of bash scripts that need culling. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Python makes it easy to automate manual tasks. Over time I have accumulated some scripts each for a different task but not sharing any code between them but having some similar logic, basically a few of them were having duplicate logic. So this week as I was adding another script to download and add the &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/muthii.com\/blog\/?p=408\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Love OOP Python&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[102,83,46],"tags":[],"_links":{"self":[{"href":"https:\/\/muthii.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/408"}],"collection":[{"href":"https:\/\/muthii.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/muthii.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/muthii.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/muthii.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=408"}],"version-history":[{"count":2,"href":"https:\/\/muthii.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/408\/revisions"}],"predecessor-version":[{"id":411,"href":"https:\/\/muthii.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/408\/revisions\/411"}],"wp:attachment":[{"href":"https:\/\/muthii.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=408"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/muthii.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=408"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/muthii.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=408"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}