{"id":760,"date":"2018-07-24T21:37:12","date_gmt":"2018-07-24T19:37:12","guid":{"rendered":"http:\/\/pythonprogramming.altervista.org\/?p=760"},"modified":"2019-08-17T22:10:57","modified_gmt":"2019-08-17T20:10:57","slug":"python-making-a-video-game","status":"publish","type":"post","link":"https:\/\/pythonprogramming.altervista.org\/python-making-a-video-game\/","title":{"rendered":"Python: let&#8217;s make a game (Pygame zero)"},"content":{"rendered":"<h2>Making a game with pygame zero<\/h2>\n<p><img decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/pygame-zero.readthedocs.io\/en\/stable\/_static\/logo.svg\" alt=\"Logo\" \/><\/p>\n<p><strong>Pygame zero<\/strong> is a very interesting project that allows to use the <a href=\"https:\/\/pythonprogramming.altervista.org\/starting-with-pygame\/\">pygame<\/a> module in an easy way, so that you can concentrate on the logic of the game, instead of a long learning process that may discourage the users from creating a game. It&#8217;s a good tool to introduce to computer logic, I think, through games, but it is also very powerful, as you will check by yourself, looking at the examples of games made with <a href=\"http:\/\/pygame-zero.readthedocs.io\/en\/stable\/introduction.html#creating-a-window\">Pygame zero<\/a>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-927 aligncenter\" src=\"https:\/\/pythonprogramming.altervista.org\/wp-content\/uploads\/2018\/08\/alienwalk.gif\" alt=\"\" width=\"72\" height=\"97\" \/><\/p>\n<p><a href=\"https:\/\/media.readthedocs.org\/pdf\/pygame-zero\/latest\/pygame-zero.pdf\">Instructions<\/a><\/p>\n<p>In this video I will tell you how to start making a game with pygame zero. First you have to install the modules and then with a couple of line you can see something moving on the screen. Really nice way to start learning how to make a videogame.<\/p>\n<h2>How to install pgzero<\/h2>\n<p>To install <strong>pygame zero<\/strong> or pgzero, in the cmd (windows button + r and then &#8216;cmd&#8217;) write:<\/p>\n<pre class=\"lang:default decode:true\">pip install pgzero<\/pre>\n<p><a href=\"https:\/\/pythonprogramming.altervista.org\/wp-content\/uploads\/2018\/07\/pip_pgzero.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2777\" src=\"https:\/\/pythonprogramming.altervista.org\/wp-content\/uploads\/2018\/07\/pip_pgzero.gif\" alt=\"\" width=\"600\" height=\"200\" \/><\/a><\/p>\n<p>This way you will install also pygame and other modules that pgzero uses.<\/p>\n<p>To run the code you have to write:<\/p>\n<pre class=\"lang:default decode:true\">pgzrun intro.py<\/pre>\n<p>where intro.py is the name of the file you created.<\/p>\n<h2>Run the code from Sublime or IDLE<\/h2>\n<p>If you want to start the program from an IDE (or from sublimeRepl) you have to import pgzrun as the first line of code and write at the last line of code pgzrun.go() like in the following example.<\/p>\n<pre class=\"lang:default decode:true \"># this can run using python filename.py\r\n\r\nimport pgzrun\r\nWIDTH = HEIGHT = 300\r\n\r\ndef draw():\r\n\tscreen.clear()\r\n\tscreen.draw.circle((WIDTH\/\/2,HEIGHT\/\/2), 30, 'white')\r\n\r\npgzrun.go()<\/pre>\n<p>There it is&#8230; a circle!<a href=\"https:\/\/pythonprogramming.altervista.org\/wp-content\/uploads\/2018\/07\/circle.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-3018 aligncenter\" src=\"https:\/\/pythonprogramming.altervista.org\/wp-content\/uploads\/2018\/07\/circle.png\" alt=\"\" width=\"302\" height=\"332\" \/><\/a><\/p>\n<p><a href=\"http:\/\/pygame-zero.readthedocs.io\/en\/stable\/introduction.html#creating-a-window\">Pygame zero: how to make a window<\/a> (previous post about this topic)<\/p>\n<h2>Move that circle<\/h2>\n<p>We could make that circle move&#8230; using pygame too, why not? Here&#8217;s the code where we can move the circle moving the mouse&#8230; just a couple of lines and the use of<\/p>\n<ul>\n<li>pygame.mouse.get_pos()\n<ul>\n<li>to get x and y position of the mouse<\/li>\n<li>and the use them to move the center of the circle making it follow the mouse<\/li>\n<\/ul>\n<\/li>\n<li>pygame.mouse.set_visible(False)\n<ul>\n<li>to hide the mouse curso (if you want)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Remember you have to import pygame.<\/p>\n<pre class=\"lang:default decode:true \"># this can run using python filename.py\r\nimport pygame\r\nimport pgzrun\r\nfrom collections import namedtuple\r\nSize = namedtuple(\"Size\", \"x y\")\r\nsize = Size(600,400)\r\ndef update():\r\n\tscreen.clear()\r\n\tpygame.mouse.set_visible(False)\r\n\tx, y = pygame.mouse.get_pos()\r\n\tscreen.draw.circle((x,y), 30, \"yellow\")\r\n\r\npgzrun.go()<\/pre>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/pythonprogramming.altervista.org\/wp-content\/uploads\/2018\/07\/circles.gif\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-3013 aligncenter\" src=\"https:\/\/pythonprogramming.altervista.org\/wp-content\/uploads\/2018\/07\/circles.gif\" alt=\"\" width=\"429\" height=\"308\" \/><\/a><\/p>\n<h2>Video nr. 1: make an alien move<\/h2>\n<p>Let&#8217;s start making a sprite move on the screen<\/p>\n<pre class=\"lang:default decode:true\">import pgzrun\r\n\r\nalien = Actor('alien')\r\nalien.topright = 0, 10\r\n\r\nWIDTH = 500\r\nHEIGHT = alien.height + 20\r\n\r\n\r\ndef draw():\r\n    screen.clear()\r\n    alien.draw()\r\n\r\n\r\ndef update():\r\n    alien.left += 2\r\n    if alien.left &gt; WIDTH:\r\n        alien.right = 0\r\n\r\npgzrun.go()<\/pre>\n<p>&nbsp;<\/p>\n<p><iframe loading=\"lazy\" title=\"Python: making a game with pgzero (1)\" width=\"747\" height=\"560\" src=\"https:\/\/www.youtube.com\/embed\/_Q4S0W-vVCQ?feature=oembed&amp;enablejsapi=1\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<h2>Video nr. 2: recap<\/h2>\n<p>Let&#8217;s recap what we&#8217;ve done.<\/p>\n<p><iframe loading=\"lazy\" title=\"Pygame zero (2)\" width=\"747\" height=\"560\" src=\"https:\/\/www.youtube.com\/embed\/nOBSioUsXLs?feature=oembed&amp;enablejsapi=1\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<h2>Video nr. 3: adding interaction<\/h2>\n<p>When we click on the alien we will get a +1, when we click on the &#8216;space&#8217; we get a -1.<\/p>\n<pre class=\"lang:default decode:true \"># this runs with python filename.py as usual or inside sublime text\r\n\r\nimport pgzrun\r\n\r\nalien = Actor('alien')\r\nalien.topright = 0, 10\r\n\r\nWIDTH = 500\r\nHEIGHT = alien.height + 20\r\n\r\n\r\ndef draw():\r\n    screen.clear()\r\n    alien.draw()\r\n\r\n\r\ndef update():\r\n    alien.left += 2\r\n    if alien.left &gt; WIDTH:\r\n        alien.right = 0\r\n\r\n\r\nscore = 0\r\n\r\n\r\ndef on_mouse_down(pos):\r\n    global score\r\n    if alien.collidepoint(pos):\r\n        score += 1\r\n    else:\r\n        score -= 1\r\n        print(\"Nothing here\")\r\n    print(score)\r\n\r\npgzrun.go()<\/pre>\n<p>&nbsp;<\/p>\n<p><iframe loading=\"lazy\" title=\"Pygame zero (3)\" width=\"747\" height=\"560\" src=\"https:\/\/www.youtube.com\/embed\/doRGkVifQMA?feature=oembed&amp;enablejsapi=1\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<h2>Video nr. 4: adding animation<\/h2>\n<p>We add a an animation when we hit the alien.<\/p>\n<pre class=\"lang:default decode:true \"># runs with: python filename.py\r\n\r\nimport pgzrun\r\n\r\nalien = Actor('alien')\r\nalien.topright = 0, 10\r\n\r\nWIDTH = 500\r\nHEIGHT = alien.height + 20\r\n\r\n\r\ndef draw():\r\n    screen.clear()\r\n    alien.draw()\r\n\r\n\r\ndef update():\r\n    alien.left += 2\r\n    if alien.left &gt; WIDTH:\r\n        alien.right = 0\r\n\r\n\r\nscore = 0\r\n\r\n\r\ndef on_mouse_down(pos):\r\n    global score\r\n    if alien.collidepoint(pos):\r\n        sounds.eep.play()\r\n        alien.image = 'alien_hurt'\r\n        score += 1\r\n    else:\r\n        score -= 1\r\n        print(\"Nothing here\")\r\n    print(score)\r\n\r\npgzrun.go()<\/pre>\n<p>&nbsp;<\/p>\n<p><iframe loading=\"lazy\" title=\"Pygame zero (4)\" width=\"747\" height=\"560\" src=\"https:\/\/www.youtube.com\/embed\/x3D0eSgb4ww?feature=oembed&amp;enablejsapi=1\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<h2>Video nr. 5: perfecting the animation<\/h2>\n<p>Here we make a better animation using the clock&#8230;<\/p>\n<pre class=\"lang:default decode:true \"># python filename.py\r\n\r\nimport pgzrun\r\n\r\nalien = Actor('alien')\r\nalien.topright = 0, 10\r\n\r\nWIDTH = 500\r\nHEIGHT = alien.height + 20\r\n\r\n\r\ndef draw():\r\n    screen.clear()\r\n    alien.draw()\r\n\r\n\r\ndef update():\r\n    alien.left += 2\r\n    if alien.left &gt; WIDTH:\r\n        alien.right = 0\r\n\r\n\r\nscore = 0\r\n\r\n\r\ndef on_mouse_down(pos):\r\n    global score\r\n    if alien.collidepoint(pos):\r\n        set_alien_hit()\r\n        score += 1\r\n        print(score)\r\n    else:\r\n        score -= 1\r\n        print(score)\r\n\r\n\r\ndef set_alien_hit():\r\n    alien.image = 'alien_hurt'\r\n    sounds.eep.play()\r\n    clock.schedule_unique(set_alien_normal, 0.5)\r\n\r\n\r\ndef set_alien_normal():\r\n    alien.image = \"alien\"\r\n\r\npgzrun.go()<\/pre>\n<p>&nbsp;<\/p>\n<p><iframe loading=\"lazy\" title=\"Pygame zero (5)\" width=\"747\" height=\"560\" src=\"https:\/\/www.youtube.com\/embed\/jVK2bXkSQGM?feature=oembed&amp;enablejsapi=1\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<blockquote class=\"wp-embedded-content\" data-secret=\"XPmh0HANYE\"><p><a href=\"https:\/\/pythonprogramming.altervista.org\/pygame-zero-another-example\/\">Pygame zero: another example<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;Pygame zero: another example&#8221; &#8212; python programming\" src=\"https:\/\/pythonprogramming.altervista.org\/pygame-zero-another-example\/embed\/#?secret=VrJAtT4vPS#?secret=XPmh0HANYE\" data-secret=\"XPmh0HANYE\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<h2>The repository of Pygame zero<\/h2>\n<p>If you want to take a look at the code and to many examples of pygame zero go and download the repository here:<\/p>\n<p><a href=\"https:\/\/github.com\/lordmauve\/pgzero\">https:\/\/github.com\/lordmauve\/pgzero<\/a><\/p>\n<h2>An entire videogame with pythonista on the ipad<\/h2>\n<p>You may be interested in making a game with python on the Ipad. Go check this series of posts and videos I made recently (2019).<\/p>\n<p><a href=\"https:\/\/pythonprogramming.altervista.org\/ipad-and-python-make-a-game\/\">Pythonista games<\/a><\/p>\n<p><a href=\"https:\/\/pythonprogramming.altervista.org\/create-a-game-in-pythonista-on-the-ipad-in-40-minutes\/\">More&#8230; on Python games on ipad<\/a><\/p>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=x3mRmpVZ-7U&amp;list=PL_38rYkBIiiXPxs5FbuGo4zZh-WHlnmZg\">My Playlist n.1 on Youtube about Pythonista game on the Ipad<\/a><\/p>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=x3mRmpVZ-7U&amp;list=PL_38rYkBIiiXPxs5FbuGo4zZh-WHlnmZg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1914\" src=\"https:\/\/pythonprogramming.altervista.org\/wp-content\/uploads\/2019\/04\/015.png\" alt=\"\" width=\"291\" height=\"164\" srcset=\"https:\/\/pythonprogramming.altervista.org\/wp-content\/uploads\/2019\/04\/015.png 571w, https:\/\/pythonprogramming.altervista.org\/wp-content\/uploads\/2019\/04\/015-320x180.png 320w\" sizes=\"auto, (max-width: 291px) 100vw, 291px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=g-_sjvQFCqc&amp;list=PL_38rYkBIiiVsPWcNfMyYVg90Bvz9gB9y\">My Playlist n.2 on Youtube about Pythonista game on the Ipad<\/a> (in progress)<\/p>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=g-_sjvQFCqc&amp;list=PL_38rYkBIiiVsPWcNfMyYVg90Bvz9gB9y\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1963\" src=\"https:\/\/pythonprogramming.altervista.org\/wp-content\/uploads\/2019\/05\/cover2.png\" alt=\"\" width=\"288\" height=\"160\" srcset=\"https:\/\/pythonprogramming.altervista.org\/wp-content\/uploads\/2019\/05\/cover2.png 533w, https:\/\/pythonprogramming.altervista.org\/wp-content\/uploads\/2019\/05\/cover2-320x178.png 320w\" sizes=\"auto, (max-width: 288px) 100vw, 288px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=jdUyhVfqnfI&amp;list=PL_38rYkBIiiXwUH0u5d24_rsWLcz0Pgen\">My playlist on last pygame videos<\/a><\/p>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=jdUyhVfqnfI&amp;list=PL_38rYkBIiiXwUH0u5d24_rsWLcz0Pgen\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2859\" src=\"https:\/\/pythonprogramming.altervista.org\/wp-content\/uploads\/2019\/08\/mega1_cover.png\" alt=\"\" width=\"284\" height=\"203\" srcset=\"https:\/\/pythonprogramming.altervista.org\/wp-content\/uploads\/2019\/08\/mega1_cover.png 840w, https:\/\/pythonprogramming.altervista.org\/wp-content\/uploads\/2019\/08\/mega1_cover-320x229.png 320w, https:\/\/pythonprogramming.altervista.org\/wp-content\/uploads\/2019\/08\/mega1_cover-768x549.png 768w, https:\/\/pythonprogramming.altervista.org\/wp-content\/uploads\/2019\/08\/mega1_cover-676x483.png 676w, https:\/\/pythonprogramming.altervista.org\/wp-content\/uploads\/2019\/08\/mega1_cover-321x229.png 321w\" sizes=\"auto, (max-width: 284px) 100vw, 284px\" \/><\/a><\/p>\n\t<script>\r\nvar title = \"Pygame zero\";\r\n\t\tvar links = [\r\n[\"https:\/\/pythonprogramming.altervista.org\/pong-v-1-0-pygame-example\/\",\"Pong v.1.0 (mouse) - Arkanoid beta\"],\r\n['https:\/\/pythonprogramming.altervista.org\/python-making-a-video-game\/', 'Example 1: intro'],\r\n['https:\/\/pythonprogramming.altervista.org\/pygame-zero-another-example\/', 'Example 2: a simple interaction'],\r\n['https:\/\/pythonprogramming.altervista.org\/pygame-zero-3-some-more-funny-games\/', 'Example 3: a simple game'],\r\n['https:\/\/pythonprogramming.altervista.org\/pygame-zero-4-catch-my-fall\/', 'Example 4: Alien Fall'],\r\n['https:\/\/pythonprogramming.altervista.org\/pygame-zero-5-improving-graphic-and-adding-sounds\/', 'Example 5: Alien Fall (2) - graphic and sounds'],\r\n['https:\/\/pythonprogramming.altervista.org\/pygame-zero-lander-by-daniel-pope\/', 'Lander: game 1'],\r\n['https:\/\/pythonprogramming.altervista.org\/pygame-zero-games-examples\/', 'Repository pygame and examples']\r\n];\r\n<\/script>\r\n<script>\r\n\t\r\nif (typeof next2 != \"undefined\"){let next2 = 0;}\r\n\t\r\nnext2 = 0;\r\n\thtml = \"\";\/\/<b style='color:coral;font-size:1.2em'>Other posts about \" + title + \"<\/b><br>\";\r\nfor (address of links) \r\n{\r\n\r\n\tif (next2 == 1){\r\n\t\thtml += \"<div style='background:coral'>\";\r\n\t\thtml += \"Next link => <a href='\" + address[0] + \"'>\" + address[1] + \"<\/a>\";\r\n\t\thtml += \"<\/div><br>\";\r\n\t\tnext2 = 0;\r\n\t}\r\n\tif (address[0] == document.URL) {\r\n\t\tnext2 = 1;\r\n\t}\r\n}\r\n\r\nif (typeof next != \"undefined\") {let next = 0;}\r\nif (typeof addressStart != \"undefined\") {let addressStart = \"\";}\r\nnext = 0;\r\naddressStart = \"<a href='\";\r\nfor (address of links) {\r\n\tif (next == 1){\r\n\t\thtml += \">>>\" + addressStart + address[0] + \"'>\" + address[1] + \"<\/a><br>\";\r\n\t\tnext = 0;\r\n\t}\r\n\telse if (addressStart + address[0] != document.URL)\r\n\t{\r\n\t\thtml += addressStart + address[0] + \"'>\" + address[1] + \"<\/a><br>\";\r\n\t}\r\n\telse\r\n\t{\r\n\t\tnext = 1;\r\n\t\tnext_address = address[0]\r\n\t\tnext_title = address[1]\r\n\t\thtml += \"<span style='color:gray'>\" + address[1] + \"<\/span><br>\";\r\n\t}\r\n\r\n}\r\n\r\n\thtml += `<span style=\"font-size:8px\">Powered by <a href=\"https:\/\/pythonprogramming.altervista.org\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2673\" src=\"https:\/\/pythonprogramming.altervista.org\/wp-content\/uploads\/2019\/06\/altervista2.png\" alt=\"\" width=\"70\" height=\"25\" srcset=\"https:\/\/pythonprogramming.altervista.org\/wp-content\/uploads\/2019\/06\/altervista2.png 156w, https:\/\/pythonprogramming.altervista.org\/wp-content\/uploads\/2019\/06\/altervista2-150x56.png 150w\" sizes=\"auto, (max-width: 70px) 100vw, 70px\" \/>pythonprogramming.altervista.org<\/a><\/span>`\r\n\thtml = \"<div style='background:yellow'>\" + html + \"<\/div>\";\r\n\tdocument.write(html)\r\n<\/script>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"Pygame zero, or how to easily make a videogame with Python pygame and pgz\n<a class=\"moretag\" href=\"https:\/\/pythonprogramming.altervista.org\/python-making-a-video-game\/\"> [...]<\/a>","protected":false},"author":1,"featured_media":761,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[154,191],"tags":[158,193,194,192,4,195],"class_list":["post-760","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-games","category-pygame","tag-games","tag-pgzrun","tag-pygame","tag-pygame-zero","tag-python","tag-videogames"],"avopt_banners_inside_post":true,"avopt_banners_on_page":true,"av_copy_from":"","av_sharing_message":"","av_sharing_allowed":false,"av_sharing_on":{"fb":[],"tw":[]},"av_allow_affiliate_banner":false,"av_allow_affiliate_multi_banner":false,"av_show_affiliation_buy_button":false,"av_post_rating":true,"av_have_post_rating_value":false,"av_is_artificial_intelligence_content":false,"_links":{"self":[{"href":"https:\/\/pythonprogramming.altervista.org\/wp-json\/wp\/v2\/posts\/760","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pythonprogramming.altervista.org\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pythonprogramming.altervista.org\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pythonprogramming.altervista.org\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pythonprogramming.altervista.org\/wp-json\/wp\/v2\/comments?post=760"}],"version-history":[{"count":19,"href":"https:\/\/pythonprogramming.altervista.org\/wp-json\/wp\/v2\/posts\/760\/revisions"}],"predecessor-version":[{"id":3023,"href":"https:\/\/pythonprogramming.altervista.org\/wp-json\/wp\/v2\/posts\/760\/revisions\/3023"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pythonprogramming.altervista.org\/wp-json\/wp\/v2\/media\/761"}],"wp:attachment":[{"href":"https:\/\/pythonprogramming.altervista.org\/wp-json\/wp\/v2\/media?parent=760"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pythonprogramming.altervista.org\/wp-json\/wp\/v2\/categories?post=760"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pythonprogramming.altervista.org\/wp-json\/wp\/v2\/tags?post=760"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}