Choose your language
Building APIs with Python Course
From 4 to 360h of flexible workload

Building APIs with Python Course

Learn to build, secure, and deploy professional REST APIs using Python, Flask, and FastAPI. This course takes you from Python fundamentals all the way to cloud deployment, covering authentication, databases, testing, and documentation. If you want to ship real APIs that work in production, this is where you start.

What you will learn:

You will master Python fundamentals, HTTP protocols, and REST design principles before building fully functional APIs with both Flask and FastAPI. You will connect your APIs to relational databases using SQLAlchemy, write database migrations with Alembic, and implement JWT-based authentication with role-based access control. You will write automated tests with pytest, generate OpenAPI documentation, and containerise your applications with Docker. By the end, you will have the skills to deploy secure, well-tested APIs to cloud platforms.

How you study in practice Building APIs with Python Course

How you practise Building APIs with Python Course

For companies looking to train their teams

With Elevify for businesses, the course includes exercises and examples tailored to your company and its specific needs.

Click here

Course content

8 Chapters39 LessonsDuration between 4 and 360 hours (you decide)

Chapter 1See details

Python Foundations for API Development

  • Lesson 1 • Python Syntax and Data Types

    Review core Python syntax, variables, and built-in data types used in API logic. Mastery here underpins all request and response handling later.

  • Lesson 2 • Setting Up the Development Environment

    Configure Python, virtual environments, and package managers for API projects. Proper setup prevents dependency conflicts throughout the course.

  • Lesson 3 • Functions and Modules

    Define reusable functions and organise code into modules and packages. Modular design is the structural backbone of any API codebase.

  • Lesson 4 • Working with JSON and Files

    Parse, serialise, and manipulate JSON data and read configuration files. JSON is the primary data format exchanged in REST APIs.

  • Lesson 5 • Error Handling and Exceptions

    Use try/except blocks and custom exceptions to write resilient code. APIs must handle failures gracefully to return meaningful error responses.

Chapter 2See details

HTTP and REST API Fundamentals

  • Lesson 1 • Testing APIs with Client Tools

    Use HTTP client tools to send requests and inspect responses before writing code. Hands-on testing builds intuition for API behaviour.

  • Lesson 2 • REST Architectural Principles

    Define the six REST constraints and explain how they shape API design decisions. Understanding REST guides every endpoint and resource decision made later.

  • Lesson 3 • Designing RESTful Endpoints

    Apply naming conventions, HTTP verbs, and resource hierarchies to design clean endpoints. Good endpoint design reduces client confusion and maintenance cost.

  • Lesson 4 • How HTTP Works

    Examine the request/response model, headers, status codes, and methods. This knowledge is prerequisite for designing any web API.

Chapter 3See details

Building APIs with Flask

  • Lesson 1 • Error Handling in Flask

    Register error handlers for HTTP errors and unhandled exceptions. Centralised error handling ensures consistent error responses across all routes.

  • Lesson 2 • Flask Application Structure

    Initialise a Flask app, understand the application factory pattern, and organise project files. Proper structure scales cleanly as the API grows.

  • Lesson 3 • Request Parsing and Validation

    Extract and validate data from request bodies, query strings, and headers. Input validation prevents bad data from reaching business logic.

  • Lesson 4 • Routing and URL Rules

    Define routes using decorators and handle dynamic URL segments. Routes map HTTP requests to Python functions that return responses.

  • Lesson 5 • Building JSON Responses

    Return structured JSON responses with correct status codes and headers. Consistent response formatting improves client developer experience.

Chapter 4See details

Building APIs with FastAPI

  • Lesson 1 • Request Bodies with Pydantic

    Define request schemas using Pydantic models for automatic parsing and validation. Pydantic eliminates manual validation boilerplate and provides clear error messages.

  • Lesson 2 • Path and Query Parameters

    Declare typed path and query parameters with automatic validation and documentation. FastAPI infers validation rules directly from Python type hints.

  • Lesson 3 • Response Models and Status Codes

    Specify response models to filter output fields and document return shapes. Explicit response models enforce API contracts and improve generated documentation.

  • Lesson 4 • Dependency Injection in FastAPI

    Use FastAPI's Depends system to share logic like auth checks and DB sessions. Dependency injection keeps route functions thin and testable.

  • Lesson 5 • FastAPI Core Concepts

    Understand FastAPI's design philosophy, async support, and dependency injection system. These concepts differentiate FastAPI from synchronous frameworks like Flask.

Chapter 5See details

