{"id":615,"date":"2022-09-09T11:41:49","date_gmt":"2022-09-09T10:41:49","guid":{"rendered":"https:\/\/amasan.co.uk\/vandragt\/?p=615"},"modified":"2022-09-09T11:41:50","modified_gmt":"2022-09-09T10:41:50","slug":"using-python-best-practices","status":"publish","type":"post","link":"https:\/\/2022.vandragt.com\/technology\/using-python-best-practices\/","title":{"rendered":"Using python &#8211; best practices"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">This is how I do it:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Manage python versions with <code>pyenv<\/code>. Modern python comes with <code>pip<\/code> already installed. <\/li><li>Don&#8217;t touch system python if you have it, in terms of installing packages, updating it etc. <\/li><li>For projects, use virtual environments using one of the python version installed with step 1. I prefer <code>poetry<\/code> at the moment to manage them.<\/li><li>Use <code>pipx<\/code> if you want to install a global utility, so it&#8217;s isolated from any projects.<\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Feedback welcome.<\/p>\n<div class=\"syndication-links\"><\/div>","protected":false},"excerpt":{"rendered":"<p>This is how I do it: Manage python versions with pyenv. Modern python comes with pip already installed. Don&#8217;t touch system python if you have it, in terms of installing packages, updating it etc. For projects, use virtual environments using one of the python version installed with step 1. I prefer poetry at the moment [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"mf2_syndication":[],"webmentions_disabled_pings":false,"webmentions_disabled":false,"footnotes":""},"categories":[11],"tags":[59,58,57,56],"class_list":["post-615","post","type-post","status-publish","format-standard","hentry","category-technology","tag-pipx","tag-poetry","tag-pyenv","tag-python"],"_links":{"self":[{"href":"https:\/\/amasan.co.uk\/vandragt\/wp-json\/wp\/v2\/posts\/615","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/amasan.co.uk\/vandragt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/amasan.co.uk\/vandragt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/amasan.co.uk\/vandragt\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/amasan.co.uk\/vandragt\/wp-json\/wp\/v2\/comments?post=615"}],"version-history":[{"count":1,"href":"https:\/\/amasan.co.uk\/vandragt\/wp-json\/wp\/v2\/posts\/615\/revisions"}],"predecessor-version":[{"id":616,"href":"https:\/\/amasan.co.uk\/vandragt\/wp-json\/wp\/v2\/posts\/615\/revisions\/616"}],"wp:attachment":[{"href":"https:\/\/amasan.co.uk\/vandragt\/wp-json\/wp\/v2\/media?parent=615"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/amasan.co.uk\/vandragt\/wp-json\/wp\/v2\/categories?post=615"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/amasan.co.uk\/vandragt\/wp-json\/wp\/v2\/tags?post=615"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}