{"id":19307,"date":"2020-07-10T16:47:13","date_gmt":"2020-07-10T23:47:13","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=19307"},"modified":"2023-12-01T03:54:25","modified_gmt":"2023-12-01T11:54:25","slug":"python-send-email","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/python-send-email\/","title":{"rendered":"Python Send Email: A Guide"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">How to Send an Email Using Python <\/h2>\n\n\n\n<p>Python is a language of many features. It can be used for data analysis, web development, and more. That\u2019s not all, Python has a hidden feature: you can use it to send emails. This means that you can send password reset emails, forgot password emails, user notifications, and whatever other emails you want to send, from a Python program.<br><\/p>\n\n\n\n<p>In this guide, we\u2019re going to discuss how to send an email using Python. We\u2019ll walk through the email and smtplib libraries, how they work, and write an example program to send an email.&nbsp;<br><\/p>\n\n\n\n<p>Without further ado, let\u2019s get started!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Sending Emails Using Python<\/h2>\n\n\n\n<p>When you send an email from a computer program, your program will send the message using a protocol called Simple Mail Transfer Protocol (SMTP). This protocol is used by email services and clients around the world to send messages.&nbsp;<br><\/p>\n\n\n\n<p>To send an email from a computer program, you\u2019ll need to have an SMTP server. You can set one up by yourself, but you don\u2019t always have to do this. Services like Gmail and Outlook provide SMTP services so you can use your existing email accounts to send an email.<br><\/p>\n\n\n\n<p>For this guide, we\u2019re going to assume that you are sending an email from Gmail\u2019s SMTP server. You can find out more about their SMTP server in the Gmail official documentation. To find out whether your email provider supports SMTP, search online for \u2018[name of your provider] SMTP credentials\u2019.<br><\/p>\n\n\n\n<p>We\u2019ve got three steps to follow to send an email:<br><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Configure our SMTP connection<\/li>\n\n\n\n<li>Create a message object<\/li>\n\n\n\n<li>Send the message over SMTP<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Configuring an SMTP Connection<\/h2>\n\n\n\n<p>To start, let\u2019s set up our SMTP connection. We can do this using a library called smtplib which provides all the code we need to manage the connection. Thanks to this library it only takes a few lines of code to send an email.<br><\/p>\n\n\n\n<p>Start by importing the smtplib library into your code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>import smtplib<\/pre><\/div>\n\n\n\n<p>We\u2019ve now got to set up variables which store the credentials for our SMTP server. Storing these values in variables will help us maintain the readability of our code. Here are the variables we\u2019re going to use:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>sender = 'test@careerkarma.com'\npassword = '123456'\nserver = 'smtp.gmail.com'\nport = 465<\/pre><\/div>\n\n\n\n<p>This code contains all the configuration we need to create an SMTP connection. Now that we have this set up, we can log into our SMTP server:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>server = smtplib.SMTP_SSL(server, port)\nserver.login(sender, password)<\/pre><\/div>\n\n\n\n<p>Our code creates an SSL connection to our SMTP server. This means that we are using Secure Socket Layer (SSL) to connect to our server. SSL is more secure than a traditional connection and as a result it has become a standard on SMTP servers.<br><\/p>\n\n\n\n<p>Our SMTP connection is now configured!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Create a Message Object<\/h2>\n\n\n\n<p>Our code doesn\u2019t do very much right now: it definitely does not send an email. That\u2019s because we have not yet created a message object. Let\u2019s do this by using the email library. While you can use smtplib to create a message object, the email library is more concise.<br><\/p>\n\n\n\n<p>Let\u2019s start by <a href=\"https:\/\/careerkarma.com\/blog\/python-import\/\">importing<\/a> the necessary email packages:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>from email.mime.multipart import MIMEMultipart\nfrom email.mime.text import MIMEText<\/pre><\/div>\n\n\n\n<p>With these libraries imported, we can create our message object:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>message = MIMEMultipart()\nbody = 'This is an email sent from Python!'\nmessage['From'] = sender\nmessage['To'] = 'test@careerkarma.com'\nmessage['Subject'] = 'This is a test email'\nmessage.attach(MIMEText(body, 'plain'))<\/pre><\/div>\n\n\n\n<p>We\u2019ve started by initializing an object called \u2018message\u2019. This object references the MIMEMultipart class from the email library. We\u2019ve then specified the body of our email and the sender, recipient, and subject.<br><\/p>\n\n\n\n<p>Our final line of code attaches the body of our message to our email.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Send the Message<\/h2>\n\n\n\n<p>Now all that&#8217;s left to do is send our message:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>server.send_message(message)<\/pre><\/div>\n\n\n\n<p>When we run all of our code together, an email is sent! An email with the title &#8216;This is a test email&#8217; is sent from test@careerkarma.com to test@careerkarma.com.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Reading a Template from a File<\/h2>\n\n\n\n<p>The body of our email is only one line long. This means that it\u2019s more practical for us to write our email body inside Python. Most emails are longer than this, and so it\u2019s better to create a template which stores the text for a particular email.<br><\/p>\n\n\n\n<p>We\u2019ll start by creating a file called email.txt and pasting in the following contents:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>Hello ${NAME},\nThis is a test email!\nThanks,\nCareer Karma<\/pre><\/div>\n\n\n\n<p>This template contains a variable called \u201cNAME\u201d, which is enclosed within curly braces ({}) and is preceded by a dollar sign ($). This variable will be substituted with the name of the recipient later in our code.<br><\/p>\n\n\n\n<p>We\u2019re now going to have to read this template into our code. We can do this by creating a class called read_email which uses the open() method to read our file.<br><\/p>\n\n\n\n<p>We will import the Template object from the string library. We\u2019ll use this object to create an object that can be read by our email. Paste in the following line of code at the top of your Python program:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>from string import Template<\/pre><\/div>\n\n\n\n<p>Below all of your import statements, paste in this code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>def read_email():\n\twith open('email.txt', 'r') as file:\n\t\tcontents = file.read()\n\treturn Template(contents)<\/pre><\/div>\n\n\n\n<p>This function will read the file called \u201cemail.txt\u201d into the variable \u201ccontents\u201d. Its value is then converted into a Template object using the Template method from the \u201cstring\u201d library. You can learn more about reading files in our <a href=\"https:\/\/careerkarma.com\/blog\/python-read-file\/\">Python read file tutorial<\/a>.<br><\/p>\n\n\n\n<p>Change the following line of code in your program:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>body = 'This is an email sent from Python!'<\/pre><\/div>\n\n\n\n<p>To use this code:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>email_content = read_email()\nbody = email_content.substitute(NAME=\"Test\")<\/pre><\/div>\n\n\n\n<p>This code calls the <code>read_email()<\/code> function in our code to read the contents of the \u201cemail.txt\u201d file. Then, the value of NAME inside our email template is substituted with the value \u201cTest\u201d. Together, our code looks like this:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>import smtplib\nfrom email.mime.multipart import MIMEMultipart\nfrom email.mime.text import MIMEText\nfrom string import Template\ndef read_email():\n\twith open('email.txt', 'r') as file:\n\t\tcontents = file.read()\n\treturn Template(contents)\nsender = 'test@careerkarma.com'\npassword = '123456\"\nserver = 'smtp.gmail.com'\nport = 465\nserver = smtplib.SMTP_SSL(server, port)\nserver.login(sender, password)\nmessage = MIMEMultipart()\nemail_content = read_email()\nbody = email_content.substitute(NAME=\"Test\")\nmessage['From'] = sender\nmessage['To'] = 'test@careerkarma.com'\nmessage['Subject'] = 'This is a test email'\nmessage.attach(MIMEText(body, 'plain'))<\/pre><\/div>\n\n\n\n<p>When you run this program, substituting in your SMTP server credentials, an email will be sent. You\u2019ve just written a program to send an email.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>Sending an email in Python doesn\u2019t have to be difficult. Without the use of a template, sending an email only takes a few lines of code. The email and smtplib modules do most of the heavy-lifting. With that said, you can use the email module more extensively to create templates for your emails that can substitute values.<br><\/p>\n\n\n\n<p>Are you up for a challenge? Change the program from above to support sending emails to multiple recipients. Hint: You\u2019ll want to use a for loop to send these emails.<br><\/p>\n\n\n\n<p>Now you\u2019re ready to start sending emails in Python like an expert!<\/p>\n","protected":false},"excerpt":{"rendered":"How to Send an Email Using Python Python is a language of many features. It can be used for data analysis, web development, and more. That\u2019s not all, Python has a hidden feature: you can use it to send emails. This means that you can send password reset emails, forgot password emails, user notifications, and&hellip;","protected":false},"author":240,"featured_media":19308,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[16578],"tags":[],"class_list":{"0":"post-19307","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":"","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 Send Email: A Guide | Career Karma<\/title>\n<meta name=\"description\" content=\"The email and smtplib libraries can be used to send emails in Python. On Career Karma, learn how to execute a Python send email operation.\" \/>\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-send-email\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python Send Email: A Guide\" \/>\n<meta property=\"og:description\" content=\"The email and smtplib libraries can be used to send emails in Python. On Career Karma, learn how to execute a Python send email operation.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/python-send-email\/\" \/>\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-07-10T23:47:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T11:54:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/onlineprinters-oIpJ8koLx_s-unsplash.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1020\" \/>\n\t<meta property=\"og:image:height\" content=\"680\" \/>\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-send-email\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-send-email\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"Python Send Email: A Guide\",\"datePublished\":\"2020-07-10T23:47:13+00:00\",\"dateModified\":\"2023-12-01T11:54:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-send-email\/\"},\"wordCount\":1043,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-send-email\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/onlineprinters-oIpJ8koLx_s-unsplash.jpg\",\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-send-email\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-send-email\/\",\"url\":\"https:\/\/careerkarma.com\/blog\/python-send-email\/\",\"name\":\"Python Send Email: A Guide | Career Karma\",\"isPartOf\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-send-email\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-send-email\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/onlineprinters-oIpJ8koLx_s-unsplash.jpg\",\"datePublished\":\"2020-07-10T23:47:13+00:00\",\"dateModified\":\"2023-12-01T11:54:25+00:00\",\"author\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"The email and smtplib libraries can be used to send emails in Python. On Career Karma, learn how to execute a Python send email operation.\",\"breadcrumb\":{\"@id\":\"https:\/\/careerkarma.com\/blog\/python-send-email\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/careerkarma.com\/blog\/python-send-email\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-send-email\/#primaryimage\",\"url\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/onlineprinters-oIpJ8koLx_s-unsplash.jpg\",\"contentUrl\":\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/onlineprinters-oIpJ8koLx_s-unsplash.jpg\",\"width\":1020,\"height\":680},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/careerkarma.com\/blog\/python-send-email\/#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 Send Email: A 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 Send Email: A Guide | Career Karma","description":"The email and smtplib libraries can be used to send emails in Python. On Career Karma, learn how to execute a Python send email operation.","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-send-email\/","og_locale":"en_US","og_type":"article","og_title":"Python Send Email: A Guide","og_description":"The email and smtplib libraries can be used to send emails in Python. On Career Karma, learn how to execute a Python send email operation.","og_url":"https:\/\/careerkarma.com\/blog\/python-send-email\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-07-10T23:47:13+00:00","article_modified_time":"2023-12-01T11:54:25+00:00","og_image":[{"width":1020,"height":680,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/onlineprinters-oIpJ8koLx_s-unsplash.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-send-email\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/python-send-email\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"Python Send Email: A Guide","datePublished":"2020-07-10T23:47:13+00:00","dateModified":"2023-12-01T11:54:25+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-send-email\/"},"wordCount":1043,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-send-email\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/onlineprinters-oIpJ8koLx_s-unsplash.jpg","articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/python-send-email\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/python-send-email\/","url":"https:\/\/careerkarma.com\/blog\/python-send-email\/","name":"Python Send Email: A Guide | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/python-send-email\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/python-send-email\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/onlineprinters-oIpJ8koLx_s-unsplash.jpg","datePublished":"2020-07-10T23:47:13+00:00","dateModified":"2023-12-01T11:54:25+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"The email and smtplib libraries can be used to send emails in Python. On Career Karma, learn how to execute a Python send email operation.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/python-send-email\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/python-send-email\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/python-send-email\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/onlineprinters-oIpJ8koLx_s-unsplash.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/07\/onlineprinters-oIpJ8koLx_s-unsplash.jpg","width":1020,"height":680},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/python-send-email\/#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 Send Email: A 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\/19307","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=19307"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/19307\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/19308"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=19307"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=19307"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=19307"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}