

{"id":12906,"date":"2018-04-10T04:52:24","date_gmt":"2018-04-09T23:22:24","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=12906"},"modified":"2026-04-25T15:10:10","modified_gmt":"2026-04-25T09:40:10","slug":"python-cgi-programming","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/python-cgi-programming\/","title":{"rendered":"Python CGI Programming Tutorial &#8211; Python CGI Module &amp; Functions"},"content":{"rendered":"<div class='__iawmlf-post-loop-links' style='display:none;' data-iawmlf-post-links='[{&quot;id&quot;:1997,&quot;href&quot;:&quot;http:\\\/\\\/en.wikipedia.org\\\/w\\\/index.php?title=Main_page&amp;action=raw&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20251009144237\\\/https:\\\/\\\/en.wikipedia.org\\\/w\\\/index.php?title=Main_Page&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2025-12-10 16:02:51&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2025-12-10 16:02:51&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;}]'><\/div>\n<p>This Python CGI Programming tutorial deals with the \u2018cgi\u2019 module, the support module for CGI scripts in Python. Moreover, we will discuss the functions of Python CGI Programming.<\/p>\n<p>So, let\u2019s begin the CGI Programming in Python Tutorial.<\/p>\n<div id=\"attachment_12908\" style=\"width: 1210px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/CGI-Programming-in-Python.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-12908\" class=\"wp-image-12908 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/CGI-Programming-in-Python.jpg\" alt=\"Python CGI Programming Tutorial\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/CGI-Programming-in-Python.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/CGI-Programming-in-Python-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/CGI-Programming-in-Python-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/CGI-Programming-in-Python-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/CGI-Programming-in-Python-1024x536.jpg 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><p id=\"caption-attachment-12908\" class=\"wp-caption-text\">Python CGI Programming Tutorial &#8211; Python CGI Module &amp; Functions<\/p><\/div>\n<h3>What is Python CGI Programming?<\/h3>\n<p><em>Python CGI stands for Common Gateway Interface<\/em>. An HTTP server invokes a Python CGI script so it can process user input that a user may submit through an HTML &lt;FORM&gt; or &lt;ISINDEX&gt; element.<\/p>\n<p>Such a script usually lives in the server\u2019s special cgi-bin directory.<\/p>\n<p>For a request, the server places information about it- the client\u2019s hostname, the requested URL, the query string, and other information- in the script\u2019s shell environment.<\/p>\n<p>It executes this script and sends the output back to the client.<\/p>\n<p>The input for this script connects to the client, and the server sometimes reads the form data this way.<\/p>\n<p>Other times, it passes form data through a query string, which is a part of the URL. A query string holds data that doesn\u2019t conventionally fit a hierarchical path structure.<\/p>\n<p>For example:<br \/>\n<a href=\"http:\/\/en.wikipedia.org\/w\/index.php?title=Main_page&amp;action=raw\">http:\/\/en.wikipedia.org\/w\/index.php?title=Main_page&amp;action=raw<\/a><\/p>\n<p>Python CGI module\u00a0handles situations and helps debug scripts. With the latest addition, it also lends us support for uploading files from a form.<\/p>\n<p>So, what does a Python CGI script output? It gives out two sections separated by a blank line.<\/p>\n<p>Of these, the first section holds headers that instruct the client that a certain kind of data follows.<\/p>\n<p>Let\u2019s try generating a minimal header section in this Python CGI Programming Example.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; print(\"Content-Type: text\/html\")\r\n&gt;&gt;&gt; print()<\/pre>\n<p>The first statement tells the server that html code follows; the second(a blank line) indicates the end of the header.<\/p>\n<p>And then, the second section is the HTML. This lets the client software display formatted text:<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; print(\"&lt;TITLE&gt;CGI Script Output&lt;\/TITLE&gt;\")\r\n&gt;&gt;&gt; print(\"&lt;H1&gt;This is our first CGI script&lt;\/H1&gt;\")\r\n&gt;&gt;&gt; print(\"Hello, world!\")<\/pre>\n<h3>Python CGI Programming Architecture<\/h3>\n<p>Let\u2019s take a look at the architecture of Python CGI Programming.<\/p>\n<div id=\"attachment_12911\" style=\"width: 421px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/cgi.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-12911\" class=\"wp-image-12911 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/cgi.png\" alt=\"Python CGI Programming\u00a0 Architecture\" width=\"411\" height=\"473\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/cgi.png 411w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/cgi-130x150.png 130w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/cgi-261x300.png 261w\" sizes=\"auto, (max-width: 411px) 100vw, 411px\" \/><\/a><p id=\"caption-attachment-12911\" class=\"wp-caption-text\">Python CGI Programming\u00a0 Architecture<\/p><\/div>\n<h3>Python cgi Module<\/h3>\n<p>Let\u2019s begin with the Python\u00a0cgi module. First, let\u2019s import it.<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; import cgi\r\n&gt;&gt;&gt;<\/pre>\n<p>Now, we type this to write a new scipt:<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; import cgitb\r\n&gt;&gt;&gt; cgitb.enable()\r\n&gt;&gt;&gt;<\/pre>\n<p>What this does is that it activates an exception handler to display detailed reports in the web browser in event of an error.<\/p>\n<p>If however, you want to save the reports to a file, you can:<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; import cgitb\r\n&gt;&gt;&gt; cgitb.enable(display=0, logdir=\"\/path\/to\/logdir\")<\/pre>\n<p>We can do this while developing a script. These reports help us track down bugs faster.<\/p>\n<p>Once we\u2019re confident that our script works correctly, we can remove this.<\/p>\n<p>Now, we use the class FieldStorage to work with the submitted form data.<\/p>\n<p>We can set the encoding keyword parameter to the encoding defined for the document if the form holds non-ASCII characters.<\/p>\n<p>You\u2019ll find this is the &lt;META&gt; tag in the &lt;HEAD&gt; section of your HTML document. Alternatively, you may find it in the Content-type header.<\/p>\n<p>FieldStorage reads form contents from the standard input or from the environment. Instantiate it only once because it may consume standard input.<\/p>\n<p>We can index a FieldStorage instance like a Python dictionary. This lets us test membership with the \u2018in\u2019 operator. We can then also call method keys() and function len().<\/p>\n<p>Note that it ignores fields with empty string values.<\/p>\n<p>If we want to keep them, we can provide a True value for the optional keyword parameter keep_blank_values at the time of creating a FieldStorage instance.<\/p>\n<p>Take a look at this code that ensures that fields \u2018name\u2019 and \u2018addr\u2019 are set to a non-empty string:<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; form = cgi.FieldStorage()\r\n&gt;&gt;&gt; if \"name\" not in form or \"addr\" not in form:\r\n\tprint(\"&lt;H1&gt;Error&lt;\/H1&gt;\")\r\n\tprint(\"Please fill in the name and addr fields.\")\r\n\treturn\r\n&gt;&gt;&gt; print(\"&lt;p&gt;name:\", form[\"name\"].value)\r\n&gt;&gt;&gt; print(\"&lt;p&gt;addr:\", form[\"addr\"].value)<\/pre>\n<p>&#8230;further form processing here&#8230;<\/p>\n<p>The fields that we access through form[key] are instances of FieldStorage.<\/p>\n<p>If there\u2019s more than one field with the same name, this retrieves a list of instances of FieldStorage or MiniField Storage.<\/p>\n<p>The getlist() method returns a list of values:<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; value = form.getlist(\"username\")\r\n&gt;&gt;&gt; usernames = \",\".join(value)<\/pre>\n<p>Consider the situation when a field denotes an uploaded file.<\/p>\n<p>When we access the value using the attribute \u2018value\u2019, or using the method getvalue(), it reads the entire file in memory as bytes.<\/p>\n<p>To test for an uploaded file, we can test either the \u2018filename\u2019 attribute or the \u2018file\u2019 attribute.<\/p>\n<p>Then, we can read the data from the \u2018file\u2019 attribute before it automatically closes as a part of the garbage collection of the FieldStorage instance:<\/p>\n<pre class=\"EnlighterJSRAW\">&gt;&gt;&gt; fileitem = form[\"userfile\"]\r\n&gt;&gt;&gt; if fileitem.file:\r\n\t#It's an uploaded file; count lines\r\n\tlinecount = 0\r\n&gt;&gt;&gt; while True:\r\n\tline = fileitem.file.readline()\r\n\tif not line: break\r\n\tlinecount = linecount + 1<\/pre>\n<p>We can also use a FieldStorage object in a with-statement. It automatically closes it when done.<\/p>\n<p>If an error occurs obtaining an uploaded file\u2019s contents, like if a user interrupts form submission pressing Back or Cancel, it sets the \u2018done\u2019 attribute for the object for the field to -1.<\/p>\n<p>It is possible that the user uploads multiple files from one field. Then, the item is a dictionary-like FieldStorage item.<\/p>\n<p>We can test its \u2018type\u2019 attribute to determine this. This should be multipart\/form-data. We can recursively iterate over it like the top-level form object.<\/p>\n<p>When a user submits a form in the old format- as a query string, this makes the items instances of MiniFieldStorage.<\/p>\n<p>This makes the attributes \u2018list\u2019, \u2018file\u2019, and \u2018filename\u2019 attributes equal to None.<\/p>\n<p>Forms submitted through POST also have a query string holding both FieldStorage and MiniFieldStorage items.<\/p>\n<h3>Functions of Python CGI Programming<\/h3>\n<p>For more control over your CGI programming in Python, you can use the following functions:<\/p>\n<p><strong>1. cgi.parse(fp=None, environ=os.environ, keep_blank_values=False, strict_parsing=False)<\/strong><\/p>\n<p>This will parse a query in the environment. We can also make it do so from a file, the default for which is sys.stdin.<\/p>\n<p><strong>2. cgi.parse_qs(qs, keep_blank_values=False, strict_parsing=False)<\/strong><\/p>\n<p>While this is deprecated, Python maintains it for backward compatibility. But we can use urllib.parse.parse_qs() instead.<\/p>\n<p><strong>3. cgi.parse_qsl(qs, keep_blank_values=False, strict_parsing=False)<\/strong><\/p>\n<p>This is deprecated too, and is maintained for backwards compatibility. You may use urllib.parse.parse_qsl() instead.<\/p>\n<p><strong>4. cgi.parse_multipart(<span style=\"color: inherit;font-size: inherit\">fp,<\/span><span style=\"color: inherit;font-size: inherit\">pdict<\/span>) in Python<\/strong><\/p>\n<p>This function will parse input of type multipart\/form-data for file uploads.<\/p>\n<p>The first argument takes the input file, and the second takes a dictionary holding other parameters in the Content-Type header.<\/p>\n<p><strong>5. cgi.parse_header(string) in Python<\/strong><\/p>\n<p>parse_header() passes a MIME header into a main value and into a dictionary of parameters.<\/p>\n<p><strong>6. cgi.test() in Python<\/strong><\/p>\n<p>This function is a test CGI script, and we can use it as the main program. It will write minimal HTTP headers and formats.<\/p>\n<p><strong>7. cgi.print_environ() in Python<\/strong><\/p>\n<p>This formats the shell environment in HTML.<\/p>\n<p><strong>8. cgi.print_form(form) in Python<\/strong><\/p>\n<p>This function formats a form in HTML.<\/p>\n<p><strong>9. cgi.print_directory() in Python<\/strong><\/p>\n<p>This will format the current directory in HTML.<\/p>\n<p><strong>10. cgi.print_environ_usage() in Python<\/strong><\/p>\n<p>This prints a list of all useful environment variables in HTML.<\/p>\n<p><strong>11. cgi.escape(s, quote=False) in Python<\/strong><\/p>\n<p>escape() will convert characters \u2018&lt;\u2019, \u2018&gt;\u2019, and \u2018&amp;\u2019 in the string \u2018s\u2019 to HTML-safe sequences. If you must display text holding such characters, you may use this in HTML.<\/p>\n<p>So, this was all on the Python CGI Programming tutorial. Hope you like our explanation<\/p>\n<h3>Python Interview Questions on CGI Programming<\/h3>\n<ol>\n<li>What is CGI Programming in Python?<\/li>\n<li>How to run a Python script in CGI?<\/li>\n<li>What should be the first line of any CGI Python script?<\/li>\n<li>Give the advantages and disadvantages of CGI programming in Python.<\/li>\n<li>How does CGI work in Python?<\/li>\n<\/ol>\n<h3>Conclusion<\/h3>\n<p>It&#8217;s time to wrap up.<\/p>\n<p>In this tutorial, we explored how the field storage class and CGI module help in simplifying data handling and debugging. It provides knowledge of how servers and scripts communicate, which is essential for mastering more advanced web development frameworks.<\/p>\n<p>Hence, we studied Python CGI Programming with the Python CGI Module. In addition, we discussed functions and architecture of CGI Programming in Python.<\/p>\n<p>Furthermore, if you have any queries, feel free to ask in the comment box.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This Python CGI Programming tutorial deals with the \u2018cgi\u2019 module, the support module for CGI scripts in Python. Moreover, we will discuss the functions of Python CGI Programming. So, let\u2019s begin the CGI Programming&#46;&#46;&#46;<\/p>\n","protected":false},"author":5,"featured_media":31019,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46],"tags":[2433,10333,10410],"class_list":["post-12906","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","tag-cgi-programming-in-python","tag-python","tag-python-cgi"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Python CGI Programming Tutorial - Python CGI Module &amp; Functions - DataFlair<\/title>\n<meta name=\"description\" content=\"Python CGI Programming Tutorial-What is CGI Programming in Python,Python CGI architecture, Python CGI Programming functions with example,Python CGI Module\" \/>\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-cgi-programming\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python CGI Programming Tutorial - Python CGI Module &amp; Functions - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Python CGI Programming Tutorial-What is CGI Programming in Python,Python CGI architecture, Python CGI Programming functions with example,Python CGI Module\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/python-cgi-programming\/\" \/>\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=\"2018-04-09T23:22:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-25T09:40:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/CGI-Programming-in-Python-1.jpg\" \/>\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\/jpeg\" \/>\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=\"6 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python CGI Programming Tutorial - Python CGI Module &amp; Functions - DataFlair","description":"Python CGI Programming Tutorial-What is CGI Programming in Python,Python CGI architecture, Python CGI Programming functions with example,Python CGI Module","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-cgi-programming\/","og_locale":"en_US","og_type":"article","og_title":"Python CGI Programming Tutorial - Python CGI Module &amp; Functions - DataFlair","og_description":"Python CGI Programming Tutorial-What is CGI Programming in Python,Python CGI architecture, Python CGI Programming functions with example,Python CGI Module","og_url":"https:\/\/data-flair.training\/blogs\/python-cgi-programming\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2018-04-09T23:22:24+00:00","article_modified_time":"2026-04-25T09:40:10+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/CGI-Programming-in-Python-1.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/python-cgi-programming\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/python-cgi-programming\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823"},"headline":"Python CGI Programming Tutorial &#8211; Python CGI Module &amp; Functions","datePublished":"2018-04-09T23:22:24+00:00","dateModified":"2026-04-25T09:40:10+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/python-cgi-programming\/"},"wordCount":1328,"commentCount":2,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/python-cgi-programming\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/CGI-Programming-in-Python-1.jpg","keywords":["CGI programming in Python","Python","Python CGI"],"articleSection":["Python Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/python-cgi-programming\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/python-cgi-programming\/","url":"https:\/\/data-flair.training\/blogs\/python-cgi-programming\/","name":"Python CGI Programming Tutorial - Python CGI Module &amp; Functions - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/python-cgi-programming\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/python-cgi-programming\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/CGI-Programming-in-Python-1.jpg","datePublished":"2018-04-09T23:22:24+00:00","dateModified":"2026-04-25T09:40:10+00:00","description":"Python CGI Programming Tutorial-What is CGI Programming in Python,Python CGI architecture, Python CGI Programming functions with example,Python CGI Module","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/python-cgi-programming\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/python-cgi-programming\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/python-cgi-programming\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/CGI-Programming-in-Python-1.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2018\/04\/CGI-Programming-in-Python-1.jpg","width":1200,"height":628,"caption":"CGI Programming in Python with Functions and Modules"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/python-cgi-programming\/#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":"Python CGI Programming Tutorial &#8211; Python CGI Module &amp; Functions"}]},{"@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\/7f83c342f5d1632d6f7b4b0b0f447823","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team creates expert-level guides on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our goal is to empower learners with easy-to-understand content. Explore our resources for career growth and practical learning.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam1\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/12906","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\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=12906"}],"version-history":[{"count":13,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/12906\/revisions"}],"predecessor-version":[{"id":147905,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/12906\/revisions\/147905"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/31019"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=12906"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=12906"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=12906"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}