- 17 hours on-demand video
- 22 articles
- 16 downloadable resources
- 7 coding exercises
- Full lifetime access
- Access on mobile and TV
- Certificate of Completion
Get your team access to 4,000+ top Udemy courses anytime, anywhere.Try Udemy for Business
- Connect web or mobile applications to databases and servers via REST APIs
- Create secure and reliable REST APIs which include authentication, logging, caching, and more
- Understand the different layers of a web server and how web applications interact with each other
- Handle seamless user authentication with advanced features like token refresh
- Handle log-outs and prevent abuse in your REST APIs with JWT blacklisting
- Develop professional-grade REST APIs with expert instruction
This is a short introductory video to this section. I'm really excited to guide you through this Python refresher course!
Let's look at variables in Python. Variables are just names for values, which we can reuse and reset.
Python is a dynamic typed language, which means variables don't need be constrained to a specific type.
This video explores how to create programs which can change depending on some input. For example, we might ask the user if they want to continue or not.
This makes use of boolean comparisons, such as:
- 1 == 1 (which is True)
- 5 > 5 (which is False)
The boolean comparisons we have available in Python are many:
- >, <, <=, >=
- is not
- not in
Objects are the natural progression from dictionaries. Instead of just holding data, objects hold another special type of data: methods.
A method is a function which operates on the object calling it. Thus, an object can use its own values to calculate outputs of methods. Very cool.
In many instances, we don't want our methods to be solely referencing the object which calls them. Sometimes, we want to reference the class of the object. Other times, we don't need either the object or the class.
@classmethod and @staticmethod are two decorators (looking at that shortly!) which extend the capabilities of methods.
One of the most confusing aspects of Python for learners is the concept of decorators.
These are things we can place on top of function definitions which allow us to extend the function by executing code before and after the function.
They are extremely powerful when used well!
Already we can create our first web server application! This is an application that returns some data when called using a GET request (such as through a web browser).
Although the focus of the course is not on creating applications to interact with our API, it's useful to know how the API will be called from within a web application.
Normally, APIs are called to retrieve data to create elements on a page, or to do things like authentication, saving to database, or delegate processing to the server.
A very nice piece of software that we can use with Python is the virtualenv.
This allows us to have a different Python installation for every project, which means no shared libraries and context.
This is nice because libraries evolve over time. Something that worked in Flask-RESTful a year ago may not work today, so it makes sense to keep each project separate.
Or else, if we created a project last year and today we update Flask-RESTful, things may not work as expected!
In this video we create our first Flask-RESTful app, which includes our first Resource (remember REST APIs work with resources, instead of just data?).
In this video we explore the concept of test-first API design—akin to Test Driven Development.
It's important to first understand what we want our API to do, before we start writing any code. After all, it's easy to get bogged down on technical details and forget to actually write things that we want to use!
In this video we look at refactoring the code and making it better. This is extremely important in programming. Every now and then, stop and look at what you've written. Then, make it nicer without changing what it does.
This is a sure way of making sure your code is always readable and maintainable—which means you or other people will find it easy to work with and improve later on.
In this video we implement the PUT HTTP verb. One of the key definitions of PUT is that it has to be idempotent.
To be idempotent means that if we call the same endpoint 5 times in a row, only the first call will exert a change in the server.
We can use it to create an item, or to update an item if it already exists.
In this video we quickly test using Postman that our refactoring has not broken the API! This is extremely important, as it is easy to forget to test and then end up with a bunch of untested changes.
If something breaks, you won't know where to start fixing it!
In this video we look at advanced Postman usage: tests and environments.
This is extremely useful as it quickly lets us re-use existing text with environment variables.
Tests allow us to quick gauge whether an endpoint call has been successful or not. For example, if it took too long, returned an incorrect error code, didn't return the appropriate values, etc...
In this video we look at the before_first_request decorator, which Flask has.
It allows us to run a method before the first request to the API is processed.
In this video, we create the tables before the first request so that we no longer need to create them manually.
- Some prior programming experience in any programming language will help. The course includes a full Python refresher course.
- All software used in the course is provided, and completely free
- Complete beginners may wish to take a beginner Python course first, and then transition to this course afterwards
Are you tired of boring, outdated, incomplete, or incorrect tutorials? I say no more to copy-pasting code that you don’t understand.
Welcome to one of the best resources online on creating REST APIs. I'm Jose, and I'm a software engineer; here to help you truly understand and develop your skills in web and REST API development with Python, using Flask.
Production-ready REST APIs with Flask
This course will guide you in creating simple, intermediate, and advanced REST APIs including authentication, deployments, caching, and much more.
We'll start with a Python refresher that will take you from the very basics to some of the most advanced features of Python—that's all the Python you need to complete the course.
Using Flask and popular extensions Flask-RESTful, Flask-JWT, and Flask-SQLAlchemy we will dive right into developing complete, solid, production-ready REST APIs.
We will also look into essential technologies Git, Heroku, and nginx.
You'll be able to...
Create resource-based, production-ready REST APIs using Python, Flask, and popular Flask extensions;
Handle secure user registration and authentication with Flask.
Using SQLAlchemy and Flask-SQLAlchemy to easily and efficiently store resources to a database; and
Understand the complex intricacies of deployments and the performance of Flask REST APIs.
But what is a REST API anyway? Put simply, a REST API is an application that accepts data from clients and returns data back. With the data, it can do many things. For example, a REST API we build in this course accepts text data from the client, processes it and stores it in a database, and then returns some data back so the client can show something to the user.
When working with REST APIs, the client is usually a web app or mobile app. That's in contrast to web apps, where the client is usually the user themselves.
I pride myself on providing excellent support and feedback to every single student. I am always available to guide you and answer your questions.
I'll see you on the inside. Let's take another step toward REST API mastery!
- Students wanting to extend the capabilities of mobile and web applications by using server-side technologies
- Software developers looking to expand their skill-set by learning to develop professional grade REST APIs
- Those looking to learn Python while specifically catering to web services