{"id":87054,"date":"2023-02-14T11:30:43","date_gmt":"2023-02-14T06:00:43","guid":{"rendered":"https:\/\/techvidvan.com\/tutorials\/?p=87054"},"modified":"2026-06-03T15:57:06","modified_gmt":"2026-06-03T10:27:06","slug":"python-spin-a-yarn","status":"publish","type":"post","link":"https:\/\/techvidvan.com\/tutorials\/python-spin-a-yarn\/","title":{"rendered":"Python Spin a Yarn &#8211; Spin Your Stories to Life"},"content":{"rendered":"<p>Welcome to the project on how to create a game called &#8220;Spin a Yarn&#8221; using the Python programming language and the Tkinter library. In this game, multiple players will take turns adding to a story, with each turn starting from a randomly generated story starter or their own story. The final story can then be saved to a text file for future reference.<\/p>\n<h3>Python Spin a Yarn<\/h3>\n<p>The objective of this project is to teach you how to create a simple, interactive Spin a Yarn game using Tkinter, a Python library for creating graphical user interfaces. We will cover the basics of GUI programming, event handling, and file handling in Python.<\/p>\n<h3>Prerequisites for Spin a Yarn using Python<\/h3>\n<p>Before starting this Python Spin a Yarn Project, you should have a basic understanding of Python programming, including data types, loops, functions, and conditionals. You should also have a basic understanding of Tkinter and its widgets.<\/p>\n<p>You also need to have Tkinter and python installed in your computer system. To install Tkinter, type the following command in your terminal<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">pip install tk\r\n<\/pre>\n<h3>Download Python Spin a Yarn Project<\/h3>\n<p>Please download the source code of python Spin a Yarn project from the following link: <a href=\"https:\/\/drive.google.com\/file\/d\/12zaeAbOyp-KmFfqem3kJuSftGyaSvMvC\/view?usp=drive_link\"><strong>Spin a Yarn Project Code<\/strong><\/a><\/p>\n<h3>Steps to Create Spin a Yarn using Python<\/h3>\n<p>Following are the steps for developing the python Spin a Yarn project:<\/p>\n<h4>Step 1: Importing Libraries<\/h4>\n<p>The first step in creating our Spin a Yarn game is to import the necessary libraries. The Tkinter library is used to create the GUI, while the random library is used to randomly select a story starter. The filedialog library is used to save and open the story in a text file.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># Importing required modules\r\nimport tkinter as tk\r\nimport random\r\nfrom tkinter import messagebox, filedialog<\/pre>\n<h4>Step 2: Creating a Window<\/h4>\n<p>The next step is to create a window for our Spin a Yarn game. This is done using the Tk() function from the Tkinter library. We will also set the title of the window and set the size and background color of the window.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># Creating a window\r\nroot = tk.Tk()\r\n\r\n\r\n# Setting the title\r\nroot.title(\"TechVidvan - Spin a Yarn\")\r\n\r\n\r\n# Setting the window size, disabling resizing and setting the background color\r\nroot.geometry(\"925x751\")\r\nroot.resizable(width=False, height=False)\r\nroot.configure(background=\"#1A5276\")\r\n<\/pre>\n<h4>Step 3: Defining Variables and Lists<\/h4>\n<p>We will define a variable to store the current player, and a list to store the story starters.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># Variable to store the current player\r\ncurrent_player = 1\r\n\r\n\r\n# List to store the story starters\r\nstory_starters=[\r\n\"A ghost haunts a high school, seeking revenge on the students and faculty who wronged them in life.\",\r\n\"A group of teens are mysteriously transported to an alternate dimension where they must fight to survive against monsters and other terrifying creatures.\",\r\n\"A group of astronauts are stranded on a distant planet after their ship crashes and must find a way to survive and repair the ship.\",\r\n\"A group of friends discover a cursed object that brings their deepest fears to life and must find a way to break the curse before it destroys them.\",\r\n\"A detective is on the hunt for a serial killer who is targeting a specific group of people, but the closer they get to catching the killer, the more personal the case becomes.\",\r\n\"A young woman discovers a hidden talent for parkour and becomes embroiled in a dangerous underground world of rival teams and high-stakes competition.\"\r\n]\r\n<\/pre>\n<h4>Step 4: Defining Game Functions<\/h4>\n<p>We will define several functions to handle different events in the game, such as starting the game, generating a random story starter, adding a story starter to the main story, and saving and opening the story in a text file.<\/p>\n<ul>\n<li style=\"font-weight: 400;\"><b>start_game():<\/b> This function will get the player names and set the current player to the first player.<\/li>\n<li style=\"font-weight: 400;\"><b>generate_story_starter(): <\/b>This function will generate a random story starter and set the current player to the next player.<\/li>\n<li style=\"font-weight: 400;\"><b>add_story_main():<\/b> This function will add the story starter to the main story and set the current player to the next player.<\/li>\n<li style=\"font-weight: 400;\"><b>save_story():<\/b> This function will save the story in a text file.<\/li>\n<li style=\"font-weight: 400;\"><b>open_old_story():<\/b> This function will open an old story from a text file.<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># function to start the game. It will get the player names and set the current player to the first player\r\ndef start_game():\r\n   global players\r\n\r\n\r\n   # getting player names\r\n   player_names = player_names_input.get()\r\n\r\n\r\n   # check if player names are entered\r\n    if player_names_input.get() == \"Enter Player Names separated by comma like this: Player1, Player2, Player3\":\r\n        messagebox.askokcancel(\"Player Names not entered\", \"Kindly enter the names of the players in the input field\")\r\n    else:\r\n        players = player_names.split(\", \")\r\n  \r\n   # setting current player to first player\r\n    current_player_label.configure(text=\"Current Player: \" + players[0])\r\n\r\n\r\n# function to generate a random story starter\r\ndef generate_story_starter():\r\n    story.delete(1.0, \"end\")\r\n\r\n\r\n   # getting random story starter\r\n    story.insert(\"end\", random.choice(story_starters))\r\n\r\n\r\n   # setting current player to next player\r\n    current_player_label.configure(text=\"Current Player: \" + str(players[current_player%len(players)]))\r\n\r\n\r\n# function to add the story starter to the main story\r\ndef add_story_main():\r\n    global current_player\r\n\r\n\r\n   # increment current player\r\n    current_player += 1\r\n\r\n\r\n   # add story to main story\r\n    main_story.insert(\"end\", story.get(1.0, \"end\"))\r\n    story.delete(1.0, \"end\")\r\n\r\n\r\n   # setting current player to next player\r\n    current_player_label.configure(text=\"Current Player: \" + str(players[current_player%len(players)]))\r\n\r\n\r\n# function to save story in txt format\r\ndef save_story():\r\n   # open file dialog box to save txt file\r\n    file = filedialog.asksaveasfile(mode='w', defaultextension=\".txt\")\r\n    if file is None:\r\n        return\r\n    text2save = story.get(1.0, \"end\") \r\n    file.write(text2save)\r\n    file.close() \r\n\r\n\r\n# function to open old story from txt file\r\ndef open_old_story():\r\n   # if main story is not empty, ask if user wants to save the story\r\n    if main_story.get(1.0, \"end\") != \"\":\r\n        if messagebox.askyesno(\"Save the Story\", \"Do you want to save the current story? Press Yes or No.\"):\r\n            save_story()\r\n\r\n\r\n   # open file dialog box to open txt file\r\n   file = filedialog.askopenfile(parent=root, mode='rb', title='Select a file', filetypes=((\"Text File\", \"*.txt\"), (\"All Files\", \"*.*\")))\r\n    if file != None:\r\n       # read data from file and add it to main story\r\n        data = file.read()\r\n        main_story.delete(1.0, \"end\")\r\n        main_story.insert(\"end\", data)\r\n<\/pre>\n<h4>Step 5: Creating GUI<\/h4>\n<p>We will create a GUI using Tkinter to make the game more interactive. We will create a title label, an entry box to enter player names, a label to show the current player, and a button to generate a random story starter. We will also add a button to add the story starter to the main story, a button to save the story, and a text box to show the main story.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># Creating title label\r\ntitle_label=tk.Label(root)\r\ntitle_label.configure(background=\"#ff5722\", foreground=\"#ffffe7\", font=\"Arial 23\", justify=\"center\", text=\"TechVidvan - Spin a Yarn\")\r\ntitle_label.place(x=0,y=0,width=923,height=37)\r\n\r\n\r\n# Creating player names entry box\r\nplayer_names_input=tk.Entry(root)\r\nplayer_names_input.configure(background=\"#ffffff\", borderwidth=\"1px\", font=\"Arial 16\", foreground=\"#333333\", justify=\"center\")\r\nplayer_names_input.place(x=20,y=50,width=881,height=30)\r\nplayer_names_input.insert(0, 'Enter Player Names seperated by comma like this: Player1, Player2, Player3')\r\n\r\n\r\n# calling function when we click on entry box\r\ndef click(*args):\r\n   player_names_input.delete(0, 'end')\r\n # calling function when we leave entry box\r\ndef leave(*args):\r\n    if(player_names_input.get() == ''):\r\n        player_names_input.delete(0, 'end')\r\n        player_names_input.insert(0, 'Enter Player Names seperated by comma like this: Player1, Player2, Player3')\r\n      \r\n    root.focus()\r\n\r\n\r\n# binding entry box with click and leave functions\r\nplayer_names_input.bind(\"&lt;Button-1&gt;\", click)\r\nplayer_names_input.bind(\"&lt;Leave&gt;\", leave)\r\n\r\n\r\n# Creating player names label\r\ncurrent_player_label=tk.Label(root)\r\ncurrent_player_label.configure(background=\"#1A5276\", foreground=\"#F1C40F\", font=\"Arial 16\", justify=\"center\", text=\"Player Turn:\")\r\ncurrent_player_label.place(x=195,y=90,width=310,height=30)\r\n\r\n\r\n# Creating generate story starter button\r\ngenerate_button=tk.Button(root)\r\ngenerate_button.configure(font=\"Arial 13\", justify=\"center\", text=\"Generate Story Starter\", command=generate_story_starter)\r\ngenerate_button.place(x=520,y=90,width=180,height=30)\r\n\r\n\r\n# Creating open old story button\r\nopen_old_story_button=tk.Button(root)\r\nopen_old_story_button.configure(font=\"Arial 13\", justify=\"center\", text=\"Continue Old Stories\", command=open_old_story)\r\nopen_old_story_button.place(x=728,y=90,width=173,height=30)\r\n\r\n\r\n# Creating story entry box. This is where the story starter will be generated and added to main story\r\nstory=tk.Text(root)\r\nstory.configure(background=\"#1E1E1E\", borderwidth=\"1px\", font=\"Arial 16\", foreground=\"white\", wrap=\"word\")\r\nstory.place(x=20,y=130,width=881,height=71)\r\n\r\n\r\n# Creating add to main story button\r\nadd_button=tk.Button(root)\r\nadd_button.configure(font=\"Arial 13\", justify=\"center\", text=\"Add to Main Story\", command=add_story_main)\r\nadd_button.place(x=380,y=210,width=157,height=30)\r\n\r\n\r\n# Creating main story entry box. This is where the main story will be displayed.\r\nmain_story=tk.Text(root)\r\nmain_story.configure(background=\"#1E1E1E\", borderwidth=\"1px\", font=\"Arial 16\", foreground=\"white\", wrap=\"word\")\r\nmain_story.place(x=20,y=250,width=881,height=445)\r\n\r\n\r\n# Creating save story button\r\nsave_button=tk.Button(root)\r\nsave_button.configure(font=\"Arial 16\", justify=\"center\", text=\"Save Story\", command=save_story)\r\nsave_button.place(x=390,y=710,width=132,height=30)\r\n\r\n\r\n# Creating start game button\r\nstart_button=tk.Button(root)\r\nstart_button.configure(font=\"Arial 16\", justify=\"center\", text=\"Start Game\", command=start_game)\r\nstart_button.place(x=20,y=90,width=157,height=30)\r\n\r\n<\/pre>\n<h4>Step 6: Running the main loop<\/h4>\n<p>We will run the main loop to keep the GUI running.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># run the main loop\r\nroot.mainloop()\r\n\r\n<\/pre>\n<h3>Python Spin a Yarn Project Output<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-87136\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/02\/spin-a-yarn-output.webp\" alt=\"spin a yarn output\" width=\"1850\" height=\"1558\" \/><\/p>\n<h3>Summary<\/h3>\n<p>Congratulations on completing the project on creating the Spin-a-Yarn game! Through this project, you have learned how to use the Python programming language to create a text-based interactive game that allows players to spin a yarn and make choices that affect the outcome of the story.<\/p>\n<p>With the knowledge and skills you have gained from this Spin a Yarn project, you can now create your own interactive games and stories or even expand upon the Spin-a-Yarn game to add more features and characters. Keep up the good work!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Welcome to the project on how to create a game called &#8220;Spin a Yarn&#8221; using the Python programming language and the Tkinter library. In this game, multiple players will take turns adding to a&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":87141,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1053],"tags":[4862,483,3249,1207,4863,4864,4865,4866],"class_list":["post-87054","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","tag-python-basic-project","tag-python-project","tag-python-project-for-beginners","tag-python-project-for-practice","tag-python-spin-a-yarn","tag-python-spin-a-yarn-project","tag-spin-a-yarn","tag-spin-a-yarn-project"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Python Spin a Yarn - Spin Your Stories to Life - TechVidvan<\/title>\n<meta name=\"description\" content=\"In Spin a Yarn game, multiple players will take turns adding to a story. Through this game you&#039;ve learned how to create a text-based game.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/techvidvan.com\/tutorials\/python-spin-a-yarn\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python Spin a Yarn - Spin Your Stories to Life - TechVidvan\" \/>\n<meta property=\"og:description\" content=\"In Spin a Yarn game, multiple players will take turns adding to a story. Through this game you&#039;ve learned how to create a text-based game.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techvidvan.com\/tutorials\/python-spin-a-yarn\/\" \/>\n<meta property=\"og:site_name\" content=\"TechVidvan\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/TechVidvan\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-02-14T06:00:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-06-03T10:27:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2023\/02\/python-project-spin-a-yarn-1.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"TechVidvan Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:site\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"TechVidvan Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python Spin a Yarn - Spin Your Stories to Life - TechVidvan","description":"In Spin a Yarn game, multiple players will take turns adding to a story. Through this game you've learned how to create a text-based game.","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:\/\/techvidvan.com\/tutorials\/python-spin-a-yarn\/","og_locale":"en_US","og_type":"article","og_title":"Python Spin a Yarn - Spin Your Stories to Life - TechVidvan","og_description":"In Spin a Yarn game, multiple players will take turns adding to a story. Through this game you've learned how to create a text-based game.","og_url":"https:\/\/techvidvan.com\/tutorials\/python-spin-a-yarn\/","og_site_name":"TechVidvan","article_publisher":"https:\/\/www.facebook.com\/TechVidvan\/","article_published_time":"2023-02-14T06:00:43+00:00","article_modified_time":"2026-06-03T10:27:06+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2023\/02\/python-project-spin-a-yarn-1.webp","type":"image\/webp"}],"author":"TechVidvan Team","twitter_card":"summary_large_image","twitter_creator":"@vidvantech","twitter_site":"@vidvantech","twitter_misc":{"Written by":"TechVidvan Team","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/techvidvan.com\/tutorials\/python-spin-a-yarn\/#article","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/python-spin-a-yarn\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22"},"headline":"Python Spin a Yarn &#8211; Spin Your Stories to Life","datePublished":"2023-02-14T06:00:43+00:00","dateModified":"2026-06-03T10:27:06+00:00","mainEntityOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/python-spin-a-yarn\/"},"wordCount":676,"commentCount":0,"publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/python-spin-a-yarn\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2023\/02\/python-project-spin-a-yarn-1.webp","keywords":["python basic project","Python project","python project for beginners","Python project for practice","python spin a yarn","python spin a yarn project","spin a yarn","spin a yarn project"],"articleSection":["Python Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/techvidvan.com\/tutorials\/python-spin-a-yarn\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/techvidvan.com\/tutorials\/python-spin-a-yarn\/","url":"https:\/\/techvidvan.com\/tutorials\/python-spin-a-yarn\/","name":"Python Spin a Yarn - Spin Your Stories to Life - TechVidvan","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/python-spin-a-yarn\/#primaryimage"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/python-spin-a-yarn\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2023\/02\/python-project-spin-a-yarn-1.webp","datePublished":"2023-02-14T06:00:43+00:00","dateModified":"2026-06-03T10:27:06+00:00","description":"In Spin a Yarn game, multiple players will take turns adding to a story. Through this game you've learned how to create a text-based game.","breadcrumb":{"@id":"https:\/\/techvidvan.com\/tutorials\/python-spin-a-yarn\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/techvidvan.com\/tutorials\/python-spin-a-yarn\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/python-spin-a-yarn\/#primaryimage","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2023\/02\/python-project-spin-a-yarn-1.webp","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2023\/02\/python-project-spin-a-yarn-1.webp","width":1200,"height":628,"caption":"python project spin a yarn"},{"@type":"BreadcrumbList","@id":"https:\/\/techvidvan.com\/tutorials\/python-spin-a-yarn\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/techvidvan.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Python Spin a Yarn &#8211; Spin Your Stories to Life"}]},{"@type":"WebSite","@id":"https:\/\/techvidvan.com\/tutorials\/#website","url":"https:\/\/techvidvan.com\/tutorials\/","name":"TechVidvan Blogs","description":"","publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/techvidvan.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/techvidvan.com\/tutorials\/#organization","name":"TechVidvan","url":"https:\/\/techvidvan.com\/tutorials\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","width":200,"height":50,"caption":"TechVidvan"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/TechVidvan\/","https:\/\/x.com\/vidvantech"]},{"@type":"Person","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22","name":"TechVidvan Team","description":"The TechVidvan Team delivers practical, beginner-friendly tutorials on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our experts are here to help you upskill and excel in today\u2019s tech industry."}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/87054","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/comments?post=87054"}],"version-history":[{"count":1,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/87054\/revisions"}],"predecessor-version":[{"id":448149,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/87054\/revisions\/448149"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media\/87141"}],"wp:attachment":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media?parent=87054"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/categories?post=87054"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/tags?post=87054"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}