From the course: Building RESTful APIs with Flask

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Making a super-simple API example

Making a super-simple API example

From the course: Building RESTful APIs with Flask

Start my 1-month free trial

Making a super-simple API example

- [Instructor] Here's the really exciting part about creating API's with Flask. It took you a few minutes to generate your project. A few minutes from now you're going to have an endpoint working. An endpoint is really just a URL that's going to be processed by your application. Let's get some code in our app and you'll see what I mean. If you don't already have it open, go ahead and open app.py and PyCharm. Now I have some bad news, PyCharm wrote the traditional Hello World example for you already. I know you were looking forward to writing that yourself. Don't worry, we'll make our own version of Hello World in just a moment. But before we do, let's go over what we have so far, because it's a good example of the kind of work we're going to be doing. At the top, you'll find a set of import statements. These give our code access to third party libraries, as well as the large library of capabilities that comes with Python. In this case, you can see we're importing Flask. After that…

Contents