2. Course Content
Python Backend development & deployment Course By: Moiz Ahmed
• Introduction to Backend Development & Fast API
• Deep dive into Pydantic & Dependency Injection
• Database with SQLAlchemy ORM and CRUD Operations
• Application Structure & Project Design Patterns
• Authentication & Authorization
• Advanced API Features – Asynchronous Programming
• Real – time Communication with Webhooks
3. Course Content
Python Backend development & deployment Course By: Moiz Ahmed
• Capstone Project - Meeting Agent: Join, Understand, Communicate
• Introduction to Django & Web App Basics
• Django Model, Migrations and Admin
• Views, URLs, Template System
• Forms, Model Forms, and Validations
• Django User Authentication System, CBV and FBV
• Django ORM and advanced querying
• Django Rest Framework (DRF)
4. Course Content
Python Backend development & deployment Course By: Moiz Ahmed
• Middleware, signals, and custom commands
• Django logging, debugging, Django test framework
• Real-time with Django Channels and WebSockets
• Capstone Project - SaaS – AI Lead Generation Platforms (Linkedin, Upwork, etc.)
• Introduction to NGINX and Reverse Proxy
• Dockerization of Fast API Project and Streamlit/Slack interface
• Docker compose, Multi-container architecture, internal network
5. Course Content
Python Backend development & deployment Course By: Moiz Ahmed
• EC2 Networking, Subnet, CIDR, etc.
• Dockerization of Django Project and EC2 setup – Go Live
• AWS S3, AWS Lambda and event bridge
• Event bridge and AWS SNS to make emailing system
7. What is Backend Development?
Python Backend development & deployment Course By: Moiz Ahmed
Backend development refers to the server-side part of
web or software development. It focuses on building and
maintaining the components that users don’t see but are
essential for the application to function properly. These
components include:
1. Servers
2. Databases
3. APIs
4. Business logic
8. What is Backend Development?
Python Backend development & deployment Course By: Moiz Ahmed
10. APIs (Application Programming Interface)
Python Backend development & deployment Course By: Moiz Ahmed
An API is a set of programming code that enables data transmission between one
software product and another. It also contains the terms of this data exchange.
1. The application programming interface must be clearly distinguished from a user
interface.
2. The user interface accepts data from users, forwards it to the API for processing, and
returns the results to the user.
3. The API does not interact with the user but processes the data received from one
program module and transmits the results back to the other module
11. How do APIs Work?
Python Backend development & deployment Course By: Moiz Ahmed
12. APIs by availability, aka release policies
Python Backend development & deployment Course By: Moiz Ahmed
13. APIs by use cases
Python Backend development & deployment Course By: Moiz Ahmed
14. APIs Formats and specifications
Python Backend development & deployment Course By: Moiz Ahmed
RPC (Remote Procedure Calls)
• Web APIs may adhere to resource exchange
principles based on a Remote Procedure Call or
RPC
• This protocol specifies the interaction between
applications based on the client-server
architecture.
• One program (client) requests data or functionality
from another program (server), located in another
computer on a network, and the server sends the
required response.
• RPC is also known as a subroutine or function call
15. APIs Formats and specifications
Python Backend development & deployment Course By: Moiz Ahmed
RPC (Remote Procedure Calls)
16. APIs Formats and specifications
Python Backend development & deployment Course By: Moiz Ahmed
RPC (Remote Procedure Calls)
17. APIs Formats and specifications
Python Backend development & deployment Course By: Moiz Ahmed
Service Object Access Protocol (SOAP)
• SOAP is a lightweight protocol for exchanging structured
information in a decentralized, distributed environment,
• APIs that comply with the principles of SOAP enable XML
messaging between systems through HTTP or Simple Mail
Transfer Protocol (SMTP) for transferring mail.
• Extensible markup language (XML) is a simple and very
flexible text format widely used for data storage and
exchange over the Internet or other networks
• RPC is also known as a subroutine or function call.
• XML defines a set of rules for encoding documents in a
format that both humans and machines can read.
18. APIs Formats and specifications
Python Backend development & deployment Course By: Moiz Ahmed
Service Object Access Protocol (SOAP)
19. APIs Formats and specifications
Python Backend development & deployment Course By: Moiz Ahmed
Service Object Access Protocol (SOAP)
20. APIs Formats and specifications
Python Backend development & deployment Course By: Moiz Ahmed
Representational State Transfer (REST)
• REST is a software architectural style with six constraints
for building applications that work over HTTP, often web
services
• REST makes data available as resources. Each resource is
represented by a unique URL, and one can request this
resource by providing its URL.
• Web APIs that comply with REST architectural constraints
are called RESTful APIs.
• RESTful systems support messaging in different formats,
such as plain text, HTML, YAML, XML, and JSON, while
SOAP only allows XML
21. APIs Formats and specifications
Python Backend development & deployment Course By: Moiz Ahmed
Representational State Transfer (REST)
1. Client sends the HTTP/HTTPs request:
Contains: Methods, Headers, URI, and optional Body
2. Server Processes the request:
Parses headers, identifiers resource, applies method
logic
3. Server responds:
Includes: status code, Headers, and option Response
Body
4. Client receives the response and acts accordingly
22. APIs Formats and specifications
Python Backend development & deployment Course By: Moiz Ahmed
Representational State Transfer (REST)
23. APIs Formats and specifications
Python Backend development & deployment Course By: Moiz Ahmed
gRPC - Google Remote Procedure Calls
• gRPC is an open-source universal API framework that is
also classified under RPC
• With gRPC, the client application can directly call methods
from a server application located on a different computer
as if it was a local object
• This makes it easier to create distributed services and
applications.
• gRPC allows developers to define any kind of function
calls, rather than selecting from preset options such as
PUT and GET in the case of REST.
• By default, gRPC uses protocol buffers instead of JSON or
XML as the Interface Definition Language (IDL) for
serializing structured data.
24. APIs Formats and specifications
Python Backend development & deployment Course By: Moiz Ahmed
GraphQL
• The need for faster feature development and more
efficient data loading due to increased mobile adoption.
• Initially created by Facebook in 2012 for Internal use, is
the new REST with organizations like Shopify, Yelp,
GitHub, Coursera, and The New York Times, using it to
build APIs.
• It is a query language for APIs.
• It allows the client to detail the exact data it needs and
simplifies data aggregation from multiple sources, so the
developer can use one API call to request all needed
data. Also have type system to describe data.
25. APIs Formats and specifications
Python Backend development & deployment Course By: Moiz Ahmed
GraphQL
26. APIs Formats and specifications
Python Backend development & deployment Course By: Moiz Ahmed
27. APIs Formats and specifications
Python Backend development & deployment Course By: Moiz Ahmed
29. WSGI
Python Backend development & deployment Course By: Moiz Ahmed
WSGI is a specification that outlines the
communication protocol between the web server
and a server gateway interface.
1. WSGI is the original Python standard for
communication between web servers and
synchronous web applications.
2. It was introduced in PEP 3333 .
3. It's used by traditional frameworks like Flask ,
Django 2.0 , etc.
4. Only supports synchronous requests.
5. No support for WebSocket , long polling, or
background tasks.
6. All operations must complete before returning
a response.
30. ASGI
Python Backend development & deployment Course By: Moiz Ahmed
ASGI is a modern specification that outlines the
communication protocol between the web server and
a server gateway interface.
1. ASGI is the modern replacement for WSGI.
2. Introduced in PEP 3333 's successor, PEP 3156.
3. Supports both synchronous and asynchronous
applications.
4. Enables real-time features like WebSocket , HTTP/2
, and background tasks.
5. You need real-time features like WebSocket.
6. You want to use async/await in your application
logic.
7. You're building high-performance, HTTP/2 or
Server-Sent Events (SSE) APIs.
32. FAST API
Python Backend development & deployment Course By: Moiz Ahmed
FastAPI is a modern, high-performance web framework for building APIs with Python 3.7+ based on
standard Python type hints. It is designed to be fast, easy to use, and highly efficient, especially for
building RESTful APIs.
FastAPI is a Python framework built on top of:
• Starlette (for the web parts, like routing, middleware, etc.)
• Pydantic (for data validation and serialization)
It is ideal for building APIs and microservices, and supports:
• Asynchronous programming (async/await)
• Automatic generation of OpenAPI docs (Swagger & ReDoc)
• Built-in validation, error handling, and security
33. WHO SHOULD LEARN FAST API
Python Backend development & deployment Course By: Moiz Ahmed
• Beginners looking for an easier entry into backend
development.
• Frontend devs wanting to create clean APIs for their
web or mobile apps.
• ML/AI engineers needing to serve models as APIs
(it's extremely popular in this space).
• Backend engineers who want a faster, more modern
alternative to Flask or Django REST Framework.
34. TYPICAL FAST API SETUP
Python Backend development & deployment Course By: Moiz Ahmed
35. TYPICAL FAST API SETUP
Python Backend development & deployment Course By: Moiz Ahmed
36. FAST API ROUTERS
Python Backend development & deployment Course By: Moiz Ahmed
Routes are endpoints in your API that clients can access via HTTP methods like GET,
POST, PUT, DELETE, etc.