{"id":22547,"date":"2022-08-23T08:24:31","date_gmt":"2022-08-23T08:24:31","guid":{"rendered":"http:\/\/itsourcecode.com\/?p=22547"},"modified":"2025-04-07T07:52:34","modified_gmt":"2025-04-07T07:52:34","slug":"python-tetris-game-with-source-code","status":"publish","type":"post","link":"https:\/\/itsourcecode.com\/free-projects\/pygame\/python-tetris-game-with-source-code\/","title":{"rendered":"How to Create a Tetris Game in Python? Free Source Code"},"content":{"rendered":"\n<p>The <strong>Python Tetris Game<\/strong> is a GUI-based title-matching puzzle game that is very easy to understand and use. Talking about the gameplay it\u2019s all the same as the real one.<\/p>\n\n\n\n<p>The user has to manage the random sequence of Tetriminos. In this <strong>Tetris Game In Python<\/strong> project, I will teach you <strong>How to make a Tetris Game In Python<\/strong>.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-tetris-game-in-python-code-project-information\"><strong>Tetris Game in Python Code: Project Information<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><tbody><tr><td><strong>Project Name:<\/strong><\/td><td><strong>Tetris Python Code<\/strong><\/td><\/tr><tr><td><strong>Language\/s Used:<\/strong><\/td><td>Python (GUI) Based<\/td><\/tr><tr><td><strong>Python version (Recommended):<\/strong><\/td><td>2.x or 3.x<\/td><\/tr><tr><td><strong>Database:<\/strong><\/td><td>None<\/td><\/tr><tr><td><strong>Type:<\/strong><\/td><td>Python App<\/td><\/tr><tr><td><strong>Developer:<\/strong><\/td><td>IT SOURCECODE<\/td><\/tr><tr><td><strong>Updates:<\/strong><\/td><td>0<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\"><strong><em>Tetris Game Code in Python<\/em><\/strong><\/figcaption><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>A <strong>Tetris Game Python<\/strong> player has steps to follow in playing the game, first, the player has to move each one sideways and rotate quarter-turns to form a solid horizontal line without leaving gaps.<\/p>\n\n\n\n<p>It disappears whenever such lines are formed. The user can only enter to next level if they cross the specific number by the game rules.<\/p>\n\n\n\n<p>As the game progresses, the Tetriminos fall faster and faster. <\/p>\n\n\n\n<p>As a result, the game ends when the stack of Tetriminos reaches the top of the field and no new Tetriminos are able to enter.<\/p>\n\n\n\n<p>Anyway, if you want to level up your knowledge in programming especially games in Python, try this new article I\u2019ve made for you <a href=\"https:\/\/itsourcecode.com\/free-projects\/python-projects\/code-for-game-in-python\/\">Code For Game in Python: Python Game Projects With Source Code<\/a>.<\/p>\n\n\n\n<p>This <strong>Tetris Game In Python<\/strong> also includes a downloadable <strong>Tetris Game Source Code In Python<\/strong>, just find the downloadable source code below and click to start downloading.<\/p>\n\n\n\n<p>To start <strong>Creating Tetris In Python<\/strong>, make sure that you have <a href=\"https:\/\/www.jetbrains.com\/pycharm\/download\/#section=windows\">PyCharm<\/a> IDE installed on your computer.<\/p>\n\n\n\n<p>By the way, if you are new to Python programming and don&#8217;t know what Python IDE is and how to use it, I have here a list of the Best Python IDE for Windows, Linux, and Mac OS that will suit you. <\/p>\n\n\n\n<p>I also have here How to Download and Install the <a href=\"https:\/\/itsourcecode.com\/blogs\/how-to-download-and-install-latest-version-of-python-on-windows-2021\/\">Latest Version of Python on Windows<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-how-to-create-a-tetris-game-in-python-a-step-by-step-guide-with-source-code\"><strong>How to create a Tetris Game in Python? A step-by-step Guide with Source Code<\/strong><\/h2>\n\n\n\n<div class=\"schema-how-to wp-block-yoast-how-to-block\"><p class=\"schema-how-to-total-time\"><span class=\"schema-how-to-duration-time-text\">Time needed:&nbsp;<\/span>5 minutes<\/p><p class=\"schema-how-to-description\">These are the <strong>Steps on how to create a <strong>Tetris Game Code in Python<\/strong><\/strong><\/p> <ul class=\"schema-how-to-steps\"><li class=\"schema-how-to-step\" id=\"how-to-step-1597153848617\"><strong class=\"schema-how-to-step-name\">Step 1: Create a project name.<\/strong> <p class=\"schema-how-to-step-text\">First, open <strong>Pycharm IDE<\/strong> and then create a &#8220;<strong>project name<\/strong>&#8221; After creating a project name click the &#8220;<strong>create<\/strong>&#8221; button.<br\/><img decoding=\"async\" src=\"https:\/\/itsourcecode.com\/wp-content\/uploads\/2020\/08\/Tetris-In-Python-Code-Project-Name.png\" alt=\"Tetris In Python Code Project Name\"\/><\/p> <\/li><li class=\"schema-how-to-step\" id=\"how-to-step-1597153984537\"><strong class=\"schema-how-to-step-name\">Step 2: Create a python file.<\/strong> <p class=\"schema-how-to-step-text\">Second, after creating a project name, &#8220;<strong>right-click<\/strong>&#8221; your project name and then click &#8220;<strong>new<\/strong>.&#8221; After that click the &#8220;<strong>python file<\/strong>&#8220;.<br\/><img decoding=\"async\" src=\"https:\/\/itsourcecode.com\/wp-content\/uploads\/2020\/08\/Tetris-In-Python-Code-Python-File.png\" alt=\"Tetris In Python Code Python File\"\/><\/p> <\/li><li class=\"schema-how-to-step\" id=\"how-to-step-1597154004305\"><strong class=\"schema-how-to-step-name\">Step 3: Name your python file.<\/strong> <p class=\"schema-how-to-step-text\">Third, after creating a Python file, Name your Python file after that click &#8220;<strong>enter<\/strong>&#8220;.<br\/><img decoding=\"async\" src=\"https:\/\/itsourcecode.com\/wp-content\/uploads\/2020\/08\/Tetris-In-Python-Code-Python-File-Name.png\" alt=\"Tetris In Python Code Python File Name\"\/><\/p> <\/li><li class=\"schema-how-to-step\" id=\"how-to-step-1597154022333\"><strong class=\"schema-how-to-step-name\">Step 4: The Actual Code.<\/strong> <p class=\"schema-how-to-step-text\">You are free to copy the code given below and download the full source code below.<\/p> <\/li><\/ul><\/div>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-code-explanations\"><strong>Code Explanations<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-1-installation-of-pygame\"><strong>1. Installation of Pygame<\/strong><\/h3>\n\n\n\n<p><strong>Code:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pip install pygame<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-2-importing-pygame\"><strong>2. Importing PyGame<\/strong><\/h3>\n\n\n\n<p><strong>Code:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import pygame<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-3-the-code-given-below-is-for-the-class-game\"><strong>3. The Code Given Below Is For The Class Game<\/strong><\/h3>\n\n\n\n<p><strong>Code:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>    class Game(object):\n    def main(self, screen):\n        clock = pygame.time.Clock()\n\n        self.matris = Matris()\n        \n        screen.blit(construct_nightmare(screen.get_size()), (0,0))\n        \n        matris_border = Surface((MATRIX_WIDTH*BLOCKSIZE+BORDERWIDTH*2, VISIBLE_MATRIX_HEIGHT*BLOCKSIZE+BORDERWIDTH*2))\n        matris_border.fill(BORDERCOLOR)\n        screen.blit(matris_border, (MATRIS_OFFSET,MATRIS_OFFSET))\n        \n        self.redraw()\n\n        while True:\n            try:\n                timepassed = clock.tick(50)\n                if self.matris.update((timepassed \/ 1000.) if not self.matris.paused else 0):\n                    self.redraw()\n            except GameOver:\n                return\n      \n\n    def redraw(self):\n        if not self.matris.paused:\n            self.blit_next_tetromino(self.matris.surface_of_next_tetromino)\n            self.blit_info()\n\n            self.matris.draw_surface()\n\n        pygame.display.flip()\n\n\n    def blit_info(self):\n        textcolor = (255, 255, 255)\n        font = pygame.font.Font(None, 30)\n        width = (WIDTH-(MATRIS_OFFSET+BLOCKSIZE*MATRIX_WIDTH+BORDERWIDTH*2)) - MATRIS_OFFSET*2\n\n        def renderpair(text, val):\n            text = font.render(text, True, textcolor)\n            val = font.render(str(val), True, textcolor)\n\n            surf = Surface((width, text.get_rect().height + BORDERWIDTH*2), pygame.SRCALPHA, 32)\n\n            surf.blit(text, text.get_rect(top=BORDERWIDTH+10, left=BORDERWIDTH+10))\n            surf.blit(val, val.get_rect(top=BORDERWIDTH+10, right=width-(BORDERWIDTH+10)))\n            return surf\n\n        scoresurf = renderpair(\"Score\", self.matris.score)\n        levelsurf = renderpair(\"Level\", self.matris.level)\n        linessurf = renderpair(\"Lines\", self.matris.lines)\n        combosurf = renderpair(\"Combo\", \"x{}\".format(self.matris.combo))\n\n        height = 20 + (levelsurf.get_rect().height + \n                       scoresurf.get_rect().height +\n                       linessurf.get_rect().height + \n                       combosurf.get_rect().height )\n\n        area = Surface((width, height))\n        area.fill(BORDERCOLOR)\n        area.fill(BGCOLOR, Rect(BORDERWIDTH, BORDERWIDTH, width-BORDERWIDTH*2, height-BORDERWIDTH*2))\n\n        area.blit(levelsurf, (0,0))\n        area.blit(scoresurf, (0, levelsurf.get_rect().height))\n        area.blit(linessurf, (0, levelsurf.get_rect().height + scoresurf.get_rect().height))\n        area.blit(combosurf, (0, levelsurf.get_rect().height + scoresurf.get_rect().height + linessurf.get_rect().height))\n\n        screen.blit(area, area.get_rect(bottom=HEIGHT-MATRIS_OFFSET, centerx=TRICKY_CENTERX))\n\n\n    def blit_next_tetromino(self, tetromino_surf):\n        area = Surface((BLOCKSIZE*5, BLOCKSIZE*5))\n        area.fill(BORDERCOLOR)\n        area.fill(BGCOLOR, Rect(BORDERWIDTH, BORDERWIDTH, BLOCKSIZE*5-BORDERWIDTH*2, BLOCKSIZE*5-BORDERWIDTH*2))\n\n        areasize = area.get_size()&#91;0]\n        tetromino_surf_size = tetromino_surf.get_size()&#91;0]\n        # ^^ I'm assuming width and height are the same\n\n        center = areasize\/2 - tetromino_surf_size\/2\n        area.blit(tetromino_surf, (center, center))\n\n        screen.blit(area, area.get_rect(top=MATRIS_OFFSET, centerx=TRICKY_CENTERX))<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Explanation:<\/strong><\/p>\n\n\n\n<p>In this class which is declare the following module:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>main<\/strong> &#8211; The main module of the class <strong>Game<\/strong><\/li>\n\n\n\n<li><strong>redraw<\/strong> &#8211; In this module which is the <strong>draw surface<\/strong><\/li>\n\n\n\n<li><strong>blit_info<\/strong> &#8211; In this module which declares the text color, font, and <strong>width<\/strong><\/li>\n\n\n\n<li><strong>renderpair<\/strong> &#8211; In this module which is displayed the <strong>score<\/strong>,<strong> level<\/strong>, <strong>lines,<\/strong> and combo of the game in the changing process of time.<\/li>\n\n\n\n<li><strong>blit_next_tetromino<\/strong> &#8211; In this module which declares the <strong>size<\/strong> of the surface<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-4-the-code-given-below-is-for-the-class-menu\"><strong>4. The Code Given Below Is For The Class Menu<\/strong><\/h3>\n\n\n\n<p><strong>Code:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Menu(object):\n    running = True\n    def main(self, screen):\n        clock = pygame.time.Clock()\n        menu = kezmenu.KezMenu(\n            &#91;'Play!', lambda: Game().main(screen)],\n            &#91;'Quit', lambda: setattr(self, 'running', False)],\n        )\n        menu.position = (50, 50)\n        menu.enableEffect('enlarge-font-on-focus', font=None, size=60, enlarge_factor=1.2, enlarge_time=0.3)\n        menu.color = (255,255,255)\n        menu.focus_color = (40, 200, 40)\n\n        nightmare = construct_nightmare(screen.get_size())\n        highscoresurf = self.construct_highscoresurf()\n\n        timepassed = clock.tick(30) \/ 1000.\n\n        while self.running:\n            events = pygame.event.get()\n\n            for event in events:\n                if event.type == pygame.QUIT:\n                    exit()\n\n            menu.update(events, timepassed)\n\n            timepassed = clock.tick(30) \/ 1000.\n\n            if timepassed &gt; 1: # A game has most likely been played \n                highscoresurf = self.construct_highscoresurf()\n\n            screen.blit(nightmare, (0,0))\n            screen.blit(highscoresurf, highscoresurf.get_rect(right=WIDTH-50, bottom=HEIGHT-50))\n            menu.draw(screen)\n            pygame.display.flip()\n\n    def construct_highscoresurf(self):\n        font = pygame.font.Font(None, 50)\n        highscore = load_score()\n        text = \"Highscore: {}\".format(highscore)\n        return font.render(text, True, (255,255,255))\n\ndef construct_nightmare(size):\n    surf = Surface(size)\n\n    boxsize = 8\n    bordersize = 1\n    vals = '1235' # only the lower values, for darker colors and greater fear\n    arr = pygame.PixelArray(surf)\n    for x in range(0, len(arr), boxsize):\n        for y in range(0, len(arr&#91;x]), boxsize):\n\n            color = int(''.join(&#91;random.choice(vals) + random.choice(vals) for _ in range(3)]), 16)\n\n            for LX in range(x, x+(boxsize - bordersize)):\n                for LY in range(y, y+(boxsize - bordersize)):\n                    if LX &lt; len(arr) and LY &lt; len(arr&#91;x]):\n                        arr&#91;LX]&#91;LY] = color\n    del arr\n    return surf<\/code><\/pre>\n\n\n\n<p><strong>Explanation:<\/strong><\/p>\n\n\n\n<p>In this class which is declare the following module:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>main<\/strong> &#8211; The main module of the class menu that you see on the first page when you run the game.<\/li>\n\n\n\n<li><strong>construct_highscoresurf<\/strong> &#8211; This module which is declaring the <strong>font<\/strong> design and <b>high scor<\/b>e of the game.<\/li>\n\n\n\n<li><strong>construct_nightmare<\/strong> &#8211; In this module which is declaring the size of the <strong>surface <\/strong>and its conditions.<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-5-the-code-given-below-is-for-the-class-game-over\"><strong>5. The Code Given Below Is For The Class Game Over<\/strong><\/h3>\n\n\n\n<p><strong>Code:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class GameOver(Exception):\n    \"\"\"Exception used for its control flow properties\"\"\"\n\ndef get_sound(filename):\n    return pygame.mixer.Sound(os.path.join(os.path.dirname(__file__), \"resources\", filename))\n\nBGCOLOR = (15, 15, 20)\nBORDERCOLOR = (140, 140, 140)\n\nBLOCKSIZE = 30\nBORDERWIDTH = 10\n\nMATRIS_OFFSET = 20\n\nMATRIX_WIDTH = 10\nMATRIX_HEIGHT = 22\n\nLEFT_MARGIN = 340\n\nWIDTH = MATRIX_WIDTH*BLOCKSIZE + BORDERWIDTH*2 + MATRIS_OFFSET*2 + LEFT_MARGIN\nHEIGHT = (MATRIX_HEIGHT-2)*BLOCKSIZE + BORDERWIDTH*2 + MATRIS_OFFSET*2\n\nTRICKY_CENTERX = WIDTH-(WIDTH-(MATRIS_OFFSET+BLOCKSIZE*MATRIX_WIDTH+BORDERWIDTH*2))\/2\n\nVISIBLE_MATRIX_HEIGHT = MATRIX_HEIGHT - 2<\/code><\/pre>\n\n\n\n<p><strong>Explanation:<\/strong><\/p>\n\n\n\n<p>In this class which is declare the following module:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>get_sound<\/strong> &#8211; This module which is getting the sound when you are already game over.<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-downloadable-source-code\"><strong>Downloadable Source Code<\/strong><\/h2>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"\/\/itsourcecode.com\/wp-content\/uploads\/2020\/08\/Tetris-In-Python-Code-2.zip\"><strong>DOWNLOAD<\/strong><\/a><\/div>\n<\/div>\n\n\n\n<p>I have here the list of&nbsp;<a href=\"https:\/\/itsourcecode.com\/free-projects\/python-projects\/best-python-project-with-source-code-2020\/\">Best Python Projects with Source code free to download for free<\/a>, I hope this can help you a lot.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-summary\"><strong>Summary<\/strong><\/h2>\n\n\n\n<p>The <strong>Tetris In Python Code<\/strong> is written in Python programming language, Python is very smooth to research the syntax emphasizes readability and it is able to reduce time ingesting in developing.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Also, this tutorial is the simplest way for beginners or students to enhance their logical skills in programming. Aside from that, this game project is a way for students or beginners to design and develop games.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-inquiries\"><strong>Inquiries<\/strong><\/h2>\n\n\n\n<p>If you have any questions or suggestions about the<strong> Python Tetris Game with Source Code<\/strong>, please feel free to leave a comment below.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Python Tetris Game is a GUI-based title-matching puzzle game that is very easy to understand and use. Talking about the gameplay it\u2019s all the same as the real one. &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"How to Create a Tetris Game in Python? Free Source Code\" class=\"read-more button\" href=\"https:\/\/itsourcecode.com\/free-projects\/pygame\/python-tetris-game-with-source-code\/#more-22547\" aria-label=\"Read more about How to Create a Tetris Game in Python? Free Source Code\">Read more<\/a><\/p>\n","protected":false},"author":1767,"featured_media":117756,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[60567],"tags":[95061,95062,35254],"class_list":["post-22547","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-pygame","tag-python-tetris","tag-python-tetris-game-with-source-code","tag-tetris-game-code-in-python","resize-featured-image"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.1 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Create a Tetris Game in Python? Free Source Code<\/title>\n<meta name=\"description\" content=\"The Python Tetris Game is a GUI based title matching puzzle game which is very easy to understand and use. also includes free source code.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/itsourcecode.com\/free-projects\/pygame\/python-tetris-game-with-source-code\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Create a Tetris Game in Python? Free Source Code\" \/>\n<meta property=\"og:description\" content=\"The Python Tetris Game is a GUI based title matching puzzle game which is very easy to understand and use. also includes free source code.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/itsourcecode.com\/free-projects\/pygame\/python-tetris-game-with-source-code\/\" \/>\n<meta property=\"og:site_name\" content=\"Itsourcecode.com\" \/>\n<meta property=\"article:published_time\" content=\"2022-08-23T08:24:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-07T07:52:34+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/08\/Tetris-In-Python-with-Source-Code.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"675\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"angel jude suarez\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"angel jude suarez\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/pygame\\\/python-tetris-game-with-source-code\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/pygame\\\/python-tetris-game-with-source-code\\\/\"},\"author\":{\"name\":\"angel jude suarez\",\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/#\\\/schema\\\/person\\\/dafb6a91b43e60537c56e3e1d227d460\"},\"headline\":\"How to Create a Tetris Game in Python? Free Source Code\",\"datePublished\":\"2022-08-23T08:24:31+00:00\",\"dateModified\":\"2025-04-07T07:52:34+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/pygame\\\/python-tetris-game-with-source-code\\\/\"},\"wordCount\":793,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/#\\\/schema\\\/person\\\/ad9e0497e03b85a9ca299d935298f5dc\"},\"image\":{\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/pygame\\\/python-tetris-game-with-source-code\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/itsourcecode.com\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/Tetris-In-Python-with-Source-Code.png\",\"keywords\":[\"python tetris\",\"python tetris game with source code\",\"tetris game code in python\"],\"articleSection\":[\"Pygame Projects\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/pygame\\\/python-tetris-game-with-source-code\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/pygame\\\/python-tetris-game-with-source-code\\\/\",\"url\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/pygame\\\/python-tetris-game-with-source-code\\\/\",\"name\":\"How to Create a Tetris Game in Python? Free Source Code\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/pygame\\\/python-tetris-game-with-source-code\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/pygame\\\/python-tetris-game-with-source-code\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/itsourcecode.com\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/Tetris-In-Python-with-Source-Code.png\",\"datePublished\":\"2022-08-23T08:24:31+00:00\",\"dateModified\":\"2025-04-07T07:52:34+00:00\",\"description\":\"The Python Tetris Game is a GUI based title matching puzzle game which is very easy to understand and use. also includes free source code.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/pygame\\\/python-tetris-game-with-source-code\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/pygame\\\/python-tetris-game-with-source-code\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/pygame\\\/python-tetris-game-with-source-code\\\/#primaryimage\",\"url\":\"https:\\\/\\\/itsourcecode.com\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/Tetris-In-Python-with-Source-Code.png\",\"contentUrl\":\"https:\\\/\\\/itsourcecode.com\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/Tetris-In-Python-with-Source-Code.png\",\"width\":1200,\"height\":675,\"caption\":\"Tetris In Python with Source Code\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/pygame\\\/python-tetris-game-with-source-code\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/itsourcecode.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Create a Tetris Game in Python? Free Source Code\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/#website\",\"url\":\"https:\\\/\\\/itsourcecode.com\\\/\",\"name\":\"Itsourcecode.com\",\"description\":\"Partner In Your Coding Journey!\",\"publisher\":{\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/#\\\/schema\\\/person\\\/ad9e0497e03b85a9ca299d935298f5dc\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/itsourcecode.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/#\\\/schema\\\/person\\\/ad9e0497e03b85a9ca299d935298f5dc\",\"name\":\"itsourcecode\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/wp-content\\\/uploads\\\/2021\\\/01\\\/IT-SOURCECODE_ICON-07.jpg\",\"url\":\"https:\\\/\\\/itsourcecode.com\\\/wp-content\\\/uploads\\\/2021\\\/01\\\/IT-SOURCECODE_ICON-07.jpg\",\"contentUrl\":\"https:\\\/\\\/itsourcecode.com\\\/wp-content\\\/uploads\\\/2021\\\/01\\\/IT-SOURCECODE_ICON-07.jpg\",\"width\":409,\"height\":409,\"caption\":\"itsourcecode\"},\"logo\":{\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/wp-content\\\/uploads\\\/2021\\\/01\\\/IT-SOURCECODE_ICON-07.jpg\"},\"description\":\"Hello Itsourcecoders, welcome to itsourcecode.com. I'm Joken Villanueva, MIT a passionate Blogger, Programmer and a Hobbyist. I started Itsourcecode because I wanted to give back and Share all the learnings and knowledge I've learned in my career and I believe through this website I would be able to help and assist those newbie programmers in enhancing their skills from different programming languages. So let us all help each other by sharing our ideas!\",\"sameAs\":[\"https:\\\/\\\/itsourcecode.com\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/#\\\/schema\\\/person\\\/dafb6a91b43e60537c56e3e1d227d460\",\"name\":\"angel jude suarez\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/wp-content\\\/litespeed\\\/avatar\\\/49f87b924bdd4e5fcbc3635ed3f7af29.jpg?ver=1776429718\",\"url\":\"https:\\\/\\\/itsourcecode.com\\\/wp-content\\\/litespeed\\\/avatar\\\/49f87b924bdd4e5fcbc3635ed3f7af29.jpg?ver=1776429718\",\"contentUrl\":\"https:\\\/\\\/itsourcecode.com\\\/wp-content\\\/litespeed\\\/avatar\\\/49f87b924bdd4e5fcbc3635ed3f7af29.jpg?ver=1776429718\",\"caption\":\"angel jude suarez\"},\"description\":\"Hello programmers, I'm Angel Jude Reyes Suarez, a student and a programmer of different programming languages like Python, Java, JavaScript, PHP, C, C++, Vb.net, and MySQL. and I have also knowledge in developing system or websites from Front-End to Back-End. and also a writer of itsourcecode.com.\",\"url\":\"https:\\\/\\\/itsourcecode.com\\\/author\\\/angeljudesuarez\\\/\"},{\"@type\":\"HowTo\",\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/pygame\\\/python-tetris-game-with-source-code\\\/#howto-1\",\"name\":\"How to Create a Tetris Game in Python? Free Source Code\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/pygame\\\/python-tetris-game-with-source-code\\\/#article\"},\"description\":\"These are the <strong>Steps on how to create a <strong>Tetris Game Code in Python<\\\/strong><\\\/strong>\",\"totalTime\":\"P0DT0H5M\",\"step\":[{\"@type\":\"HowToStep\",\"url\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/pygame\\\/python-tetris-game-with-source-code\\\/#how-to-step-1597153848617\",\"name\":\"Step 1: Create a project name.\",\"itemListElement\":[{\"@type\":\"HowToDirection\",\"text\":\"First, open Pycharm IDE and then create a \\\"project name\\\" After creating a project name click the \\\"create\\\" button.\"}],\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/pygame\\\/python-tetris-game-with-source-code\\\/#schema-image-5254d88182c16c1e699d79386f41e892\",\"url\":\"http:\\\/\\\/itsourcecode.com\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/Tetris-In-Python-Code-Project-Name.png\",\"contentUrl\":\"http:\\\/\\\/itsourcecode.com\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/Tetris-In-Python-Code-Project-Name.png\"}},{\"@type\":\"HowToStep\",\"url\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/pygame\\\/python-tetris-game-with-source-code\\\/#how-to-step-1597153984537\",\"name\":\"Step 2: Create a python file.\",\"itemListElement\":[{\"@type\":\"HowToDirection\",\"text\":\"Second, after creating a project name, \\\"right-click\\\" your project name and then click \\\"new.\\\" After that click the \\\"python file\\\".\"}],\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/pygame\\\/python-tetris-game-with-source-code\\\/#schema-image-6376a11fc6e72b4a1d187bf2e9222567\",\"url\":\"http:\\\/\\\/itsourcecode.com\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/Tetris-In-Python-Code-Python-File.png\",\"contentUrl\":\"http:\\\/\\\/itsourcecode.com\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/Tetris-In-Python-Code-Python-File.png\"}},{\"@type\":\"HowToStep\",\"url\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/pygame\\\/python-tetris-game-with-source-code\\\/#how-to-step-1597154004305\",\"name\":\"Step 3: Name your python file.\",\"itemListElement\":[{\"@type\":\"HowToDirection\",\"text\":\"Third, after creating a Python file, Name your Python file after that click \\\"enter\\\".\"}],\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/pygame\\\/python-tetris-game-with-source-code\\\/#schema-image-6a1deb66ecb1c427c53b90c365648590\",\"url\":\"http:\\\/\\\/itsourcecode.com\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/Tetris-In-Python-Code-Python-File-Name.png\",\"contentUrl\":\"http:\\\/\\\/itsourcecode.com\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/Tetris-In-Python-Code-Python-File-Name.png\"}},{\"@type\":\"HowToStep\",\"url\":\"https:\\\/\\\/itsourcecode.com\\\/free-projects\\\/pygame\\\/python-tetris-game-with-source-code\\\/#how-to-step-1597154022333\",\"name\":\"Step 4: The Actual Code.\",\"itemListElement\":[{\"@type\":\"HowToDirection\",\"text\":\"You are free to copy the code given below and download the full source code below.\"}]}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Create a Tetris Game in Python? Free Source Code","description":"The Python Tetris Game is a GUI based title matching puzzle game which is very easy to understand and use. also includes free source code.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/itsourcecode.com\/free-projects\/pygame\/python-tetris-game-with-source-code\/","og_locale":"en_US","og_type":"article","og_title":"How to Create a Tetris Game in Python? Free Source Code","og_description":"The Python Tetris Game is a GUI based title matching puzzle game which is very easy to understand and use. also includes free source code.","og_url":"https:\/\/itsourcecode.com\/free-projects\/pygame\/python-tetris-game-with-source-code\/","og_site_name":"Itsourcecode.com","article_published_time":"2022-08-23T08:24:31+00:00","article_modified_time":"2025-04-07T07:52:34+00:00","og_image":[{"width":1200,"height":675,"url":"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/08\/Tetris-In-Python-with-Source-Code.png","type":"image\/png"}],"author":"angel jude suarez","twitter_card":"summary_large_image","twitter_misc":{"Written by":"angel jude suarez","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/itsourcecode.com\/free-projects\/pygame\/python-tetris-game-with-source-code\/#article","isPartOf":{"@id":"https:\/\/itsourcecode.com\/free-projects\/pygame\/python-tetris-game-with-source-code\/"},"author":{"name":"angel jude suarez","@id":"https:\/\/itsourcecode.com\/#\/schema\/person\/dafb6a91b43e60537c56e3e1d227d460"},"headline":"How to Create a Tetris Game in Python? Free Source Code","datePublished":"2022-08-23T08:24:31+00:00","dateModified":"2025-04-07T07:52:34+00:00","mainEntityOfPage":{"@id":"https:\/\/itsourcecode.com\/free-projects\/pygame\/python-tetris-game-with-source-code\/"},"wordCount":793,"commentCount":1,"publisher":{"@id":"https:\/\/itsourcecode.com\/#\/schema\/person\/ad9e0497e03b85a9ca299d935298f5dc"},"image":{"@id":"https:\/\/itsourcecode.com\/free-projects\/pygame\/python-tetris-game-with-source-code\/#primaryimage"},"thumbnailUrl":"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/08\/Tetris-In-Python-with-Source-Code.png","keywords":["python tetris","python tetris game with source code","tetris game code in python"],"articleSection":["Pygame Projects"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/itsourcecode.com\/free-projects\/pygame\/python-tetris-game-with-source-code\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/itsourcecode.com\/free-projects\/pygame\/python-tetris-game-with-source-code\/","url":"https:\/\/itsourcecode.com\/free-projects\/pygame\/python-tetris-game-with-source-code\/","name":"How to Create a Tetris Game in Python? Free Source Code","isPartOf":{"@id":"https:\/\/itsourcecode.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/itsourcecode.com\/free-projects\/pygame\/python-tetris-game-with-source-code\/#primaryimage"},"image":{"@id":"https:\/\/itsourcecode.com\/free-projects\/pygame\/python-tetris-game-with-source-code\/#primaryimage"},"thumbnailUrl":"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/08\/Tetris-In-Python-with-Source-Code.png","datePublished":"2022-08-23T08:24:31+00:00","dateModified":"2025-04-07T07:52:34+00:00","description":"The Python Tetris Game is a GUI based title matching puzzle game which is very easy to understand and use. also includes free source code.","breadcrumb":{"@id":"https:\/\/itsourcecode.com\/free-projects\/pygame\/python-tetris-game-with-source-code\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/itsourcecode.com\/free-projects\/pygame\/python-tetris-game-with-source-code\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/itsourcecode.com\/free-projects\/pygame\/python-tetris-game-with-source-code\/#primaryimage","url":"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/08\/Tetris-In-Python-with-Source-Code.png","contentUrl":"https:\/\/itsourcecode.com\/wp-content\/uploads\/2022\/08\/Tetris-In-Python-with-Source-Code.png","width":1200,"height":675,"caption":"Tetris In Python with Source Code"},{"@type":"BreadcrumbList","@id":"https:\/\/itsourcecode.com\/free-projects\/pygame\/python-tetris-game-with-source-code\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/itsourcecode.com\/"},{"@type":"ListItem","position":2,"name":"How to Create a Tetris Game in Python? Free Source Code"}]},{"@type":"WebSite","@id":"https:\/\/itsourcecode.com\/#website","url":"https:\/\/itsourcecode.com\/","name":"Itsourcecode.com","description":"Partner In Your Coding Journey!","publisher":{"@id":"https:\/\/itsourcecode.com\/#\/schema\/person\/ad9e0497e03b85a9ca299d935298f5dc"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/itsourcecode.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/itsourcecode.com\/#\/schema\/person\/ad9e0497e03b85a9ca299d935298f5dc","name":"itsourcecode","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/itsourcecode.com\/wp-content\/uploads\/2021\/01\/IT-SOURCECODE_ICON-07.jpg","url":"https:\/\/itsourcecode.com\/wp-content\/uploads\/2021\/01\/IT-SOURCECODE_ICON-07.jpg","contentUrl":"https:\/\/itsourcecode.com\/wp-content\/uploads\/2021\/01\/IT-SOURCECODE_ICON-07.jpg","width":409,"height":409,"caption":"itsourcecode"},"logo":{"@id":"https:\/\/itsourcecode.com\/wp-content\/uploads\/2021\/01\/IT-SOURCECODE_ICON-07.jpg"},"description":"Hello Itsourcecoders, welcome to itsourcecode.com. I'm Joken Villanueva, MIT a passionate Blogger, Programmer and a Hobbyist. I started Itsourcecode because I wanted to give back and Share all the learnings and knowledge I've learned in my career and I believe through this website I would be able to help and assist those newbie programmers in enhancing their skills from different programming languages. So let us all help each other by sharing our ideas!","sameAs":["https:\/\/itsourcecode.com\/"]},{"@type":"Person","@id":"https:\/\/itsourcecode.com\/#\/schema\/person\/dafb6a91b43e60537c56e3e1d227d460","name":"angel jude suarez","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/itsourcecode.com\/wp-content\/litespeed\/avatar\/49f87b924bdd4e5fcbc3635ed3f7af29.jpg?ver=1776429718","url":"https:\/\/itsourcecode.com\/wp-content\/litespeed\/avatar\/49f87b924bdd4e5fcbc3635ed3f7af29.jpg?ver=1776429718","contentUrl":"https:\/\/itsourcecode.com\/wp-content\/litespeed\/avatar\/49f87b924bdd4e5fcbc3635ed3f7af29.jpg?ver=1776429718","caption":"angel jude suarez"},"description":"Hello programmers, I'm Angel Jude Reyes Suarez, a student and a programmer of different programming languages like Python, Java, JavaScript, PHP, C, C++, Vb.net, and MySQL. and I have also knowledge in developing system or websites from Front-End to Back-End. and also a writer of itsourcecode.com.","url":"https:\/\/itsourcecode.com\/author\/angeljudesuarez\/"},{"@type":"HowTo","@id":"https:\/\/itsourcecode.com\/free-projects\/pygame\/python-tetris-game-with-source-code\/#howto-1","name":"How to Create a Tetris Game in Python? Free Source Code","mainEntityOfPage":{"@id":"https:\/\/itsourcecode.com\/free-projects\/pygame\/python-tetris-game-with-source-code\/#article"},"description":"These are the <strong>Steps on how to create a <strong>Tetris Game Code in Python<\/strong><\/strong>","totalTime":"P0DT0H5M","step":[{"@type":"HowToStep","url":"https:\/\/itsourcecode.com\/free-projects\/pygame\/python-tetris-game-with-source-code\/#how-to-step-1597153848617","name":"Step 1: Create a project name.","itemListElement":[{"@type":"HowToDirection","text":"First, open Pycharm IDE and then create a \"project name\" After creating a project name click the \"create\" button."}],"image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/itsourcecode.com\/free-projects\/pygame\/python-tetris-game-with-source-code\/#schema-image-5254d88182c16c1e699d79386f41e892","url":"http:\/\/itsourcecode.com\/wp-content\/uploads\/2020\/08\/Tetris-In-Python-Code-Project-Name.png","contentUrl":"http:\/\/itsourcecode.com\/wp-content\/uploads\/2020\/08\/Tetris-In-Python-Code-Project-Name.png"}},{"@type":"HowToStep","url":"https:\/\/itsourcecode.com\/free-projects\/pygame\/python-tetris-game-with-source-code\/#how-to-step-1597153984537","name":"Step 2: Create a python file.","itemListElement":[{"@type":"HowToDirection","text":"Second, after creating a project name, \"right-click\" your project name and then click \"new.\" After that click the \"python file\"."}],"image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/itsourcecode.com\/free-projects\/pygame\/python-tetris-game-with-source-code\/#schema-image-6376a11fc6e72b4a1d187bf2e9222567","url":"http:\/\/itsourcecode.com\/wp-content\/uploads\/2020\/08\/Tetris-In-Python-Code-Python-File.png","contentUrl":"http:\/\/itsourcecode.com\/wp-content\/uploads\/2020\/08\/Tetris-In-Python-Code-Python-File.png"}},{"@type":"HowToStep","url":"https:\/\/itsourcecode.com\/free-projects\/pygame\/python-tetris-game-with-source-code\/#how-to-step-1597154004305","name":"Step 3: Name your python file.","itemListElement":[{"@type":"HowToDirection","text":"Third, after creating a Python file, Name your Python file after that click \"enter\"."}],"image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/itsourcecode.com\/free-projects\/pygame\/python-tetris-game-with-source-code\/#schema-image-6a1deb66ecb1c427c53b90c365648590","url":"http:\/\/itsourcecode.com\/wp-content\/uploads\/2020\/08\/Tetris-In-Python-Code-Python-File-Name.png","contentUrl":"http:\/\/itsourcecode.com\/wp-content\/uploads\/2020\/08\/Tetris-In-Python-Code-Python-File-Name.png"}},{"@type":"HowToStep","url":"https:\/\/itsourcecode.com\/free-projects\/pygame\/python-tetris-game-with-source-code\/#how-to-step-1597154022333","name":"Step 4: The Actual Code.","itemListElement":[{"@type":"HowToDirection","text":"You are free to copy the code given below and download the full source code below."}]}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/itsourcecode.com\/wp-json\/wp\/v2\/posts\/22547","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itsourcecode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itsourcecode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itsourcecode.com\/wp-json\/wp\/v2\/users\/1767"}],"replies":[{"embeddable":true,"href":"https:\/\/itsourcecode.com\/wp-json\/wp\/v2\/comments?post=22547"}],"version-history":[{"count":18,"href":"https:\/\/itsourcecode.com\/wp-json\/wp\/v2\/posts\/22547\/revisions"}],"predecessor-version":[{"id":127614,"href":"https:\/\/itsourcecode.com\/wp-json\/wp\/v2\/posts\/22547\/revisions\/127614"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/itsourcecode.com\/wp-json\/wp\/v2\/media\/117756"}],"wp:attachment":[{"href":"https:\/\/itsourcecode.com\/wp-json\/wp\/v2\/media?parent=22547"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itsourcecode.com\/wp-json\/wp\/v2\/categories?post=22547"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itsourcecode.com\/wp-json\/wp\/v2\/tags?post=22547"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}