- 8 hours on-demand video
- 5 articles
- 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
- Setting up a local development server with Docker
- Writing a Python project using Test Driven Development
- Building a REST API with advanced features such as uploading and viewing images
- Creating a backend that can be used a base for your future projects or MVP
- Hands on experience applying best practice principles such as PEP-8 and unit tests
- Configure Travis-CI to automate code checks
Setup a new project using GitHub and clone to our local machine.
Create a new Dockerfile that we can use to build the image for our project.
Write another very simple unit test, but this time we will follow the Test Driven Development (TDD) method.
Now we will add support for creating superusers using the create_superuser function on our custom user manager. The create_superuser function is used by the Django createsuperuser management command, so it's required for creating admin using the CLI, which we will be doing later in the course.
Now we need to configure our Django admin to work with our custom user model. To do this, we need to make some modifications to the fields that Django displays in the default Django admin. In this video we setup the tests to test that our Django admin is working correctly.
Here we modify the Django admin to support changing the custom user model. We start by adding a test to ensure the 'user change page' loads successfully, then we implement the feature by modifying the fieldsets of the default Django UserAdmin class.
Before our docker container will support connecting to PostgreSQL, we need to make a few minor modifications. First we will add the psycopg2 package to our requirements.txt file, then we will update our Dockerfile to support installing and using the client for our application.
A common issue when using PostgreSQL with Django is that the application starts before the database. This causes it to fail with an OperationalError saying that the database is unavailable. To get around this, we will create a management command which we can use to delay starting our app until the database is up. We start by adding unit tests for our command. The unit tests will ensure the command works as expected when the database is and is not available.
- Basic knowledge of programming and building simple applications
- Familiar with Django
- Comfortable using command line tools (Terminal/Command Prompt)
- macOS, Linux or Windows machine capable of running Docker (This excludes Windows 10 Home)
- Positive attitude and willingness to learn!
Welcome to the advanced course on how to Build a Backend REST API using Python, Django (2.0), Django REST Framework (3.9), Docker, Travis CI, Postgres and Test Driven Development!
Whether you’re a freelance programmer, tech entrepreneur, or just starting out building backends - this course will help lay the foundation of your knowledge base and give you the tools to advance your skills with some of the most in-demand programming languages today.
APIs are the unsung heroes behind the technologies that we all love and use religiously.
One of the most critical components for any tech-based business is an API. So knowing how to create an API from start to finish is a vital skill to have as a developer. You cannot build a successful app without a backend REST API!
In this course I’ll show you how to build an advanced API that handles creating and updating user profiles, changing passwords, creating objects, uploading images, filtering and searching objects, and more.
The best way to learn anything is to do it. So the practical application of the course -- the project that you’ll build along side me -- is an API. A recipe API, to be specific.
You will learn how to build an advanced recipe API that allows you to upload and store some of your favourite recipes from photos and the web.
You’ll learn how to create objects i.e. recipes with titles, price points, cooking times, ingredients and tags like “comfort food”, “vegan” or “dessert”. Think of it as a virtual recipe box.
By the end of this course you will have built a fully functioning REST API that can handle:
Filtering and sorting objects
Uploading and viewing images
You’ll also learn, in detail how to:
Setup a project with Docker and Docker-Compose
Configure Travis-CI to automatically run linting and unit tests
Write unit tests using the Django Test Framework
Apply best practice principles including Test Driven Development
Handle uploading media files with Django
Customize the Django admin
Configure a Postgres database
This course has one singular focus: To teach you how to create an advanced API from start to finish using best practice principles and Test Driven Development.
This course is NOT FOR YOU:
If you’re looking for a course to build an API, a front end, and deployment
If you’re looking to build 10 different apps in one course
If you want to learn lots of different technologies and approaches to app development in general
This is a hands-on course, with a bit of theory and lots of opportunities to test your knowledge.
The content is challenging but rewarding. Ready for it? Let’s dive in!
**PLEASE NOTE: You cannot run Docker on Windows 10 Home edition. This is because Windows 10 Pro or Enterprise is required in order to use Hyper-V which Docker uses for virtualization. To take this course you have two options. These are covered in Lecture 6, which is free to preview before purchasing the course.
- Intermediate programmers who already have some understanding of Python and want to skill up
- Developers proficient in other languages but looking to add Python to their toolkit