{"id":12836,"date":"2020-11-24T18:34:45","date_gmt":"2020-11-25T02:34:45","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=12836"},"modified":"2023-12-01T04:04:57","modified_gmt":"2023-12-01T12:04:57","slug":"python-check-if-file-exists","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/python-check-if-file-exists\/","title":{"rendered":"Python: Check If a File Exists"},"content":{"rendered":"\n<p><em>The Python os.path.isdir() method checks if a directory exists. os.path.isfile() checks whether a file exists. Both of these methods are part of the Python os library.<\/em><\/p>\n\n\n\n<p>Checking whether a certain file or directory exists has a number of uses in Python. The os module includes three methods that you can use to check if a certain file or directory exists: <em>isfile()<\/em>, <em>isdir()<\/em>, and <em>exists()<\/em>.<\/p>\n\n\n\n<p>In this guide, we will discuss how you can check whether a certain file or directory exists using the <em>isfile()<\/em>, <em>isdir()<\/em>, and <em>exists()<\/em> methods in Python. We will explore a few examples of each of these methods in action to illustrate how they work.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">OS Refresher<\/h2>\n\n\n\n<p>Python\u2019s built-in <em>os module<\/em> allows you to access operating system functions in your code.<\/p>\n\n\n\n<p><em>Os<\/em> is a Python module, which means that before we use it we need to import the module into our code. We will only be using the module\u2019s <em>path point<\/em> functions to check whether certain files or directories exist. So, we only need to import the <em>os.path<\/em> module.<\/p>\n\n\n\n<p>We can do so using the <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 os.path<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Python Check if File Exists<\/h2>\n\n\n\n<p>The os.path.isfile() method checks if a file exists in Python. os.path.isfile() returns True or False, depending on whether that file can be found. This method returns False if you specify a directory as an argument.<\/p>\n\n\n\n<p>Here\u2019s the syntax for the <em>isfile()<\/em> method:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>os.path.isfile(path)<\/pre><\/div>\n\n\n\n<p>isfile() accepts one argument: the name of the file whose existence you want to verify. &#8220;path&#8221; represents the file path in the above example. Let\u2019s go through an example to show how you can check if a file exists in Python.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Check if File Exists Python Example<\/h3>\n\n\n\n<p>Say that we are creating a program that analyzes data on avocado yields for a local farm. Before conducting our analysis, we want to check whether we have a processed file in place in which we can store our analyzed data. If the file does not exist, we will need to create it.<\/p>\n\n\n\n<p>Our processed file should be called <em>.\/final_data.csv<\/em>. We can use the following code to check whether this file exists:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>import os\n\nos.path.isfile('.\/final_data.csv')<\/pre><\/div>\n\n\n\n<p>If our file path exists, our code will return the <a href=\"https:\/\/careerkarma.com\/blog\/python-boolean\/\">Python boolean value<\/a> True. If there is no existing file (and therefore no existing file path), our code will return <em>False<\/em>.<\/p>\n\n\n\n<p>The <em>isfile()<\/em> method only works for files; it does not work for directories. If you use <em>isfile()<\/em> to check whether a directory exists, the method will return <em>False<\/em>. Here\u2019s an example of <em>isfile()<\/em> being used to check if a directory exists:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>import os\n\nos.path.isfile('.\/final_data_folder')<\/pre><\/div>\n\n\n\n<p>Our code returns: <em>False<\/em>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Python Check if Directory Exists<\/h2>\n\n\n\n<p>The Python os.path.isdir() method checks if a directory exists. It returns False if you specify a path to a file or a directory that does not exist. If a directory exists, isdir() returns True.<\/p>\n\n\n\n<p>Here\u2019s the syntax for the <em>isdir()<\/em> method:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>os.path.isdir(directory)<\/pre><\/div>\n\n\n\n<p>The <em>isdir()<\/em> method takes in one argument: the directory whose existence you want to verify. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Check if Directory Exists Python Example<\/h3>\n\n\n\n<p>Say that we want to check whether the folder <em>final_data_folder<\/em> exists. We plan to use this directory to store the data processed by our avocado data analysis program.<\/p>\n\n\n\n<p>We could use the following code to check if this directory exists:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>import os\n\nos.path.isdir('.\/final_data_folder')<\/pre><\/div>\n\n\n\n<p>Our directory does exist, so our program returns <em>True<\/em>.<\/p>\n\n\n\n<p>If you try to use <em>isdir()<\/em> to check whether a file exists, the method will return <em>False<\/em>. This is similar to how the <em>isfile()<\/em> method responds to directories.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Checking If a Certain File or Directory Exists in Python<\/h2>\n\n\n\n<p>In Python, you can check whether certain files or directories exist using the <em>isfile()<\/em> and <em>isdir()<\/em> methods, respectively.<\/p>\n\n\n\n<p>However, if you use <em>isfile()<\/em> to check if a certain directory exists, the method will return <em>False<\/em>. Likewise, if you use if <em>isdir()<\/em> to check whether a certain file exists, the method returns <em>False<\/em>.<\/p>\n\n\n\n<p>But what if you want to check whether a certain file <em>or<\/em> directory exists? You can use the <em>os.path.exists()<\/em> method to perform this action.<\/p>\n\n\n\n<p>Say that you want to know whether the file <em>.\/final_data_2020.csv<\/em> exists. You could use the following code to check if that file exists:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>import os\n\nos.path.exists('.\/final_data_2020.csv')<\/pre><\/div>\n\n\n\n<p>Our file exists, so our program returns <em>True<\/em>.<\/p>\n\n\n\n<p>In addition, if we want to check whether the directory <em>.\/final_data<\/em> exists, we can use <em>os.path.exists()<\/em> for this as well, as follows:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>import os\n\nos.path.exists('.\/final_data')<\/pre><\/div>\n\n\n\n<p>Our <em>final_data<\/em> directory exists in our example, so our code returns <em>True<\/em>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>When you\u2019re working in Python, you may want to check whether certain files and\/or directories exist before allowing your program to proceed. The <em>isfile()<\/em>, <em>isdir()<\/em> and <em>exists()<\/em> methods allow you to do so.<\/p>\n\n\n\n<p>The following table summarizes when to use what function in Python you should use to determine whether certain files or directories exist:<\/p>\n\n\n\n<table class=\"wp-block-table course-info-table\"><tbody><tr><td><strong>Function<\/strong><\/td><td><strong>What the Function Determines<\/strong><\/td><\/tr><tr><td>os.path.isfile(\u2018file\u2019)<\/td><td>Does \u2018file\u2019 exist?<\/td><\/tr><tr><td>os.path.isdir(\u2018directory\u2019)<\/td><td>Does \u2018directory\u2019 exist?<\/td><\/tr><tr><td>os.path.exists(\u2018file\/directory\u2019)<\/td><td>Does \u2018file\/directory\u2019 exist?<\/td><\/tr><\/tbody><\/table>\n\n\n\n<p>Remember that before using these functions, you first need to import Python\u2019s os path point module. To do so, use the following code: <em>import os.path<\/em>.<\/p>\n\n\n\n<p>Read our <a href=\"https:\/\/careerkarma.com\/blog\/how-to-learn-python\/\">How to Learn Python<\/a> article for advice on how you can acquire the skills you need to master Python.<\/p>\n","protected":false},"excerpt":{"rendered":"The Python os.path.isdir() method checks if a directory exists. os.path.isfile() checks whether a file exists. Both of these methods are part of the Python os library. Checking whether a certain file or directory exists has a number of uses in Python. The os module includes three methods that you can use to check if a&hellip;","protected":false},"author":240,"featured_media":12837,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[16578],"tags":[],"class_list":{"0":"post-12836","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.4 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Check If a File Exists in Python | Career Karma<\/title>\n<meta name=\"description\" content=\"Checking if a certain file or directory exists is useful in Python. Learn how to check if a file or directory exists on Career Karma.\" \/>\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-check-if-file-exists\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python: Check If a File Exists\" \/>\n<meta property=\"og:description\" content=\"Checking if a certain file or directory exists is useful in Python. Learn how to check if a file or directory exists on Career Karma.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/python-check-if-file-exists\/\" \/>\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=\"2020-11-25T02:34:45+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T12:04:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/turned-on-silver-imac-with-might-mouse-and-keyboard-930530.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"667\" \/>\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=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-check-if-file-exists\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-check-if-file-exists\\\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"Python: Check If a File Exists\",\"datePublished\":\"2020-11-25T02:34:45+00:00\",\"dateModified\":\"2023-12-01T12:04:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-check-if-file-exists\\\/\"},\"wordCount\":887,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-check-if-file-exists\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/turned-on-silver-imac-with-might-mouse-and-keyboard-930530.jpg\",\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-check-if-file-exists\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-check-if-file-exists\\\/\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-check-if-file-exists\\\/\",\"name\":\"How to Check If a File Exists in Python | Career Karma\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-check-if-file-exists\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-check-if-file-exists\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/turned-on-silver-imac-with-might-mouse-and-keyboard-930530.jpg\",\"datePublished\":\"2020-11-25T02:34:45+00:00\",\"dateModified\":\"2023-12-01T12:04:57+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"Checking if a certain file or directory exists is useful in Python. Learn how to check if a file or directory exists on Career Karma.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-check-if-file-exists\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-check-if-file-exists\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-check-if-file-exists\\\/#primaryimage\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/turned-on-silver-imac-with-might-mouse-and-keyboard-930530.jpg\",\"contentUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/03\\\/turned-on-silver-imac-with-might-mouse-and-keyboard-930530.jpg\",\"width\":1000,\"height\":667},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/python-check-if-file-exists\\\/#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: Check If a File Exists\"}]},{\"@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\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/james-gallagher-150x150.jpg\",\"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":"How to Check If a File Exists in Python | Career Karma","description":"Checking if a certain file or directory exists is useful in Python. Learn how to check if a file or directory exists on Career Karma.","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-check-if-file-exists\/","og_locale":"en_US","og_type":"article","og_title":"Python: Check If a File Exists","og_description":"Checking if a certain file or directory exists is useful in Python. Learn how to check if a file or directory exists on Career Karma.","og_url":"https:\/\/careerkarma.com\/blog\/python-check-if-file-exists\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-11-25T02:34:45+00:00","article_modified_time":"2023-12-01T12:04:57+00:00","og_image":[{"width":1000,"height":667,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/turned-on-silver-imac-with-might-mouse-and-keyboard-930530.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":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/python-check-if-file-exists\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/python-check-if-file-exists\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"Python: Check If a File Exists","datePublished":"2020-11-25T02:34:45+00:00","dateModified":"2023-12-01T12:04:57+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-check-if-file-exists\/"},"wordCount":887,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-check-if-file-exists\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/turned-on-silver-imac-with-might-mouse-and-keyboard-930530.jpg","articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/python-check-if-file-exists\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/python-check-if-file-exists\/","url":"https:\/\/careerkarma.com\/blog\/python-check-if-file-exists\/","name":"How to Check If a File Exists in Python | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-check-if-file-exists\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-check-if-file-exists\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/turned-on-silver-imac-with-might-mouse-and-keyboard-930530.jpg","datePublished":"2020-11-25T02:34:45+00:00","dateModified":"2023-12-01T12:04:57+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"Checking if a certain file or directory exists is useful in Python. Learn how to check if a file or directory exists on Career Karma.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/python-check-if-file-exists\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/python-check-if-file-exists\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/python-check-if-file-exists\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/turned-on-silver-imac-with-might-mouse-and-keyboard-930530.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/03\/turned-on-silver-imac-with-might-mouse-and-keyboard-930530.jpg","width":1000,"height":667},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/python-check-if-file-exists\/#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: Check If a File Exists"}]},{"@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\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","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\/12836","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=12836"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/12836\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/12837"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=12836"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=12836"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=12836"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}