{"id":15907,"date":"2021-01-07T00:10:40","date_gmt":"2021-01-07T08:10:40","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=15907"},"modified":"2023-12-01T04:07:52","modified_gmt":"2023-12-01T12:07:52","slug":"python-move-file","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/python-move-file\/","title":{"rendered":"Python Move File: A Complete Guide"},"content":{"rendered":"\n<p><em>The Python shutil.move() method moves a file to another location on your computer. This method is part of the shutil model, which you must import before using this method.<\/em><\/p>\n\n\n\n<p>Moving files is a common operation in Python programs. For instance, say you are creating a program that generates files. You may want to move all existing files from a folder somewhere else, to make room for the new files you want to create.<\/p>\n\n\n\n<p>That\u2019s where the <em>shutil.move()<\/em> function comes in. The <em>shutil.move()<\/em> function allows you to move a file from one folder to another on your system. This tutorial will discuss, with reference to examples, how you can use the <em>shutil.move()<\/em> function to move your code.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Python shutil<\/h2>\n\n\n\n<p>The shutil module provides a wide range of high-level operations that you can execute on files. Unlike the os library, shutil comes with functions that can be executed on collections of files.<\/p>\n\n\n\n<p>For this tutorial, we\u2019re going to focus on the <em>shutil.move()<\/em> function, which allows us to move a file using Python.<\/p>\n\n\n\n<p>Before we explore the <em>move()<\/em> function, we must first import the shutil library into our code. We can do so using this <a href=\"https:\/\/careerkarma.com\/blog\/python-import\/\">Python import statement<\/a>:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>import shutil<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Python Move File<\/h2>\n\n\n\n<p>The <em>shutil.move()<\/em> function moves a file on your computer. This method accepts the file path of the file you want to move and the new file path as arguments.<\/p>\n\n\n\n<p>The syntax for this function is as follows:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>shutil.move(source, destination)<\/pre><\/div>\n\n\n\n<p><em>shutil.move()<\/em> accepts two parameters, which are:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>source path<\/strong>: The file path of the file you want to move.<\/li><li><strong>destination path<\/strong>: The file path where you want to move your file.<\/li><\/ul>\n\n\n\n<p>The <em>move()<\/em> function returns the path of the file you have moved.<\/p>\n\n\n\n<p>If your destination matches another file, the existing file will be overwritten.<\/p>\n\n\n\n<p>The file paths you specify can be either absolute or relative.<\/p>\n\n\n\n<p>Absolute file paths are complete paths that lead directly to a file (i.e. <em>\/home\/career_karma\/file.txt<\/em>). Relative file path refers to a location that is relative to the directory in which your Python program is being run (i.e. <em>file.txt<\/em>).<\/p>\n\n\n\n<p>If you specify a destination directory that does not exist, a new directory will be created.<\/p>\n\n\n\n<p>The os library contains the <a href=\"https:\/\/careerkarma.com\/blog\/python-rename-file\/\"><em>os.rename()<\/em> method<\/a> which is often used to rename files. This method can also move files. But, the shutil method was designed specifically for moving files. The syntax <em>shutil.move()<\/em> is easier to understand than <em>os.rename()<\/em> if you are moving a file. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Python Move File Examples<\/h2>\n\n\n\n<p>Let\u2019s explore a few examples of how to use the shutil.move() function.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Move a Single File<\/h3>\n\n\n\n<p>Suppose we have a file called <em>raw_data.csv<\/em> which we want to move into a directory called <em>data<\/em> in our current working directory. We could do so using this code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>import shutil\n\nsource = &quot;raw_data.csv&quot;\ndestination = &quot;data&quot;\n\nnew_path = shutil.move(source, destination)\n\nprint(new_path)<\/pre><\/div>\n\n\n\n<p>Our code returns:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>data\/raw_data.csv<\/pre><\/div>\n\n\n\n<p>First, we have imported the shutil library. Next, we have declared two <a href=\"https:\/\/careerkarma.com\/blog\/python-variables\/\">Python variables<\/a>. The <em>source<\/em> variable stores the name of the file we want to move. Our <em>destination<\/em> variable stores the name of the directory in which we want to move our file.<\/p>\n\n\n\n<p>In this example, we have specified relative file paths for our source and destination. This means that the file <em>raw_data.csv<\/em> and the directory <em>data<\/em> refer to those in the same directory as our Python file. If our Python file is stored in <em>\/home\/career_karma\/program<\/em>, the file and directory we reference will be the ones stored in that directory.<\/p>\n\n\n\n<p>Next, we use <em>shutil.move()<\/em> to move our file. We assign the result of the operation \u2014 the path of the moved file \u2014 to the variable <em>new_path<\/em>. Next, we print out the value of <em>new_path<\/em>, which returns the path of our new file.<\/p>\n\n\n\n<p>We&#8217;ve successfully moved a file in Python.<\/p>\n\n\n\n<p><strong>Note:<\/strong> The same syntax we used to move a file can also be used to move a folder.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Move a File and Change Its Name<\/h3>\n\n\n\n<p>The <em>shutil.move()<\/em> function allows you to change the name of a file once it has been moved.<\/p>\n\n\n\n<p>Suppose we want to move <em>raw_data.csv<\/em> into a folder called <em>data<\/em>, and change the name of our file to <em>raw_data_2019.csv<\/em>. We could do so using this code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>import shutil\n\nsource = &quot;raw_data.csv&quot;\ndestination = &quot;data\/raw_data_2019.csv&quot;\n\nnew_path = shutil.move(source, destination)\n\nprint(new_path)<\/pre><\/div>\n\n\n\n<p>Our code returns:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>data\/raw_data_2019.csv<\/pre><\/div>\n\n\n\n<p>When we specify the destination for our new file, we also specify a new name for our file. We specify the destination <em>data\/raw_data_2019.csv. <\/em>This means that when our file is moved, it will be moved into the <em>data<\/em> directory. The new file will be given the name <em>raw_datra_2019.csv<\/em>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Move Multiple Files<\/h3>\n\n\n\n<p>We can also use the <em>shutil.move()<\/em> function to move multiple files. To do so, we are also going to reference the os library. We can use the <em>os.listdir()<\/em> method to get a list of files in a directory.<\/p>\n\n\n\n<p>Suppose we want to move all the files in the <em>\/home\/career_karma\/data<\/em> directory to a new directory called <em>\/home\/career_karma\/old_data<\/em>. The <em>data<\/em> directory contains the following files:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\/home\/career_karma\/data\/data.csv<\/li><li>\/home\/career_karma\/data\/old_data.csv<\/li><\/ul>\n\n\n\n<p>We could do so using this code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>import shutil\nimport os\n\nsource = &quot;\/home\/career_karma\/data&quot;\ndestination = &quot;\/home\/career_karma\/old_data&quot;\n\nfiles = os.listdir(source)\n\nfor file in files:\n\tnew_path = shutil.move(f&quot;{source}\/{file}&quot;, destination)\n\tprint(new_path)<\/pre><\/div>\n\n\n\n<p>Our code returns:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>\/home\/career_karma\/old_data\/data.csv\n\/home\/career_karma\/old_data\/old_data.csv<\/pre><\/div>\n\n\n\n<p>Let\u2019s break down our code. First, we import the shutil and os libraries into our program. Then, we specify the absolute paths for the folder whose contents we want to move. We also specify the path for the destination in which the contents of our folder should be moved.<\/p>\n\n\n\n<p>Next, we use <em>os.listdir()<\/em> to retrieve a list of all the files in the folder whose contents we want to move. We use a <a href=\"https:\/\/careerkarma.com\/blog\/python-for-loop\/\">Python <em>for<\/em> loop<\/a> to iterate through each of these files. Then, we use <em>shutil.move()<\/em> to move each individual file to our <em>destination<\/em> folder.<\/p>\n\n\n\n<p>In our <em>move()<\/em> function, we use an f string to specify the full file path for the file we want to move. Our code displays the file path of our newly-moved files.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>The <em>shutil.move()<\/em> function moves a file from one location to another on your computer. You must specify the path of the file you want to move as well as the new path for the file.<\/p>\n\n\n\n<p>Do you want to learn more about coding in Python? Check out our <a href=\"https:\/\/careerkarma.com\/blog\/how-to-learn-python\/\">How to Learn Python guide<\/a>. You&#8217;ll find expert advice on how to learn Python in this guide. Our guide also contains a list of top learning resources to help you expand your knowledge.<\/p>\n","protected":false},"excerpt":{"rendered":"The Python shutil.move() method moves a file to another location on your computer. This method is part of the shutil model, which you must import before using this method. Moving files is a common operation in Python programs. For instance, say you are creating a program that generates files. You may want to move all&hellip;","protected":false},"author":240,"featured_media":15908,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[16578],"tags":[],"class_list":{"0":"post-15907","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-python"},"acf":{"post_sub_title":"","sprint_id":"","query_class":"Python","school_sft":"","parent_sft":"","school_privacy_policy":"","has_review":null,"is_sponser_post":"","is_guest_post":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.0 (Yoast SEO v27.0) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Python Move File: A Complete Guide: A Complete Guide | Career Karma<\/title>\n<meta name=\"description\" content=\"The shutil.move() method allows you to move a file or folder in Python. On Career Karma, learn how to use the shutil.move() method.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/careerkarma.com\/blog\/python-move-file\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python Move File: A Complete Guide\" \/>\n<meta property=\"og:description\" content=\"The shutil.move() method allows you to move a file or folder in Python. On Career Karma, learn how to use the shutil.move() method.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/python-move-file\/\" \/>\n<meta property=\"og:site_name\" content=\"Career Karma\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/facebook.com\/careerkarmaapp\" \/>\n<meta property=\"article:published_time\" content=\"2021-01-07T08:10:40+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T12:07:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/white-rolling-armchair-beside-table-1957478.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1020\" \/>\n\t<meta property=\"og:image:height\" content=\"681\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"James Gallagher\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@career_karma\" \/>\n<meta name=\"twitter:site\" content=\"@career_karma\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"James Gallagher\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-move-file\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-move-file\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"Python Move File: A Complete Guide\",\"datePublished\":\"2021-01-07T08:10:40+00:00\",\"dateModified\":\"2023-12-01T12:07:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-move-file\/\"},\"wordCount\":1080,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-move-file\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/white-rolling-armchair-beside-table-1957478.jpg\",\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-move-file\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-move-file\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/python-move-file\/\",\"name\":\"Python Move File: A Complete Guide: A Complete Guide | Career Karma\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-move-file\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-move-file\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/white-rolling-armchair-beside-table-1957478.jpg\",\"datePublished\":\"2021-01-07T08:10:40+00:00\",\"dateModified\":\"2023-12-01T12:07:52+00:00\",\"author\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"The shutil.move() method allows you to move a file or folder in Python. On Career Karma, learn how to use the shutil.move() method.\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-move-file\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-move-file\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-move-file\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/white-rolling-armchair-beside-table-1957478.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/white-rolling-armchair-beside-table-1957478.jpg\",\"width\":1020,\"height\":681},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-move-file\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\/\/careerkarma.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python\",\"item\":\"https:\/\/careerkarma.com\/blog\/python\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Python Move File: A Complete Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\",\"url\":\"https:\/\/careerkarma.com\/blog\/\",\"name\":\"Career Karma\",\"description\":\"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/careerkarma.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\",\"name\":\"James Gallagher\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg\",\"caption\":\"James Gallagher\"},\"description\":\"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.\",\"url\":\"https:\/\/careerkarma.com\/blog\/author\/jamesgallagher\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Python Move File: A Complete Guide: A Complete Guide | Career Karma","description":"The shutil.move() method allows you to move a file or folder in Python. On Career Karma, learn how to use the shutil.move() method.","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:\/\/careerkarma.com\/blog\/python-move-file\/","og_locale":"en_US","og_type":"article","og_title":"Python Move File: A Complete Guide","og_description":"The shutil.move() method allows you to move a file or folder in Python. On Career Karma, learn how to use the shutil.move() method.","og_url":"https:\/\/careerkarma.com\/blog\/python-move-file\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2021-01-07T08:10:40+00:00","article_modified_time":"2023-12-01T12:07:52+00:00","og_image":[{"width":1020,"height":681,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/white-rolling-armchair-beside-table-1957478.jpg","type":"image\/jpeg"}],"author":"James Gallagher","twitter_card":"summary_large_image","twitter_creator":"@career_karma","twitter_site":"@career_karma","twitter_misc":{"Written by":"James Gallagher","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/python-move-file\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/python-move-file\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"Python Move File: A Complete Guide","datePublished":"2021-01-07T08:10:40+00:00","dateModified":"2023-12-01T12:07:52+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-move-file\/"},"wordCount":1080,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-move-file\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/white-rolling-armchair-beside-table-1957478.jpg","articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/python-move-file\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/python-move-file\/","url":"https:\/\/careerkarma.com\/blog\/python-move-file\/","name":"Python Move File: A Complete Guide: A Complete Guide | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-move-file\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-move-file\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/white-rolling-armchair-beside-table-1957478.jpg","datePublished":"2021-01-07T08:10:40+00:00","dateModified":"2023-12-01T12:07:52+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"The shutil.move() method allows you to move a file or folder in Python. On Career Karma, learn how to use the shutil.move() method.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/python-move-file\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/python-move-file\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/python-move-file\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/white-rolling-armchair-beside-table-1957478.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/05\/white-rolling-armchair-beside-table-1957478.jpg","width":1020,"height":681},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/python-move-file\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/careerkarma.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Python","item":"https:\/\/careerkarma.com\/blog\/python\/"},{"@type":"ListItem","position":3,"name":"Python Move File: A Complete Guide"}]},{"@type":"WebSite","@id":"https:\/\/careerkarma.com\/blog\/#website","url":"https:\/\/careerkarma.com\/blog\/","name":"Career Karma","description":"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/careerkarma.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94","name":"James Gallagher","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","caption":"James Gallagher"},"description":"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.","url":"https:\/\/careerkarma.com\/blog\/author\/jamesgallagher\/"}]}},"_links":{"self":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/15907","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/users\/240"}],"replies":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/comments?post=15907"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/15907\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/15908"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=15907"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=15907"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=15907"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}