In this first part, you'll learn how to develop a RESTful API with Python, the Flask web framework, Flask-RESTX, and Postgres. You'll containerize Flask 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, Flask, and Flask-RESTX
- Practice Test-Driven Development
- Test a Flask app with pytest
- Containerize Flask and Postgres inside a Docker container
- Run unit and integration tests with code coverage
- Check your code for any code quality issues via a linter
In the second part, you'll start by deploying Flask, Gunicorn, and Postgres to Heroku with Docker. You'll then continue building 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 Flask, Gunicorn, and Postgres to Heroku with Docker
- Parameterize test functions and mock functionality in tests with pytest
- Run tests in parallel with pytest-xdist
- Configure Flask-Admin with SQLAlchemy models
- Document a RESTful API with Swagger/OpenAPI