Custom Private On-Demand

Building REST APIs with Django Ninja (DJG650)

4 hours

Building REST APIs with Django Ninja is a practical course for developers who want to move from consuming APIs to designing and building their own.

Register or Request Training

  • Private class for your team
  • Live expert instructor
  • Online or on‑location
  • Customizable agenda
  • Proposal responses same day as request
Price per student
$49.95 or 1 voucher
  • On-Demand 24/7
  • Readings, Video Presentations, Exercises
  • Quizzes to knowledge check
  • Life-Time Access

Course Overview

Building REST APIs with Django Ninja is a practical course for developers who want to move from consuming APIs to designing and building their own. You’ll review core REST concepts, learn how to represent and name resources, work with JSON and HTTP status codes, and design clear API endpoints before implementing them with Django Ninja.

Through hands-on exercises, you’ll build a Django Ninja API using Pydantic schemas and a database, then create the core CRUD operations needed to create, read, update, and delete data. You’ll also connect your API to a fetch-powered frontend, work with query parameters, post and retrieve data, and add error handling for more reliable client-server interactions.

Course Benefits

  • Design REST API endpoints around clearly defined resources and appropriate HTTP conventions.
  • Represent API data with JSON and use HTTP status codes to communicate request outcomes.
  • Set up Django Ninja and create API endpoints through hands-on exercises.
  • Use Pydantic schemas to define and validate data exchanged through an API.
  • Configure database-backed API functionality for storing and retrieving application data.
  • Build CRUD endpoints for creating, reading, updating, and deleting resources.
  • Use query parameters to support more flexible API requests.
  • Connect a frontend to Django Ninja endpoints using the Fetch API.
  • Apply error handling techniques to return useful responses when API requests fail.
  • Practice building a complete workflow that connects REST API design, Django Ninja, database operations, and frontend requests.

Delivery Methods

Private Class
Delivered for your team at your site or online.
On-Demand
Learn at your own pace with 24/7 access.

Course Outline

  1. Designing REST APIs
    1. Review of REST APIs
    2. From Consumer to Builder
    3. Representing Resources with JSON
    4. Identifying and Naming Resources
    5. Using Status Codes to Determine Outcome
    6. Designing Your API Endpoints
  2. Building Your First Django Ninja API
    1. Why Django Ninja?
    2. Installing Django Ninja
    3. Your First Endpoint
    4. Pydantic Schemas
    5. Setting Up the Database
    6. Writing to the Database
    7. Reading from the Database
  3. CRUD and a Fetch-Powered Frontend with Django Ninja
    1. Setting Up the Frontend
    2. Posting Data
    3. Query Parameters
    4. Fetching Data
    5. PUT and DELETE Endpoints
    6. Error Handling in Django Ninja

Class Materials

Each student receives a comprehensive set of materials, including course notes and all class examples.

Class Prerequisites

Experience in the following is required for this course class:

  • Basic proficiency with Python and Django.
  • Familiarity with HTML, JavaScript, and JSON.
  • Basic knowledge of relational databases and SQL.

Experience in the following would be useful for this course class:

  • Experience consuming REST APIs with tools or applications.

Have questions about this course?

We can help with curriculum details, delivery options, pricing, or anything else. Reach out and we’ll point you in the right direction.