{"id":11559,"date":"2020-12-31T05:30:18","date_gmt":"2020-12-31T05:30:18","guid":{"rendered":"https:\/\/www.askpython.com\/?p=11559"},"modified":"2026-09-29T16:51:14","modified_gmt":"2026-09-29T16:51:14","slug":"ipaddress-module","status":"publish","type":"post","link":"https:\/\/www.askpython.com\/python-modules\/ipaddress-module","title":{"rendered":"The ipaddress module in Python [ Easy Examples ]"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Hey folks! Today we will learn about the ipaddress module in Python. So without any further ado, let&#8217;s get started. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is an IP Address?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">IP stands for internet protocol. It is used to identify a node on any network. So any device that connects to the internet, needs to possess an IP address. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There are two versions of IP addresses: IPv4 and IPv6. The IPv4 is the one in use at present whereas IPv6 is being adopted by major network providers slowly owing to the shortage of IPv4 addresses compared to the devices on the network. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To learn more about IP addresses, check out the <a href=\"https:\/\/en.wikipedia.org\/wiki\/IP_address\" class=\"rank-math-link\" target=\"_blank\" rel=\"noopener\">Wiki page here<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to use the ipaddress module in Python?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s begin with using the ipaddressmodule now. To set a host address, we use<em> ipaddress.ip_address( )<\/em>. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This function automatically determines which version to be used based on the values passed. It either returns an IPv4 address or an IPv6 address.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. How to create a valid IPv4 Address?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">IPv4 validates values within the range of 0 to 255. Integer that fits into 32 bits represents an octet in the address. An integer packed into bytes object which is of length 4.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport ipaddress\nipaddress.ip_address(&#039;199.138.0.1&#039;)\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Output:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nIPv4Address(&#039;199.138.0.1&#039;)\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">2. How to create a valid IPv6 Address?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">IPv6 validates values from range 0 to ffff. An integer that fits into 128 bits. An integer packed into a byte object which is of length 16.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport ipaddress\nipaddress.ip_address(&#039;2011:cb0::&#039;)\nipaddress.ip_address(&#039;FFFF:9999:2:FDE:257:0:2FAE:112D&#039;)\n\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Output:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nIPv6Address(&#039;2011:cb0::&#039;)\nIPv6Address(&#039;ffff:9999:2:fde:257:0:2fae:112d&#039;)\n\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">Working with IP Addresses in Python using the ipaddress module<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">IP addresses are accompanied by a set of rules. Ranges of IP addresses are assigned different functions. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, 127.0.0.1 is a loopback address assigned to the networking module on your computer. When you send a ping packet to this IP address, you&#8217;re essentially pinging your own computer.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1. Basic IP functions<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s take a look at how we can verify which addresses are loopback, multicast, local links, or reserved using the ipaddress module in Python<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport ipaddress\n\nipa = ipaddress.ip_address(&#039;199.138.0.1&#039;)\nprint(ipa.is_private) # Checks if address is private\nprint(ipa.is_global)  # Checks if address is global\n\n#If address is a loopback address\nprint(ipaddress.ip_address(&quot;127.0.0.1&quot;).is_loopback) \n\n#If address is reserved for multiclass use\nprint(ipaddress.ip_address(&quot;229.100.0.23&quot;).is_multicast) \n\n#If address is reserved for link local usage\nprint(ipaddress.ip_address(&quot;169.254.0.100&quot;).is_link_local)\n\n#True if the address is otherwise IETF reserved.\nprint(ipaddress.ip_address(&quot;240.10.0.1&quot;).is_reserved)\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>Output:<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nFalse\nTrue\nTrue\nTrue\nTrue\nTrue\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">2. Reverse IP Lookups<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The reverse pointer function requests the DNS to resolve the IP address added as an argument here. If the DNS is able to resolve the IP, you&#8217;ll receive an output with the name assigned. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you ping an IP that&#8217;s assigned to a domain name, you&#8217;ll likely get the name of the server on which the domain exists. However this can change depending on the firewall setup.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nipaddress.ip_address(&quot;199.138.0.1&quot;).reverse_pointer\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Output:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n&#039;1.0.138.199.in-addr.arpa&#039;\n<\/pre><\/div>\n\n\n<h1 class=\"wp-block-heading\">Working with IP Networks using the ipaddress module<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">An IPv4Network and IPv6Network can hlep us define and inspect IP network definitions. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We can get IP network in our required format without writing a custom code. <\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><em>Prefix \/&lt;nbits><\/em> denotes the number of high-order bits set in the network mask.<\/li><li>2. A netmask is an IP address with a number of high-order bit set. <\/li><li>3. A hostmask is the logical inverse of the <em>netmask<\/em> and is used in the Cisco access control list.<\/li><\/ol>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nipn = ipaddress.ip_network(&quot;10.0.0.0\/16&quot;)\nprint(ipn.with_prefixlen)\nprint(ipn.with_hostmask)\nprint(ipn.with_netmask)\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"> Output:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n10.0.0.0\/16\n10.0.0.0\/0.0.255.255\n10.0.0.0\/255.255.0.0\n\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">1. Check if an IP address is IPv4 or IPv6<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><em>ipaddress.ip_network( )<\/em> function is used to return the type of network of the address. It confirms if an IP is in the IP4 network or IP6 network.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nimport ipaddress\nipaddress.ip_network(&#039;199.138.0.1&#039;)\nipaddress.ip_network(&#039;FFFF:9999:2:FDE:257:0:2FAE:112D&#039;)\n\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Output:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nIPv4Network(&#039;199.138.0.1\/32&#039;)\nIPv6Network(&#039;ffff:9999:2:fde:257:0:2fae:112d\/128&#039;)\n\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">2. Identify hosts on an IP network<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Hosts are all the IP addresses that belong to a network except the network address and network broadcast address. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>host( )<\/em> returns iterator over useable hosts in the network.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Networks which have mask length of 31, the network address and network broadcast address is also included in the result and Networks which have mask length of 32 return return list of single host address.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nipn= ipaddress.ip_network(&#039;192.0.2.0\/29&#039;)\nlist(ipn.hosts())\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Output:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n&#x5B;IPv4Address(&#039;192.0.2.1&#039;),\n IPv4Address(&#039;192.0.2.2&#039;),\n IPv4Address(&#039;192.0.2.3&#039;),\n IPv4Address(&#039;192.0.2.4&#039;),\n IPv4Address(&#039;192.0.2.5&#039;),\n IPv4Address(&#039;192.0.2.6&#039;)]\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">3. Identifying the broadcast address for networks<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">With broadcast_address, we can request the DNS server to respond with the broadcast address on the network. <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nipn= ipaddress.ip_network(&#039;199.1.8.0\/29&#039;)\nipn.broadcast_address\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Output:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nIPv4Address(&#039;199.1.8.7&#039;)\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">4. Identifying IP network overlaps<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This function tells us that if a network is partly or wholly contained in another network. It returns either true or false.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nipn1 = ipaddress.ip_network(&quot;10.10.1.32\/29&quot;)\nipn2 = ipaddress.ip_network(&quot;10.10.1.32\/27&quot;)\nipn3 = ipaddress.ip_network(&quot;10.10.1.48\/29&quot;)\nprint(ipn1.overlaps(ipn2))\nprint(ipn1.overlaps(ipn3))\nprint(ipn3.overlaps(ipn2))\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Output:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nTrue\nFalse\nTrue\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">5. Subnets on IP networks<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">It returns an <a href=\"https:\/\/www.askpython.com\/python\/built-in-methods\/python-iterator\" class=\"rank-math-link\">iterator<\/a> of network objects. prefixlen_diff is the amount pf prefix length that should be increased, new_prefix is the new prefix of the subnets and is larger than our prefix.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nipn1 = ipaddress.ip_network(&quot;10.10.1.32\/29&quot;)\nprint(list(ipn1.subnets()))\nprint(list(ipn1.subnets(prefixlen_diff=2)))\nprint(list(ipn1.subnets(new_prefix=30))) \n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Output:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n&#x5B;IPv4Network(&#039;10.10.1.32\/30&#039;), IPv4Network(&#039;10.10.1.36\/30&#039;)]\n&#x5B;IPv4Network(&#039;10.10.1.32\/31&#039;), IPv4Network(&#039;10.10.1.34\/31&#039;), IPv4Network(&#039;10.10.1.36\/31&#039;), IPv4Network(&#039;10.10.1.38\/31&#039;)]\n&#x5B;IPv4Network(&#039;10.10.1.32\/30&#039;), IPv4Network(&#039;10.10.1.36\/30&#039;)]\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">6. Creating supernets with the ipaddress module<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Supernets are a combination of one or multiple subnets. You can <a href=\"https:\/\/en.wikipedia.org\/wiki\/Supernetwork\" class=\"rank-math-link\" target=\"_blank\" rel=\"noopener\">learn more about supernets here<\/a>. With the supernet method in the ipaddress module, you can create subnets by specifying the information as required. <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><em>prefixlen_diff<\/em> is the amount our prefix length should be increased by<\/li><li><em>new_prefix<\/em> is the desired new prefix of the subnets which should be larger than our prefix.<\/li><\/ul>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nipnn = ipaddress.ip_network(&quot;172.10.15.160\/29&quot;)\nprint(ipnn.supernet(prefixlen_diff=3))\nprint(ipnn.supernet(new_prefix=20))\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Output:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n172.10.15.128\/26\n172.10.0.0\/20\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">7. Check if an IP network is a supernet\/subnet of another IP network<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Returns true is a network is subnet of the other of if a network is supernet of the other. Returns either true or false.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\na = ipaddress.ip_network(&quot;192.168.1.0\/24&quot;)\nb = ipaddress.ip_network(&quot;192.168.1.128\/30&quot;)\n\nprint(b.subnet_of(a))\nprint(a.supernet_of(b))\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Output:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nTrue\nTrue\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">8. Working with IPv4Interface objects<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Interface objects can be used as keys in dictionaries as they are hashable.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">IPv4Interface inherits all the attributes from IPv4Address as IPv4Interface is the <a href=\"https:\/\/www.askpython.com\/python\/oops\/inheritance-in-python\" class=\"rank-math-link\">subclass<\/a> of IPv4Address. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here, <em>199.167.1.6 <\/em>IP address is in the network<em> 199.167.1.0\/24<\/em><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nfrom ipaddress import IPv4Interface\nifc = IPv4Interface(&quot;199.167.1.6\/24&quot;)\nprint(ifc.ip)\nprint(ifc.network)\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Output:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n199.167.1.6\n199.167.1.0\/24\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">We can represent network interface in prefix notation, as a netmask and as a host mask. <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\ninterface = IPv4Interface(&#039;192.0.2.5\/24&#039;)\nprint(interface.with_prefixlen)\nprint(interface.with_netmask)\nprint(interface.with_hostmask)\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Output:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n192.0.2.5\/24\n192.0.2.5\/255.255.255.0\n192.0.2.5\/0.0.0.255\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">Miscellaneous Operations with IP Addresses<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>You can check how an IP address compares to another<\/strong> with the use of <a href=\"https:\/\/www.askpython.com\/python\/python-comparison-operators\" class=\"rank-math-link\">comparison operators in Python<\/a>. Take a look at the below example.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nipa1=ipaddress.ip_address(&quot;127.0.0.2&quot;)\nipa2=ipaddress.ip_address(&quot;127.0.0.1&quot;)\nprint(ipa1&gt;ipa2)\nprint(ipa1==ipa2)\nprint(ipa1!=ipa2)\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Output:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nTrue\nFalse\nTrue\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>We can add or subtract integers from IP address objects.<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nipa = ipaddress.ip_address(&quot;10.10.1.0&quot;)\nprint( ipa + 9)\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Output:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n10.10.1.9\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\"><strong>Addresses can be converted to strings or integers by using built-in functions <em>str( ) <\/em>and <em>int( ).<\/em><\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nstr(ipaddress.IPv4Address(&#039;199.138.0.1&#039;))\nint(ipaddress.IPv4Address(&#039;192.198.0.1&#039;))\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Output:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n&#039;199.138.0.1&#039;\n3234201601\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">IPv6 addresses are converted into strings without zone ID.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\nstr(ipaddress.IPv6Address(&#039;::8&#039;))\nint(ipaddress.IPv6Address(&#039;::100&#039;))\n<\/pre><\/div>\n\n\n<p class=\"wp-block-paragraph\">Output:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n&#039;::8&#039;\n256\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In this tutorial, we learned about IPv4 and IPv6 address, network, and interface. For more such content, stay tuned. Happy Learning! \ud83d\ude42<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">References<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/docs.python.org\/3\/library\/ipaddress.html#ipaddress.IPv4Network\" class=\"rank-math-link\" target=\"_blank\" rel=\"noopener\">IPAddress Module Official Docs<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hey folks! Today we will learn about the ipaddress module in Python. So without any further ado, let&#8217;s get started. What is an IP Address? IP stands for internet protocol. It is used to identify a node on any network. So any device that connects to the internet, needs to possess an IP address. There [&hellip;]<\/p>\n","protected":false},"author":18,"featured_media":68430,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-11559","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python-modules"],"_links":{"self":[{"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/posts\/11559","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/comments?post=11559"}],"version-history":[{"count":0,"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/posts\/11559\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/media\/68430"}],"wp:attachment":[{"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/media?parent=11559"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/categories?post=11559"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.askpython.com\/wp-json\/wp\/v2\/tags?post=11559"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}