{"id":62691,"date":"2022-03-02T09:02:30","date_gmt":"2022-03-02T09:02:30","guid":{"rendered":"https:\/\/www.cryptocabaret.com\/?p=62691"},"modified":"2022-03-02T09:02:30","modified_gmt":"2022-03-02T09:02:30","slug":"how-to-use-httpx-a-web-client-for-python","status":"publish","type":"post","link":"https:\/\/www.cryptocabaret.com\/?p=62691","title":{"rendered":"How to use httpx, a web client for Python"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" typeof=\"foaf:Image\" src=\"https:\/\/www.cryptocabaret.com\/wp-content\/uploads\/2022\/03\/browser_web_internet_website.png\" width=\"1040\" height=\"584\" alt=\"Digital creative of a browser on the internet\" title=\"Digital creative of a browser on the internet\"><\/p>\n<p>The <code>httpx<\/code>\u00a0package for Python is a sophisticated web client. Once you install it, you can use it to get data from websites. As usual, the easiest way to install it is with the <code>pip<\/code>\u00a0utility:<\/p>\n<pre><span class=\"geshifilter\"><code class=\"bash geshifilter-bash\"><span class=\"co4\">$ <\/span>python <span class=\"re5\">-m<\/span> pip <span class=\"kw2\">install<\/span> httpx <span class=\"re5\">--user<\/span><\/code><\/span><\/pre>\n<p>To use it, import it into a Python script, and then use the <code>.get<\/code>\u00a0function to fetch data from a web address:<\/p>\n<p><a href=\"https:\/\/opensource.com\/article\/22\/3\/python-httpx\">read more<\/a><\/p>\n<p class=\"wpematico_credit\"><small>Powered by <a href=\"http:\/\/www.wpematico.com\" target=\"_blank\" rel=\"noopener\">WPeMatico<\/a><\/small><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The httpx\u00a0package for Python is a sophisticated web client. Once you install it, you can use it to get data from websites. As usual, the easiest way to install it is with the pip\u00a0utility: $ python -m pip install httpx &#8211;user To use it, import it into a Python script, and then use the .get\u00a0function [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":62692,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[307],"tags":[],"class_list":["post-62691","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-open-source"],"_links":{"self":[{"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/posts\/62691","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=62691"}],"version-history":[{"count":0,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/posts\/62691\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=\/wp\/v2\/media\/62692"}],"wp:attachment":[{"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=62691"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=62691"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cryptocabaret.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=62691"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}