<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Pravallika Kambhampati on Medium]]></title>
        <description><![CDATA[Stories by Pravallika Kambhampati on Medium]]></description>
        <link>https://medium.com/@pravallika13kambhampati?source=rss-e27bcc306a5f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*hA4SFS7epQBnOfQG.jpg</url>
            <title>Stories by Pravallika Kambhampati on Medium</title>
            <link>https://medium.com/@pravallika13kambhampati?source=rss-e27bcc306a5f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 01:50:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pravallika13kambhampati/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Learning the great “Gatsby JS” — a tutorial for beginners — Part I]]></title>
            <link>https://medium.com/analytics-vidhya/learning-the-great-gatsby-js-a-tutorial-for-beginners-part-i-1735307c7bc7?source=rss-e27bcc306a5f------2</link>
            <guid isPermaLink="false">https://medium.com/p/1735307c7bc7</guid>
            <category><![CDATA[gatsbyjs]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Pravallika Kambhampati]]></dc:creator>
            <pubDate>Sat, 29 Aug 2020 16:07:51 GMT</pubDate>
            <atom:updated>2020-08-31T05:05:56.606Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*mS5L6wvjhgBYZFZS-2NaxQ.png" /><figcaption>source: <a href="https://stevencotterill.com/">https://stevencotterill.com/</a> ‘s article</figcaption></figure><h3>Learning the great “Gatsby JS” — a tutorial for beginners — Part I</h3><p>So, here we are. Before we get started, I know it’s been a while since I sat down and wrote something meaningful, but yeah, here we are anyways.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/529/1*2PWJcnKvW9xavUJXbofClQ.png" /></figure><p>All this time, I’ve been exploring various different frameworks, libraries both in JavaScript and Python. I’ve watched tons of video tutorials and made a bunch of projects by myself too. I had just started learning React, the amazing library everyone’s talking about. Anyways, I stumbled across various other frameworks and libraries that were based off React primarily. And somehow I went to the docs of this purply <a href="https://www.gatsbyjs.com/"><strong><em>official site of Gatsby.js</em></strong></a> and I did something very new. Instead of jumping into video tutorials like I always do, I gave a shot at the <a href="https://www.gatsbyjs.com/tutorial/">beginner-tutorial-docs</a> that they offered and I jumped right at it.</p><p>Before, we get any further, I’m assuming you are familiar with React, even if you aren’t hang on, Gatsby.js is very familiar to React, you might pick a thing or two along the way about React too 😄</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*307A26cAvTSMPMsA_W31WA.png" /><figcaption>The landing page at <a href="https://www.gatsbyjs.com/">https://www.gatsbyjs.com/</a></figcaption></figure><p>So, why Gatsby.js ? What is so unique about this React-based framework? A simple google search would spin off something like this:</p><blockquote><strong>Gatsby</strong> is a React-based, GraphQL powered, static site generator.</blockquote><h3>What is a static site?</h3><p>Since the dawn of the modern web, performance has been a key consideration when designing a website or a web app. When a website requires <strong><em>no server interaction</em></strong><em> </em>whatsoever, what is hosted on the web is served to a user as is, this is referred to as a static site.</p><p>Or simply, It can be a site which contains fixed content. Several use cases including event listings, portfolio pages and blogs &amp; many more.</p><h3><strong>Why a static site?</strong></h3><p>Why’d you wanna prefer a static site anyways ? In case of dynamic websites (requiring client-server interaction) because of challenges including slow load-time, security flaws, and hosting costs amongst others. The absence of a server mitigates these risks. Static Site Generators are tools used develop static sites, effectively and efficiently.</p><h3>And finally how does GatsbyJs work ?</h3><p>What separates Gatsby.js from the others is the way it handles data. In Gatsby.js, as we are not concerned about the server, data could come from several types of files in the project — markdown, CSV, JSON, or it could come from external services like NetlifyCMS, Medium, or even CMS like Drupal and Wordpress. And to make this possible Gatsby.js has a very cool <strong><em>plugin architecture, </em></strong>which would really come in handy as we go along.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gkMlnLqi6hYJ83KwGcxFFw.png" /><figcaption>source: <a href="https://github.com/gatsbyjs/gatsby">https://github.com/gatsbyjs/gatsby</a></figcaption></figure><h3>Oh, but what about GraphQL ?</h3><p>When you are building sites with Gatsby, you can access your data using this query language called “GraphQL” GraphQL allows you to declaratively express your data needs. This is done with queries, queries are the representation of the data you need. A query looks like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e1893d31d4d31e5cf1636ce6537896bd/href">https://medium.com/media/e1893d31d4d31e5cf1636ce6537896bd/href</a></iframe><p>Which will return,</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fe85d1420fde8f92cba165b3ffbf15ab/href">https://medium.com/media/fe85d1420fde8f92cba165b3ffbf15ab/href</a></iframe><p>Notice how the query signature exactly matches the returned JSON signature. This is possible because in GraphQL, you query against a schema that is the representation of your available data. Don’t worry about where the schema comes from right now, Gatsby takes care of organizing all of your data for you and making it discoverable with a tool called GraphiQL. GraphiQL is a UI that lets you 1) run queries against your data in the browser, and 2) dig into the structure of data available to you through a data type explorer.</p><p>Now, we’re all set! Let’s dive in !!!</p><h3>Prerequisites &amp; Environment Set up</h3><ul><li>Knowledge of HTML, CSS, and JavaScript is required with a focus on ES6 Syntax and JavaScript Classes.</li><li>Basic knowledge of React and GraphQL is also of advantage.</li></ul><h4>Check if the following things are installed,</h4><ul><li><a href="https://www.gatsbyjs.com/tutorial/part-zero/#install-nodejs-for-your-appropriate-operating-system">Node</a></li><li><a href="https://www.gatsbyjs.com/tutorial/part-zero/#install-git">Git</a></li></ul><p>To make Gatsby sites easily, let’s install <strong>the Gatsby CLI</strong></p><p>npm install -g gatsby-cli</p><p>Alright, we’re all set now!</p><h3>Creating our first Gatsby Site!</h3><p>Open up an editor of your choice and fire up the terminal. We’ll use the starter template that is provided to us through the CLI.</p><ol><li>Getting started :</li></ol><p>Type the following command into the terminal</p><p>gatsby new hello-world https://www.github.com/gatsby/gatsby-starter-hello-world</p><blockquote>Note: <strong><em>hello-world</em></strong> is an arbitary name, it’s basically your name, you are free to choose the title of your choice.</blockquote><p>This is will bring up a bunch of folders and files into your directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/202/1*WzKM4dJ_M4YITMRkcnirtw.png" /></figure><blockquote>Note: the .prettierignore, .prettierrc are present here because I have an extension called <a href="https://prettier.io/"><strong>Prettier</strong></a> installed in my VSCode, to make my js files look “prettier”</blockquote><p>If you are familiar with React, you’ll find the similarites in the structure of the project. And the fact that we usually only work with the src folder.</p><p>2. Change into this directory</p><p>cd hello-world</p><p>3. Starting the developer server</p><p>gatsby develop</p><p>This command would start the local development server in our machine. You’ll be able to see and interact with your new site here, just you do with React app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*VaqhEVhY6O8W-bzNrSFb1Q.png" /><figcaption>Your terminal would look something like this</figcaption></figure><p>As suggested, let’s check out <a href="https://localhost:8000/">https://localhost:8000/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/361/1*XiP72FzQwswix0FEbv94xQ.png" /></figure><p>Wondering how <strong><em>“Hello world!” </em></strong>is being displayed ? This is because of the index.js file that lies in the pages folder of src directory of your project hello-world. To make this visible, try changing the index.js file and see for yourself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/466/1*_wS1NfSUTUcRz4dzC-wKPA.png" /><figcaption>hello-world&gt;src&gt;pages&gt;index.js</figcaption></figure><p>And there it is! 👯 Your very first Gatsby site, up and running in your local host.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*aWRKtsKDF9y8RWLvYohImQ.jpeg" /></figure><p>Next, we’ll look into detail how to customise our pages.</p><h3><strong>Using page components:</strong></h3><p>Previously we saw that the index.js was resided inside the pages folder. Any react component that is present inside src/pages/*.js will become a page!</p><p>Let’s create a new page, by adding a new file src/pages/about.js !</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/475/1*aVzxm5oTzSTdnXPC5y_pzg.png" /></figure><p>Now navigate to <strong><em>https://localhost:8000/about</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/364/1*XeBF6f9tXw6J61-gQtb0Aw.png" /></figure><p>I know, it’s that simple yet very efficient.</p><p>Well, you could ask me, all this is cool but <strong><em>what about styling</em></strong> ?</p><h3><strong>Styling in Gatsby:</strong></h3><p>To add your css files in Gatsby all you gotta do is,</p><p>Create the css file in a folder, if you want to, it’s totally upto you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/501/1*bDPXzWZsniepc6EMH47yQQ.png" /></figure><p>To make this css work it’s magic, you gotta do a bit more, for Gatsby to know this css file exists you gotta create a new file gatsby-browser.js in the root of the project. And then add the following code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/461/1*psfe8UORe4an9XD-sTNEIg.png" /></figure><p>Now, restart the development server and go to the local host!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/296/1*hrMg6bX0_8L0f1a92VT32w.png" /></figure><p>Yass, there are many other ways to style like CSS modules, CSS-in-JS etc., you can try them all :D</p><h3>Plugins in Gatsby :</h3><p>A plugin simply adds or modifies a functionality in a very simple and straight forward way. There are hundred of plugins made for Gatsby that are available on their <a href="https://www.gatsbyjs.com/plugins/">site</a> and are maintained by the community members. And you make one too.</p><p>For this section, Let’s install and implement a Gatsby plugin for Typography.js.</p><ol><li>Create a new site:</li></ol><p>gatsby new plugins-and-data https:/github.com/gatsbyjs/gatsby-starter-hello-world</p><p>then cd into it</p><p>cd plugins-and-data</p><p>2. Now, let’s install the plugin, for this I’d like to use the “Kirkham” themed, typography and nice CSS-in-JS, “<a href="https://emotion.sh/"><em>Emotion</em></a>”.</p><p>npm install --save gatsby-plugin-typography typography react-typography typography-theme-kirkham gatsby-plugin-emotion @emotion/core</p><p>To let Gatsby know about this plugin, we shall mess with the gatsby-configure.js that’s present in the root of this project. Add the following lines.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/1*SU8EETP35we2qe8FojME7w.png" /></figure><p>Next, the typography.js needs a configuration file, we shall create a folder called “utils” in src and add a “typography.js” there. Then, add the following into that file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*oiTcKRpsUyeqZZFjN_Mu6A.png" /></figure><p>For this second site, let’s have a nice Layout component that can be used by all other pages. Create a folder “components” inside src and create a layout.js file. We’ll be using “Emotion” here. Add the following lines there.</p><p>To link various pages, we use Link from the core of Gatsby.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/631/1*ihRP8OkUjKI1ZCRLDQgtHg.png" /></figure><p>Then, the about.js,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/891/1*3jeR_fl9D_G4Ml-d83Muvg.png" /></figure><p>Next, the index.js,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1020/1*TWIYLcPtwhDirLM09q8S2w.png" /></figure><p>Now, let’s start the development server as usual using gatsby develop</p><p>And open up the local host at 8000 port!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pqZReu6iXzPGxKkqqC7k_Q.png" /></figure><p>Yass, there you go! Your first ever proper Gatsby site that uses a Plugin !!!!! 😍</p><p>If you’ve come this far, give yourself a pat on the back! You’ve learned something new today.</p><p>And that’s it for this post ! Next, we’ll check out how to use GraphQL to get our data!! And how to render markdown files as if they are HTML using a new plugin, should be exciting!!! Stay tunedd for <strong>Part II</strong> !!!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/460/1*wsGQmSCp_Kl9GSnjU9BGtQ.jpeg" /></figure><p><em>Did you like what you read?</em></p><p>Hold the “<strong>clap</strong>” button, please feel free to share your thoughts and ideas.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1735307c7bc7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/learning-the-great-gatsby-js-a-tutorial-for-beginners-part-i-1735307c7bc7">Learning the great “Gatsby JS” — a tutorial for beginners — Part I</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How quarantining and self-isolation can actually do you good ?]]></title>
            <link>https://medium.com/@pravallika13kambhampati/how-quarantining-and-self-isolation-can-actually-do-you-good-807849d7cfc7?source=rss-e27bcc306a5f------2</link>
            <guid isPermaLink="false">https://medium.com/p/807849d7cfc7</guid>
            <category><![CDATA[covid19]]></category>
            <category><![CDATA[quarantine]]></category>
            <category><![CDATA[beginner]]></category>
            <category><![CDATA[motivation]]></category>
            <category><![CDATA[pandemic]]></category>
            <dc:creator><![CDATA[Pravallika Kambhampati]]></dc:creator>
            <pubDate>Sun, 10 May 2020 19:21:37 GMT</pubDate>
            <atom:updated>2020-05-10T20:31:33.093Z</atom:updated>
            <content:encoded><![CDATA[<h3>How quarantining and self-isolation can actually do you good ?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*VZz0UfbFuxN_k90uitG53g.jpeg" /><figcaption><a href="https://unsplash.com/@unitednations">United Nations COVID-19 Response</a>/unsplash</figcaption></figure><p>We all have been in isolation for almost 8-weeks or so. Away from our friends, family, partners or colleages at work and maybe our own children. It was all unsettling at the beginning, almost terrifying for most of us to adjust to this new reality, but we somehow slowly managed to get accustomed to this new lifestyle that we never anticipated.</p><p>As countries struggle to battle the COVID-19, we really should take a moment to appreciate all the doctors, medical staff and the admins at the hostipals and even military &amp; police around the planet, who are working so hard to protect us and our loved ones during this pandemic, by risking their own lives.</p><p>As the days have been passing, it occured to me, ‘may be this isn’t so bad after all’, and I realised ‘I could do better than this’. The following are some of the few simple ways in which you can keep yourself going and have a healthy state-of-mind during this crisis.</p><blockquote>“Remember, the thoughts you think, along with your feelings and emotions, control your vibration. Your vibration is a magnet and everything that comes to you is steel” — Jodi Livon</blockquote><h4><strong><em>1 . Pick up a long lost hobby</em></strong></h4><p>It might sound simple, but it’s true: Hobbies have been shown to improve productivity and mental health. Mental health experts recommend that we spend part of the day on relaxing activities, like <em>meditation</em> or <em>connecting with relatives</em> <em>on a video chat</em>. But let me suggest another tool for you to add to your tool kit: Spend some time on your favorite hobbies. Or, pick up a new one. On the surface, hobbies can some times feel frivolous and easy to neglect — especially in times of crisis. But, I’ve discovered that our pastimes are an important way for us to connect with our passions and identity. Since hobbies inherently require learning new skills, they’re an important way for us to keep our minds sharp as we get older. So, go ahead and start working!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/634/1*osZBDj-cQdKZlnziiejT-A.jpeg" /></figure><h4>2. Try to read books, short stories or articles</h4><p>Yes, you read it right. Just like you’re reading this article, it would be wonderful for you to read that unfinished book or even better start a new book. Books have an unexplainable way to increase our creativity and imagination. Almost like an exercise. So, go ahead, pick up a genre and start reading a book. Trust me, there will be no turning back once you start to flip the pages.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S27i7UcerfsfTK6Gh3-7Ug.jpeg" /></figure><h4>3. Write a Journal</h4><p>Many of us are going through the second month of social distancing. Yes, I know it feels like we’ve been holed up in our homes for an eternity. The days are beginning to blend together. But a good practice is write a diary or a journal for that matter. Not only to keep record of the activities of the day but also it’ll help you reflect and process certain emotions in the intimate way.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ySKybsW0oSMQ_DvnjX6SzQ.jpeg" /></figure><h4>4. Stop binge watching</h4><p>Watching seasons of great shows surely does feel great, but as the time passes you start pushing your bedtime, resulting in tiredness and fatigue the next morning. Sitting for too long is not good for us, as you already know. If it’s so hard then give yourself a limited period of time to watch. Binge watching not only damages our eye-sight but also blocks all other potential activities we could be a part of. So, skip the <strong><em>next episode</em></strong> button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/634/1*1CNH5VziPqTpgGFAr5YDAA.jpeg" /></figure><h4>5. This is a pandemic. Not a productivity contest.</h4><p>If you don’t come out of this quarantine with:</p><p>— A new skill</p><p>— Your side hustle started</p><p>— More knowledge</p><p>— etc etc etc</p><p>You are doing just fine. We are going through a collective traumatic experience. Not everyone has the privilege of turning a pandemic into something fun or productive. You are not a failure if you are not using this as ‘<em>extra credit</em>’ time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*e8SEhP3rHekVoLhudgw5Dw.jpeg" /></figure><p><em>Did you like what you read ?</em></p><p>Hold the <strong>“clap” </strong>button, please feel free to share your insights, suggestions and ideas :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=807849d7cfc7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flask for (absolute) Beginners !]]></title>
            <link>https://medium.com/analytics-vidhya/flask-for-absolute-beginners-64ed0d81f19a?source=rss-e27bcc306a5f------2</link>
            <guid isPermaLink="false">https://medium.com/p/64ed0d81f19a</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[beginner]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[flask]]></category>
            <category><![CDATA[first-post]]></category>
            <dc:creator><![CDATA[Pravallika Kambhampati]]></dc:creator>
            <pubDate>Wed, 08 Apr 2020 21:58:56 GMT</pubDate>
            <atom:updated>2021-04-23T10:37:44.566Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Flask, web development, one drop at a time!" src="https://cdn-images-1.medium.com/max/438/1*0G5zu7CnXdMT9pGbYUTQLQ.png" /></figure><h3>Flask for (absolute) Beginners !</h3><p>If you’re a beginner like me who has no idea where to go after learning frontend technologies like HTML, CSS &amp; JavaScript or even Bootstrap and want to add some interactivity to your site, and have been googling <strong><em>“Flask Tutorials” </em></strong>,, then this article might be great to start off with :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*IJiT3tk15MDffQ1cionlTg.png" /></figure><p><strong># What is Flask? Is Flask better than Django ? How ?</strong></p><p>I’m sure you’ve come across <em>Django</em> while exploring <strong>Flask</strong>. Both Flask and Django are web frameworks essentially.</p><blockquote>Django is a full-stack web framework for Python, whereas Flask is a lightweight, and extensible WSGI-based Python web framework.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AYsCnonQgBwIf_K2lcQL3g.png" /></figure><p>Flask is quite easy learn and hence it is the most used Python web frameworks. It has a very<strong> minimalist</strong> approach unlike Django which loaded with batteries (which good for huge projects)!</p><p>It really depends on what you’re building, but for simple apps consider Flask :D</p><p>Hence, without any further ado, let’s dive in !!</p><h3>Requirements &amp; Setup</h3><ol><li>A Command Line or Terminal</li><li>A Text Editor (Atom, Sublime, etc..)</li><li>Installation of <a href="https://www.python.org/downloads/">Python</a></li><li>Installing flask using the following : pip install flask</li></ol><h3>Our very First Web App with Flask</h3><p>Let’s check if our setup is fine by writing out very first flask app. Create an app.py (or you can call it anything else, except flask.py as it will create conflicts) file in your project folder in your respective IDE.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/51bb28bba1223d26bdae8454c8bd5d38/href">https://medium.com/media/51bb28bba1223d26bdae8454c8bd5d38/href</a></iframe><p>By default, flask runs a local server 127.0.0.1:5000 at 5000 port number.</p><pre><strong>python app.py</strong></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*hK6UsFHxeNU8S-E6ax-25Q.png" /></figure><p>On opening the URL from your browser you will be able to see your first hello world program up and running on flask!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/440/1*Iy1jWSOo8Oo67ZZI3D1yaQ.png" /></figure><p>Congrats!! Your first flask web app up and running :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/455/1*tUmjtAaermB6Sami5MzSVw.jpeg" /></figure><p>Ofc, there’s a lot more you can do with flask! Like..</p><h3>Basic Routes</h3><p>We just saw how to create a web application with a single page (returned in the form of a string)</p><p>Let’s see how we can add multiple routes (multiple pages) with routing.</p><p>The key to this is in the <strong>@app.route decorator </strong>, the string parameter passed into the decorator determines the URL extension that will link to the function (a.k.a <strong>view</strong>).</p><p>Currently, our web page or domain is locally represented as <a href="http://127.0.0.1:5000/"><strong>http://127.0.0.1:5000/</strong></a><strong>. </strong>We use decorators to add on to this</p><p><strong>@app.route (“/some_page”) </strong>would eventually correspond to <a href="http://127.0.0.1:5000/"><strong>http://127.0.0.1:5000/</strong></a><strong>some_page</strong></p><p>Let’s look at this with an example!</p><p>Let’s write the following in our app.py the following code :</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e1a414abf74d7667a7602d6970521690/href">https://medium.com/media/e1a414abf74d7667a7602d6970521690/href</a></iframe><p>Once again running our app.py and we find…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/442/1*sIxqWzIlSxG0_wOYrR9QSg.png" /></figure><p>And …. Tada !</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/404/1*v5tWzvttAGk4nabsj5TtnQ.png" /></figure><p>You can even add some dynamics to your routing.. for example</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/bb98bfbcb58e1a8c41b5a2a26e31a836/href">https://medium.com/media/bb98bfbcb58e1a8c41b5a2a26e31a836/href</a></iframe><p>That would change dynamically for every name of your pup… like</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/1*ds3Keg_X2t_kw64palwBXA.png" /></figure><p>Well, if you made it this far, give yourself a pat on the back! And this is not the end, there’s a lot of more you can do with Flask, but yes this is a beginning :D</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/198/1*b_xgmcHeT11EHiB_4HmjDw.jpeg" /></figure><p><em>Did you like what you read?</em></p><p>Hold the “<strong>clap</strong>” button, please feel free to share your thoughts and ideas.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=64ed0d81f19a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/flask-for-absolute-beginners-64ed0d81f19a">Flask for (absolute) Beginners !</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>