

{"id":108582,"date":"2022-06-28T08:00:58","date_gmt":"2022-06-28T02:30:58","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=108582"},"modified":"2026-06-01T12:56:35","modified_gmt":"2026-06-01T07:26:35","slug":"python-spin-a-yarn-project","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/python-spin-a-yarn-project\/","title":{"rendered":"Spin a Yarn Game in Python"},"content":{"rendered":"<div class='__iawmlf-post-loop-links' style='display:none;' data-iawmlf-post-links='[{&quot;id&quot;:2565,&quot;href&quot;:&quot;https:\\\/\\\/drive.google.com\\\/file\\\/d\\\/1K4LcNeVIOXp2moUA0AHhAwq1ObdUllkS\\\/view?usp=drive_link&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20260601072508\\\/https:\\\/\\\/drive.google.com\\\/file\\\/d\\\/1K4LcNeVIOXp2moUA0AHhAwq1ObdUllkS\\\/view?usp=drive_link&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-06-01 21:08:05&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-06-01 21:08:05&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;}]'><\/div>\n<p>We all love to listen to or read stories. It would be more fun when we contribute by adding to it. I think you would have understood that I am talking about the Spin a Yarn game. Yes! We will be building it using Python. So, let\u2019s get started.<\/p>\n<h3>What is Spin a Yarn?<\/h3>\n<p>It is a multiplayer game in which a beginning line(s) will be given and the player has to complete it. It not only lets the player increase creativity but also entertains other interesting stories.<\/p>\n<h3>Spin a Yarn using Python<\/h3>\n<p>We will be using the Tkinter module for building the GUI to display and take the story. And we also use the pyttsx3 module to read out the final story. In this game, we show three starting storylines. Based on your comfort, you can add any number.<\/p>\n<h3>Download Spin a Yarn Project Source Code<\/h3>\n<p>Please download the source code for Spin the Yarn game using the link: <a href=\"https:\/\/drive.google.com\/file\/d\/1K4LcNeVIOXp2moUA0AHhAwq1ObdUllkS\/view?usp=drive_link\"><strong>Spin a Yarn Project<\/strong><\/a><\/p>\n<h3>Project Prerequisites<\/h3>\n<p>The developer should have prior knowledge of Python and the Tkinter module to build this project.<br \/>\nIf not installed, the Tkinter and pyttsx3 module can be installed by using the below command.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">pip install tk\r\npip install pyttsx3<\/pre>\n<p>Also, you need to know about creating storylines. Lol!<\/p>\n<h3>Steps to build Spin a Yarn Project using Python<\/h3>\n<p>We will be following the below steps to build Spin the Yarn:<\/p>\n<p>1. First, import the module and build the main window<\/p>\n<p>2. Then add different buttons based on the number of stories<\/p>\n<p>3. Build a window to show the storyline and take input of the rest of the story<\/p>\n<p>4. After this, create a function to show the complete story.<\/p>\n<h3>1. Importing the module<\/h3>\n<p>Here we are importing the Tkinter and the pyttsx3 modules we discussed above.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">import tkinter as tk\r\nfrom tkinter import *\r\nimport pyttsx3\r\n<\/pre>\n<h3>2. Creating the main window<\/h3>\n<p>Now we create an empty window and add the properties, title, size and color.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">wn = Tk()\r\nwn.title(\"DataFlair Spin Yarn\")\r\nwn.configure(bg='mint cream')\r\nwn.minsize(width=500,height=500)\r\nwn.geometry(\"300x300\")\r\n<\/pre>\n<h3>3. Creating global variables<\/h3>\n<p>We create the following global variables:<\/p>\n<p>a. Choices hold the story number chosen by the player<\/p>\n<p>b. newStory holds the storyline<\/p>\n<p>c. modifiedStroy has the final story by the player<\/p>\n<p>d. stories is the list having all the storylines<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">choice=0\r\nnewStory=''\r\nmodifiedStory=''\r\nstories=[\"Ben is very good at yarning a good story. But the story he wrote yesterday ...\",\r\n\"One day at night I was bored and started watching a horror movie. After an hour or so ...\",\r\n\"Me and my friends planned to go on a trip last week. We started with a very ...\"]\r\nstory=StringVar()\r\n<\/pre>\n<h3>4. Adding components to window<\/h3>\n<p>In this, we add the heading and three buttons for the three stories. Each button takes the user to a different story line based on the function given to it.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">headingLabel = Label(wn, text=\"DataFlair Spin Yarn\", fg='black', font = ('Courier',15,'bold'))\r\nheadingLabel.place(x=100,y=10)\r\n\r\n# Instructions to add words\r\nlabel= Label(wn, text =\"Please select one of the stores by clicking one of the buttons\",fg='black',bg=\"mint cream\",font = ('Calibre',12))\r\nlabel.place(x=30,y=80)\r\n\r\nstoryEntry=Entry(wn,font = ('Calibre',10))\r\nlabel2 = Label(wn,textvariable=story, bg=\"mint cream\",fg='black',font = ('Calibre',10))\r\n#Add Button\r\n\r\nBtn1 = tk.Button(wn,text=\"Story 1\",bg='#d1ccc0', fg='black',font = ('Calibre',12),command=story1)\r\nBtn1.place(x=200,y=130)\r\n\r\n#Add Button\r\nBtn2 = tk.Button(wn,text=\"Story 2\",bg='#d1ccc0', fg='black',font = ('Calibre',12),command=story2)\r\nBtn2.place(x=200,y=180)\r\n\r\n#Add Button\r\nBtn3 = tk.Button(wn,text=\"Story 3\",bg='#d1ccc0', fg='black',font = ('Calibre',12),command=story3)\r\nBtn3.place(x=200,y=230)\r\nwn.mainloop()\r\n<\/pre>\n<h3>5. Adding functions to the buttons<\/h3>\n<p>Here are the three functions for the buttons that set the choice to the respective number based on the story chosen and called the mainWin() function, which we will discuss in the next step.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">def story1():\r\n    global choice\r\n    choice=0\r\n    mainWin()\r\n\r\ndef story2():\r\n    global choice\r\n    choice=1\r\n    mainWin()\r\n\r\ndef story3():\r\n    global choice\r\n    choice=2\r\n    mainWin()\r\n<\/pre>\n<h3>6. Creating a function to create a window for the taking story input<\/h3>\n<p>This is the mainWin() function which creates a new window. This window displays the story line and takes the input of the story continuation. And on clicking the Done button, it runs the function show_read_story()<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">def mainWin():\r\n    global choice,stories,cnt,story,storyEntry,newStory,label2,Btn3,wn\r\n    wn.destroy()\r\n    wn = Tk()\r\n    wn.title(\"DataFlair Spin Yarn\")\r\n    wn.configure(bg='mint cream')\r\n    wn.minsize(width=500,height=500)\r\n    wn.geometry(\"300x300\")\r\n\r\n    headingLabel = Label(wn, text=\"DataFlair Spin Yarn\", fg='black', font = ('Courier',15,'bold'))\r\n    headingLabel.place(x=120,y=10)\r\n\r\n    newStory=stories[choice]\r\n\r\n    label1= Label(wn, text =\"Here is the starting line of the story\",fg='black',bg=\"mint cream\",font = ('Calibre',12))\r\n    label1.place(x=30,y=50)\r\n    storyline=StringVar()\r\n    storyline.set(newStory)\r\n    label2 = Label(wn,textvariable=storyline, bg=\"mint cream\",fg='black',font = ('Calibre',10))\r\n    label2.place(x=30,y=80)\r\n\r\n    #Takes x and y values of a point\r\n    storyEntry = tk.Text(wn, width=50, height=10)\r\n    storyEntry.place(x=50,y=120)\r\n\r\n    Btn3 = tk.Button(wn,text=\"Done\",bg='gray', fg='white',font = ('Calibre',12),command=show_read_story)\r\n    Btn3.place(x=200,y=300)\r\n\r\n    wn.mainloop()\r\n<\/pre>\n<h3>7. Creating a function show the final story and read it out<\/h3>\n<p>In this, the function read() converts the final story into voice and reads it out. We created the WritableStringVar class to show the story in different lines to fit to the window.<\/p>\n<p>And the function show_read_story(), gets the story entered by the player. Then we combine it with the storyline.<\/p>\n<p>Then we create a new window to show the final story on the label created as the object of the class WritableStringVar. Finally, add the button to read out the story by running the function read().<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">def read():\r\n    global modifiedStory\r\n    voiceEngine = pyttsx3.init('sapi5')\r\n    voices = voiceEngine.getProperty('voices')\r\n    voiceEngine.setProperty('voice', voices[1].id)\r\n    voiceEngine.say(\"Here is your story\")\r\n    voiceEngine.say(modifiedStory)\r\n\r\nclass WritableStringVar(tk.StringVar):\r\n    def write(self, added_text):\r\n        new_text = self.get() + added_text\r\n        self.set(new_text)\r\n\r\n    def clear(self):\r\n        self.set(\"\")\r\n\r\ndef show_read_story():\r\n    global cnt,newStory,storyEntry,label2,wn,modifiedStory\r\n    modifiedStory=storyEntry.get(\"1.0\", \"end-1c\")\r\n\r\n    modifiedStory=newStory[:-3] + modifiedStory\r\n\r\n    print(modifiedStory)\r\n   \r\n    Btn3[\"state\"] = DISABLED\r\n   \r\n    wn = Tk()\r\n    wn.title(\"DataFlair Spin Yarn\")\r\n    wn.configure(bg='mint cream')\r\n    wn.minsize(width=500,height=500)\r\n    wn.geometry(\"300x300\")\r\n\r\n    headingLabel = Label(wn, text=\"DataFlair Spin Yarn\", fg='black', font = ('Courier',15,'bold'),wraplength=300)\r\n    headingLabel.place(x=100,y=10)\r\n   \r\n    story= WritableStringVar(wn)\r\n    label = Label(wn,textvariable=story, bg=\"mint cream\",fg='black',font = ('Calibre',12))\r\n    label.place(x=50,y=70)\r\n    l=len(modifiedStory)\r\n    i=0\r\n    while(i&lt;(l\/\/50 +1) ):\r\n        start=i*50\r\n        end=(i+1)*50\r\n        if((i+1)*50 &gt;l):\r\n            end=l\r\n        i+=1\r\n        print( modifiedStory[start:end] , file=story)\r\n\r\n    Btn = tk.Button(wn,text=\"Read the Story\",bg='gray', fg='white',font = ('Calibre',12),command=read)\r\n    Btn.place(x=200,y=300)\r\n    wn.mainloop()\r\n<\/pre>\n<h3>Output of Spin a Yarn project<\/h3>\n<p>Spin a Yarn Project Window<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/output-spin-a-yarn-project.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-110375\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/output-spin-a-yarn-project.webp\" alt=\"output spin a yarn project\" width=\"639\" height=\"796\" \/><\/a><\/p>\n<h3>Summary<\/h3>\n<p>Hurray! We have successfully built the spin the yarn story, We learned to create a window, take multiline input, display, and read it. Hope you enjoyed building this project with us. Happy coding!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We all love to listen to or read stories. It would be more fun when we contribute by adding to it. I think you would have understood that I am talking about the Spin&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":110376,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46],"tags":[26334,25791,21082,22734,27055,26758,26759,27057,27056],"class_list":["post-108582","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","tag-basic-python-project","tag-python-game-project","tag-python-project","tag-python-project-for-beginners","tag-python-spin-a-yarn","tag-python-spin-a-yarn-project","tag-python-spin-a-yarn-project-source-code","tag-spin-a-yarn-game","tag-spin-a-yarn-project"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Spin a Yarn Game in Python - DataFlair<\/title>\n<meta name=\"description\" content=\"Create spin a yarn project using python Tkinter module for building GUI to display and pyttsx3 module to read out the final story.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/python-spin-a-yarn-project\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Spin a Yarn Game in Python - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Create spin a yarn project using python Tkinter module for building GUI to display and pyttsx3 module to read out the final story.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/python-spin-a-yarn-project\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-06-28T02:30:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-06-01T07:26:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/python-game-project-spin-a-yarn-game.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=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair 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":"Spin a Yarn Game in Python - DataFlair","description":"Create spin a yarn project using python Tkinter module for building GUI to display and pyttsx3 module to read out the final story.","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:\/\/data-flair.training\/blogs\/python-spin-a-yarn-project\/","og_locale":"en_US","og_type":"article","og_title":"Spin a Yarn Game in Python - DataFlair","og_description":"Create spin a yarn project using python Tkinter module for building GUI to display and pyttsx3 module to read out the final story.","og_url":"https:\/\/data-flair.training\/blogs\/python-spin-a-yarn-project\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2022-06-28T02:30:58+00:00","article_modified_time":"2026-06-01T07:26:35+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/python-game-project-spin-a-yarn-game.webp","type":"image\/webp"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/python-spin-a-yarn-project\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/python-spin-a-yarn-project\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/b49855299264df5e27e3ec6c2cd9fde9"},"headline":"Spin a Yarn Game in Python","datePublished":"2022-06-28T02:30:58+00:00","dateModified":"2026-06-01T07:26:35+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/python-spin-a-yarn-project\/"},"wordCount":623,"commentCount":3,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/python-spin-a-yarn-project\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/python-game-project-spin-a-yarn-game.webp","keywords":["basic python project","python game project","Python project","python project for beginners","Python spin a yarn","Python spin a yarn project","Python spin a yarn project source code","spin a yarn game","spin a yarn project"],"articleSection":["Python Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/python-spin-a-yarn-project\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/python-spin-a-yarn-project\/","url":"https:\/\/data-flair.training\/blogs\/python-spin-a-yarn-project\/","name":"Spin a Yarn Game in Python - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/python-spin-a-yarn-project\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/python-spin-a-yarn-project\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/python-game-project-spin-a-yarn-game.webp","datePublished":"2022-06-28T02:30:58+00:00","dateModified":"2026-06-01T07:26:35+00:00","description":"Create spin a yarn project using python Tkinter module for building GUI to display and pyttsx3 module to read out the final story.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/python-spin-a-yarn-project\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/python-spin-a-yarn-project\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/python-spin-a-yarn-project\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/python-game-project-spin-a-yarn-game.webp","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2022\/05\/python-game-project-spin-a-yarn-game.webp","width":1200,"height":628},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/python-spin-a-yarn-project\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Python Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/python\/"},{"@type":"ListItem","position":3,"name":"Spin a Yarn Game in Python"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/b49855299264df5e27e3ec6c2cd9fde9","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ef46b745ddad2fad690af626c6ef29b91809ad0a9f5ef398d07817d8cad042f5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ef46b745ddad2fad690af626c6ef29b91809ad0a9f5ef398d07817d8cad042f5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ef46b745ddad2fad690af626c6ef29b91809ad0a9f5ef398d07817d8cad042f5?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team is a group of passionate educators and industry experts dedicated to providing high-quality online learning resources on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. With years of experience in the field, the team aims to simplify complex topics and help learners advance their careers. At DataFlair, we believe in empowering students and professionals with the knowledge and skills needed to thrive in today\u2019s fast-paced tech industry. Follow us for Free courses, expert insights, tutorials, and practical tips to boost your learning journey.","url":"https:\/\/data-flair.training\/blogs\/author\/datafbdad\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/108582","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=108582"}],"version-history":[{"count":5,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/108582\/revisions"}],"predecessor-version":[{"id":148644,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/108582\/revisions\/148644"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/110376"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=108582"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=108582"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=108582"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}