{"id":3338,"date":"2024-08-15T09:49:55","date_gmt":"2024-08-15T09:49:55","guid":{"rendered":"https:\/\/www.infobip.com\/developers\/?p=3338"},"modified":"2024-10-02T10:27:15","modified_gmt":"2024-10-02T10:27:15","slug":"co-ordinating-a-gift-exchange-with-flask-and-infobip-part-1","status":"publish","type":"post","link":"https:\/\/www.infobip.com\/developers\/blog\/co-ordinating-a-gift-exchange-with-flask-and-infobip-part-1","title":{"rendered":"Co-ordinating a gift exchange with Flask and Infobip (Part 1)"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">This is the first part of a five-part guide that shows you how to build a web app to co-ordinate a gift exchange. We&#8217;ll use Flask, a Python web framework, and Infobip&#8217;s Python SDK.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this part of the guide, we build an app where users can enter their names and phone numbers.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can follow along with the code at the <a href=\"https:\/\/github.com\/infobip-community\/gift-exchange-with-flask\">project repository on GitHub<\/a>, where each step of this guide corresponds to <a href=\"https:\/\/github.com\/infobip-community\/gift-exchange-with-flask\/branches\">a branch in the repo<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>An Infobip account (a trial one works perfectly fine)<\/li>\n\n\n\n<li>A little Python knowledge<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Setup<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">First, create a new folder in your file system called \u2018gift-exchange-app\u2019. This folder will be your working directory for the duration of this guide, and when you run terminal commands, you\u2019ll do so from within this directory.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In a terminal window, navigate to this directory. Create and activate a virtual environment to keep all your project dependencies isolated from the rest of your machine:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>python3 -m venv .venv\nsource .venv\/bin\/activate<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">We\u2019ll be building a tiny Flask application with a single page. On that page there are two input boxes (to enter a phone number and a name) and a button. When you enter a phone number and a name and click the button, that information is stored to register a new participant in the gift exchange.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To do this, we\u2019ll need to install the following Python packages:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pip install Flask&nbsp;\npip install infobip-api-python-sdk<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Flask lets us build and serve an application using Python, and we\u2019ll need the Infobip SDK to write Pythonic code to send SMS messages.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Creating our app.py<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When you build a Flask app, you usually put the main entry point for that app in a file or package called <code>app.py<\/code>. Our app is going to be a single file of Python, so we\u2019ll create a file called <code>app.py<\/code> in the top level of our working directory.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gift-exchange-app\/\n    app.py<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If you like, you can also run the following command from your working directory to keep a record of your currently installed packages:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pip freeze &gt; requirements.txt<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">That will result in a directory structure like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gift-exchange-app\/\n    app.py\n    requirements.txt<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Open up your <code>app.py<\/code> file in your code editor of choice, and add the following lines:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from flask import Flask\n\napp = Flask(__name__)\n\n@app.route('\/')\ndef index():\n    return 'hello world'<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Now run <code>flask run<\/code> from the command line in your working directory. By default, this will serve your Flask app at <a href=\"https:\/\/localhost:5000\">https:\/\/localhost:5000<\/a>, and show you a very simple page with the words \u2018hello world\u2019 on it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Adding an HTML template<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Next, we\u2019ll add some HTML for our app to serve us. Flask requires its HTML files to be in a particular place, so create a new directory underneath your working directory called <code>templates<\/code>. Within that directory, add a file called <code>app.html<\/code>, and add the following code to it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;html>\n   &lt;head>\n       &lt;title>Gift Exchange App&lt;\/title>\n       &lt;link rel=\"icon\" type=\"image\/favicon\" href=\"https:\/\/avatars.githubusercontent.com\/u\/1288491\">\n       &lt;link href=\"https:\/\/fonts.googleapis.com\/css2?family=Lora:wght@600&amp;display=swap\" rel=\"stylesheet\">\n   &lt;\/head>\n   &lt;body>\n       &lt;form action=\"{{ url_for('index')}}\" method=\"POST\">\n           &lt;p>&lt;input type=\"text\" name=\"name\" placeholder=\"Enter your name here\">&lt;\/p>\n           &lt;p>&lt;input type=\"tel\" name=\"number\" placeholder=\"Enter your phone number here\">&lt;\/p>\n           &lt;p>&lt;button type=\"submit\">&lt;p>Add me to the gift exchange!&lt;\/p>&lt;\/button>&lt;\/p>\n       &lt;\/form>\n   &lt;\/body>\n&lt;\/html>\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Your directory structure now looks like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gift-exchange-app\/\n    app.py\n    requirements.txt\n    templates\/\n        app.html<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>&lt;head&gt;<\/code> section contains some information to help the browser display our page, such as the title and icon. We also use this to set a font for our page\u2019s content, which can be anything you like.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the <code>&lt;body&gt;<\/code> section, there are the input boxes and the button component that live within an HTML <code>&lt;form&gt;<\/code>. When that button is clicked, it sends a POST request to our index page. To handle this kind of request, we\u2019ll need to update the Python function that Flask runs when we access our index page.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In your <code>app.py<\/code> file, update your imports line to include <code>render_template<\/code> and <code>request<\/code> from Flask:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from flask import Flask, render_template, request<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;Update your <code>index()<\/code> function as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@app.route('\/', methods=&#91;'GET', 'POST'])\ndef index():\n   if request.method == 'GET':\n       pass\n   else:\n       name = request.form.get('name')\n       number = request.form.get('number')\n       print(f'You clicked the button with name {name} and number {number}!')\n   return render_template('app.html')<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Here, we\u2019ve updated the <code>@app.route<\/code> decorator to specify that this URL should accept both GET and POST requests, and in the body of the function we use an <code>if<\/code> statement to handle the two types of request differently. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With a POST request, we&#8217;ll run through the <code>else<\/code> statement in our code and hit the print statement. When we run our Flask app from a terminal window, and click our button in the browser, we\u2019ll see the results of that print statement in that terminal window.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The last change here is that the function now serves our new HTML, instead of just a string saying \u2018hello world\u2019.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now, run <code>flask run<\/code> again. Your app now serves a page at <a href=\"https:\/\/localhost:5000\">https:\/\/localhost:5000<\/a> that has the input boxes and the button, and when you fill the boxes and click that button, you should see the text containing the data that you input appear in your terminal.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you like, you can also add some CSS styling to your HTML so that the page looks shiny and cool.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Next time<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In the next part, we&#8217;ll create a database and store our names and phone numbers!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is the first part of a five-part guide [&hellip;]<\/p>\n","protected":false},"author":53,"featured_media":3111,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","footnotes":""},"categories":[28,12,13],"tags":[],"coauthors":[285],"class_list":["post-3338","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog-post","category-guide","category-python"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Co-ordinating a gift exchange with Flask and Infobip (Part 1) - Infobip Developers Hub<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.infobip.com\/developers\/blog\/co-ordinating-a-gift-exchange-with-flask-and-infobip-part-1\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Co-ordinating a gift exchange with Flask and Infobip (Part 1) - Infobip Developers Hub\" \/>\n<meta property=\"og:description\" content=\"This is the first part of a five-part guide [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.infobip.com\/developers\/blog\/co-ordinating-a-gift-exchange-with-flask-and-infobip-part-1\" \/>\n<meta property=\"og:site_name\" content=\"Infobip Developers Hub\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/infobip\/\" \/>\n<meta property=\"article:published_time\" content=\"2024-08-15T09:49:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-10-02T10:27:15+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.infobip.com\/developers\/wp-content\/uploads\/2024\/02\/flask2.png\" \/>\n\t<meta property=\"og:image:width\" content=\"694\" \/>\n\t<meta property=\"og:image:height\" content=\"451\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Eli Holderness\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@InfobipDev\" \/>\n<meta name=\"twitter:site\" content=\"@InfobipDev\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Eli Holderness\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.infobip.com\/developers\/blog\/co-ordinating-a-gift-exchange-with-flask-and-infobip-part-1#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.infobip.com\/developers\/blog\/co-ordinating-a-gift-exchange-with-flask-and-infobip-part-1\"},\"author\":{\"name\":\"Eli Holderness\",\"@id\":\"https:\/\/www.infobip.com\/developers\/#\/schema\/person\/2d3f818bd258646bc997a3ec04146bbd\"},\"headline\":\"Co-ordinating a gift exchange with Flask and Infobip (Part 1)\",\"datePublished\":\"2024-08-15T09:49:55+00:00\",\"dateModified\":\"2024-10-02T10:27:15+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.infobip.com\/developers\/blog\/co-ordinating-a-gift-exchange-with-flask-and-infobip-part-1\"},\"wordCount\":752,\"publisher\":{\"@id\":\"https:\/\/www.infobip.com\/developers\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.infobip.com\/developers\/blog\/co-ordinating-a-gift-exchange-with-flask-and-infobip-part-1#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.infobip.com\/developers\/wp-content\/uploads\/2024\/02\/flask2.png\",\"articleSection\":[\"Blog Post\",\"Guide\",\"Python\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.infobip.com\/developers\/blog\/co-ordinating-a-gift-exchange-with-flask-and-infobip-part-1\",\"url\":\"https:\/\/www.infobip.com\/developers\/blog\/co-ordinating-a-gift-exchange-with-flask-and-infobip-part-1\",\"name\":\"Co-ordinating a gift exchange with Flask and Infobip (Part 1) - Infobip Developers Hub\",\"isPartOf\":{\"@id\":\"https:\/\/www.infobip.com\/developers\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.infobip.com\/developers\/blog\/co-ordinating-a-gift-exchange-with-flask-and-infobip-part-1#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.infobip.com\/developers\/blog\/co-ordinating-a-gift-exchange-with-flask-and-infobip-part-1#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.infobip.com\/developers\/wp-content\/uploads\/2024\/02\/flask2.png\",\"datePublished\":\"2024-08-15T09:49:55+00:00\",\"dateModified\":\"2024-10-02T10:27:15+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.infobip.com\/developers\/blog\/co-ordinating-a-gift-exchange-with-flask-and-infobip-part-1#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.infobip.com\/developers\/blog\/co-ordinating-a-gift-exchange-with-flask-and-infobip-part-1\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.infobip.com\/developers\/blog\/co-ordinating-a-gift-exchange-with-flask-and-infobip-part-1#primaryimage\",\"url\":\"https:\/\/www.infobip.com\/developers\/wp-content\/uploads\/2024\/02\/flask2.png\",\"contentUrl\":\"https:\/\/www.infobip.com\/developers\/wp-content\/uploads\/2024\/02\/flask2.png\",\"width\":694,\"height\":451,\"caption\":\"A blog cover image showing the Python logo on the left and the Infobip logo on the right.\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.infobip.com\/developers\/blog\/co-ordinating-a-gift-exchange-with-flask-and-infobip-part-1#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.infobip.com\/developers\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Co-ordinating a gift exchange with Flask and Infobip (Part 1)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.infobip.com\/developers\/#website\",\"url\":\"https:\/\/www.infobip.com\/developers\/\",\"name\":\"Infobip Developers Hub\",\"description\":\"Build meaningful customer relationships across any channel\",\"publisher\":{\"@id\":\"https:\/\/www.infobip.com\/developers\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.infobip.com\/developers\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.infobip.com\/developers\/#organization\",\"name\":\"Infobip Developers Hub\",\"url\":\"https:\/\/www.infobip.com\/developers\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.infobip.com\/developers\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.infobip.com\/developers\/wp-content\/uploads\/2023\/03\/Infobip_logo_favicon.png\",\"contentUrl\":\"https:\/\/www.infobip.com\/developers\/wp-content\/uploads\/2023\/03\/Infobip_logo_favicon.png\",\"width\":696,\"height\":696,\"caption\":\"Infobip Developers Hub\"},\"image\":{\"@id\":\"https:\/\/www.infobip.com\/developers\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/infobip\/\",\"https:\/\/x.com\/InfobipDev\",\"https:\/\/www.youtube.com\/channel\/UCUPSTy53VecI5GIir3J3ZbQ\",\"https:\/\/github.com\/infobip-community\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.infobip.com\/developers\/#\/schema\/person\/2d3f818bd258646bc997a3ec04146bbd\",\"name\":\"Eli Holderness\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.infobip.com\/developers\/#\/schema\/person\/image\/e3fd4a8aa6b78952d057f724bcf1dff0\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/2261319993db9030e1328c712ee20e4aaedf2c9cb8e4379ae8af57f2c877d5f4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/2261319993db9030e1328c712ee20e4aaedf2c9cb8e4379ae8af57f2c877d5f4?s=96&d=mm&r=g\",\"caption\":\"Eli Holderness\"},\"description\":\"Developer advocate, conference speaker &amp; professional nerd. Likes maths, knitting, and cats.\",\"url\":\"https:\/\/www.infobip.com\/developers\/blog\/author\/eli\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Co-ordinating a gift exchange with Flask and Infobip (Part 1) - Infobip Developers Hub","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:\/\/www.infobip.com\/developers\/blog\/co-ordinating-a-gift-exchange-with-flask-and-infobip-part-1","og_locale":"en_US","og_type":"article","og_title":"Co-ordinating a gift exchange with Flask and Infobip (Part 1) - Infobip Developers Hub","og_description":"This is the first part of a five-part guide [&hellip;]","og_url":"https:\/\/www.infobip.com\/developers\/blog\/co-ordinating-a-gift-exchange-with-flask-and-infobip-part-1","og_site_name":"Infobip Developers Hub","article_publisher":"https:\/\/www.facebook.com\/infobip\/","article_published_time":"2024-08-15T09:49:55+00:00","article_modified_time":"2024-10-02T10:27:15+00:00","og_image":[{"width":694,"height":451,"url":"https:\/\/www.infobip.com\/developers\/wp-content\/uploads\/2024\/02\/flask2.png","type":"image\/png"}],"author":"Eli Holderness","twitter_card":"summary_large_image","twitter_creator":"@InfobipDev","twitter_site":"@InfobipDev","twitter_misc":{"Written by":"Eli Holderness","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.infobip.com\/developers\/blog\/co-ordinating-a-gift-exchange-with-flask-and-infobip-part-1#article","isPartOf":{"@id":"https:\/\/www.infobip.com\/developers\/blog\/co-ordinating-a-gift-exchange-with-flask-and-infobip-part-1"},"author":{"name":"Eli Holderness","@id":"https:\/\/www.infobip.com\/developers\/#\/schema\/person\/2d3f818bd258646bc997a3ec04146bbd"},"headline":"Co-ordinating a gift exchange with Flask and Infobip (Part 1)","datePublished":"2024-08-15T09:49:55+00:00","dateModified":"2024-10-02T10:27:15+00:00","mainEntityOfPage":{"@id":"https:\/\/www.infobip.com\/developers\/blog\/co-ordinating-a-gift-exchange-with-flask-and-infobip-part-1"},"wordCount":752,"publisher":{"@id":"https:\/\/www.infobip.com\/developers\/#organization"},"image":{"@id":"https:\/\/www.infobip.com\/developers\/blog\/co-ordinating-a-gift-exchange-with-flask-and-infobip-part-1#primaryimage"},"thumbnailUrl":"https:\/\/www.infobip.com\/developers\/wp-content\/uploads\/2024\/02\/flask2.png","articleSection":["Blog Post","Guide","Python"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.infobip.com\/developers\/blog\/co-ordinating-a-gift-exchange-with-flask-and-infobip-part-1","url":"https:\/\/www.infobip.com\/developers\/blog\/co-ordinating-a-gift-exchange-with-flask-and-infobip-part-1","name":"Co-ordinating a gift exchange with Flask and Infobip (Part 1) - Infobip Developers Hub","isPartOf":{"@id":"https:\/\/www.infobip.com\/developers\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.infobip.com\/developers\/blog\/co-ordinating-a-gift-exchange-with-flask-and-infobip-part-1#primaryimage"},"image":{"@id":"https:\/\/www.infobip.com\/developers\/blog\/co-ordinating-a-gift-exchange-with-flask-and-infobip-part-1#primaryimage"},"thumbnailUrl":"https:\/\/www.infobip.com\/developers\/wp-content\/uploads\/2024\/02\/flask2.png","datePublished":"2024-08-15T09:49:55+00:00","dateModified":"2024-10-02T10:27:15+00:00","breadcrumb":{"@id":"https:\/\/www.infobip.com\/developers\/blog\/co-ordinating-a-gift-exchange-with-flask-and-infobip-part-1#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.infobip.com\/developers\/blog\/co-ordinating-a-gift-exchange-with-flask-and-infobip-part-1"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.infobip.com\/developers\/blog\/co-ordinating-a-gift-exchange-with-flask-and-infobip-part-1#primaryimage","url":"https:\/\/www.infobip.com\/developers\/wp-content\/uploads\/2024\/02\/flask2.png","contentUrl":"https:\/\/www.infobip.com\/developers\/wp-content\/uploads\/2024\/02\/flask2.png","width":694,"height":451,"caption":"A blog cover image showing the Python logo on the left and the Infobip logo on the right."},{"@type":"BreadcrumbList","@id":"https:\/\/www.infobip.com\/developers\/blog\/co-ordinating-a-gift-exchange-with-flask-and-infobip-part-1#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.infobip.com\/developers\/"},{"@type":"ListItem","position":2,"name":"Co-ordinating a gift exchange with Flask and Infobip (Part 1)"}]},{"@type":"WebSite","@id":"https:\/\/www.infobip.com\/developers\/#website","url":"https:\/\/www.infobip.com\/developers\/","name":"Infobip Developers Hub","description":"Build meaningful customer relationships across any channel","publisher":{"@id":"https:\/\/www.infobip.com\/developers\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.infobip.com\/developers\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.infobip.com\/developers\/#organization","name":"Infobip Developers Hub","url":"https:\/\/www.infobip.com\/developers\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.infobip.com\/developers\/#\/schema\/logo\/image\/","url":"https:\/\/www.infobip.com\/developers\/wp-content\/uploads\/2023\/03\/Infobip_logo_favicon.png","contentUrl":"https:\/\/www.infobip.com\/developers\/wp-content\/uploads\/2023\/03\/Infobip_logo_favicon.png","width":696,"height":696,"caption":"Infobip Developers Hub"},"image":{"@id":"https:\/\/www.infobip.com\/developers\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/infobip\/","https:\/\/x.com\/InfobipDev","https:\/\/www.youtube.com\/channel\/UCUPSTy53VecI5GIir3J3ZbQ","https:\/\/github.com\/infobip-community"]},{"@type":"Person","@id":"https:\/\/www.infobip.com\/developers\/#\/schema\/person\/2d3f818bd258646bc997a3ec04146bbd","name":"Eli Holderness","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.infobip.com\/developers\/#\/schema\/person\/image\/e3fd4a8aa6b78952d057f724bcf1dff0","url":"https:\/\/secure.gravatar.com\/avatar\/2261319993db9030e1328c712ee20e4aaedf2c9cb8e4379ae8af57f2c877d5f4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2261319993db9030e1328c712ee20e4aaedf2c9cb8e4379ae8af57f2c877d5f4?s=96&d=mm&r=g","caption":"Eli Holderness"},"description":"Developer advocate, conference speaker &amp; professional nerd. Likes maths, knitting, and cats.","url":"https:\/\/www.infobip.com\/developers\/blog\/author\/eli"}]}},"_links":{"self":[{"href":"https:\/\/www.infobip.com\/developers\/wp-json\/wp\/v2\/posts\/3338","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.infobip.com\/developers\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.infobip.com\/developers\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.infobip.com\/developers\/wp-json\/wp\/v2\/users\/53"}],"replies":[{"embeddable":true,"href":"https:\/\/www.infobip.com\/developers\/wp-json\/wp\/v2\/comments?post=3338"}],"version-history":[{"count":12,"href":"https:\/\/www.infobip.com\/developers\/wp-json\/wp\/v2\/posts\/3338\/revisions"}],"predecessor-version":[{"id":3391,"href":"https:\/\/www.infobip.com\/developers\/wp-json\/wp\/v2\/posts\/3338\/revisions\/3391"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.infobip.com\/developers\/wp-json\/wp\/v2\/media\/3111"}],"wp:attachment":[{"href":"https:\/\/www.infobip.com\/developers\/wp-json\/wp\/v2\/media?parent=3338"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.infobip.com\/developers\/wp-json\/wp\/v2\/categories?post=3338"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.infobip.com\/developers\/wp-json\/wp\/v2\/tags?post=3338"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.infobip.com\/developers\/wp-json\/wp\/v2\/coauthors?post=3338"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}