Data Persistence and Database Integration

  • Lesson 1 • CRUD Operations with ORM

    Implement create, read, update, and delete operations using SQLAlchemy query API. These operations form the core data layer of any REST API.

  • Lesson 2 • Database Migrations with Alembic

    Use Alembic to version-control schema changes without data loss. Migrations are essential for evolving production database schemas safely.

  • Lesson 3 • Relational Database Fundamentals

    Review tables, relationships, primary keys, and foreign keys as they apply to API data models. Database design decisions directly shape API resource structure.

  • Lesson 4 • Serialisation and Data Transfer Objects

    Convert ORM model instances to JSON-serialisable dictionaries or Pydantic schemas. Serialisation decouples the database layer from the API response layer.

  • Lesson 5 • SQLAlchemy ORM Setup

    Configure SQLAlchemy, define models, and create database sessions for Flask and FastAPI. The ORM abstracts SQL and maps Python classes to database tables.

Chapter 6See details

Authentication and Authorisation

  • Lesson 1 • Authentication Concepts and Strategies

    Compare session-based, token-based, and API key authentication models. Choosing the right strategy depends on client type and security requirements.

  • Lesson 2 • Implementing JWT Authentication

    Generate, sign, and verify JSON Web Tokens to authenticate API requests. JWTs enable stateless authentication suitable for distributed API deployments.

  • Lesson 3 • Password Hashing and Storage

    Hash passwords with bcrypt and validate them during login without storing plaintext. Secure password storage is a non-negotiable security baseline.

  • Lesson 4 • Protecting Routes with Middleware

    Apply authentication middleware and decorators to restrict access to protected routes. Middleware enforces auth consistently without duplicating logic in each route.

  • Lesson 5 • Role-Based Access Control

    Assign roles to users and enforce permissions at the route and resource level. RBAC limits damage from compromised accounts and enforces least privilege.

Chapter 7See details

API Testing and Quality Assurance

  • Lesson 1 • Test Coverage and CI Integration

    Measure test coverage with pytest-cov and run tests automatically in a CI pipeline. Coverage metrics and automation prevent regressions from reaching production.

  • Lesson 2 • Testing Fundamentals with pytest

    Set up pytest, write test functions, and use assertions to verify behaviour. A solid testing foundation enables confident refactoring throughout the project.

  • Lesson 3 • Integration Testing with Test Clients

    Use Flask and FastAPI test clients to send HTTP requests against a live app. Integration tests verify that routes, middleware, and database layers work together.

  • Lesson 4 • Unit Testing API Logic

    Isolate and test individual functions, validators, and service layer methods. Unit tests catch logic errors early without requiring a running server.

  • Lesson 5 • Database Testing Strategies

    Use in-memory databases and fixtures to isolate tests from production data. Isolated database tests run fast and produce repeatable results.

Chapter 8See details

API Documentation, Deployment, and Production Readiness

  • Lesson 1 • Performance and Security Hardening

    Apply rate limiting, CORS policies, and response caching to harden production APIs. These measures protect against abuse and improve response times under load.

  • Lesson 2 • Containerising APIs with Docker

    Write Dockerfiles and docker-compose files to package APIs as portable containers. Containers eliminate environment inconsistencies between development and production.

  • Lesson 3 • API Documentation with OpenAPI

    Write and enhance OpenAPI specifications to produce developer-friendly API docs. Good documentation reduces integration time for API consumers.

  • Lesson 4 • Deploying to Cloud Platforms

    Deploy containerised APIs to cloud platforms using managed services and CI/CD pipelines. Cloud deployment makes APIs accessible, scalable, and maintainable.

  • Lesson 5 • Structured Logging and Monitoring

    Emit structured JSON logs and integrate with monitoring tools to observe API health. Observability enables fast diagnosis of production incidents.

Certification
Certification

Your valid completion certificate

This course is for you:

  • Junior Python developer: ready to move beyond scripts into backend services.

  • Career changer: transitioning from non-technical work into software development roles.

  • Data analyst: wanting to expose models and pipelines through queryable API endpoints.

  • Computer science student: bridging academic knowledge with real-world backend engineering skills.

  • Freelance web developer: adding Python API capabilities to expand client service offerings.

  • QA engineer: learning backend structure to write more effective integration test suites.

What our students say

Feedback from those who have already studied with us:

Your lessons are perfect. I purchased the one-year package and finally have the opportunity to follow various topics of interest without needing to change platforms... I'm grateful for everything you do, I've already recommended you to other people...
Giulio Carlo
Giulio CarloDigital Marketing Student
I like how the lessons are straight to the point and how I can change chapters and skip content I don't need.
Mariana Ferres
Mariana FerresPhotography Student
I like the content and the way videos are presented and transcribed, which speeds up the process!
Luciana Alvarenga
Luciana AlvarengaNail Design Student
The platform is fast, simple to use. The diversity of content and complementary videos really help with learning.
André Felipe
André FelipePrompt Engineering Student

Top qualifications

FAQ

Who is Elevify? How does it work?

Do the courses have certificates?

Are the courses free?

What is the course workload?

What are the courses like?

How do the courses work?

What is the duration of the courses?

What is the cost or price of the courses?

What is an EAD or online course and how does it work?

PDF Course