In this first part, you'll learn how to develop a RESTful API with Python, Django, Django REST Framework, and Postgres. You'll containerize Django and Postgres to run inside Docker containers and configure pytest in order to practice Test-Driven Development (TDD).
Learning Objectives
- Develop a RESTful API with Python, Django, and Django REST Framework
- Practice Test-Driven Development
- Test a Django app with pytest
- Containerize Django and Postgres inside a Docker container
- Run unit and integration tests with code coverage
- Create a custom User model in Django
- Implement an API with Django REST Framework Views and Serializers
- Check your code for any code quality issues via a linter
In the second part, you'll start by deploying Django, Gunicorn, and Postgres to Heroku with Docker. You'll then continue to build out the RESTful API as you write unit and integration tests. Finally, we'll look at how to document the API with Swagger.
Learning Objectives
- Configure GitLab CI for continuous integration and deployment
- Speed up a Docker-based CI build with Docker Cache
- Deploy Django, Gunicorn, and Postgres to Heroku with Docker
- Manage static assets with WhiteNoise
- Create a production Dockerfile that uses multistage Docker builds
- Parameterize test functions and mock functionality in tests with pytest
- Run tests in parallel with pytest-xdist