SlideShare a Scribd company logo
Python Backend
Development &
Deployment Moiz Ahmed
Course By
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
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)
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
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
Lecture # 1
Introduction to Backend
Development & Fast API
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
What is Backend Development?
Python Backend development & deployment Course By: Moiz Ahmed
HTTP VS HTTPs
Python Backend development & deployment Course By: Moiz Ahmed
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
How do APIs Work?
Python Backend development & deployment Course By: Moiz Ahmed
APIs by availability, aka release policies
Python Backend development & deployment Course By: Moiz Ahmed
APIs by use cases
Python Backend development & deployment Course By: Moiz Ahmed
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
APIs Formats and specifications
Python Backend development & deployment Course By: Moiz Ahmed
RPC (Remote Procedure Calls)
APIs Formats and specifications
Python Backend development & deployment Course By: Moiz Ahmed
RPC (Remote Procedure Calls)
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.
APIs Formats and specifications
Python Backend development & deployment Course By: Moiz Ahmed
Service Object Access Protocol (SOAP)
APIs Formats and specifications
Python Backend development & deployment Course By: Moiz Ahmed
Service Object Access Protocol (SOAP)
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
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
APIs Formats and specifications
Python Backend development & deployment Course By: Moiz Ahmed
Representational State Transfer (REST)
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.
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.
APIs Formats and specifications
Python Backend development & deployment Course By: Moiz Ahmed
GraphQL
APIs Formats and specifications
Python Backend development & deployment Course By: Moiz Ahmed
APIs Formats and specifications
Python Backend development & deployment Course By: Moiz Ahmed
Typical Python Application Architecture
Python Backend development & deployment Course By: Moiz Ahmed
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.
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.
ASGI
Python Backend development & deployment Course By: Moiz Ahmed
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
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.
TYPICAL FAST API SETUP
Python Backend development & deployment Course By: Moiz Ahmed
TYPICAL FAST API SETUP
Python Backend development & deployment Course By: Moiz Ahmed
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.
UVICORN VS GUNICORN
Python Backend development & deployment Course By: Moiz Ahmed
SWAGGER
Python Backend development & deployment Course By: Moiz Ahmed
REDOC
Python Backend development & deployment Course By: Moiz Ahmed
POSTMAN
Python Backend development & deployment Course By: Moiz Ahmed

More Related Content

PDF
Rapid Web Development with Python for Absolute Beginners
PPTX
Api design part 1
PDF
A Complete Guide to Python Web Development
PDF
IRJET- Rest API for E-Commerce Site
PDF
Mastering API Development: A Developer’s Roadmap for Success
PDF
Best practices and advantages of REST APIs
PDF
main report on restaurant
PPTX
Distributed systems air traffic controller
Rapid Web Development with Python for Absolute Beginners
Api design part 1
A Complete Guide to Python Web Development
IRJET- Rest API for E-Commerce Site
Mastering API Development: A Developer’s Roadmap for Success
Best practices and advantages of REST APIs
main report on restaurant
Distributed systems air traffic controller

Similar to L1 - Introduction to python Backend.pptx (20)

PDF
M meijer api management - tech-days 2015
PPTX
INTERFACE by apidays_What's your Type? Understanding API Types and Choosing t...
PDF
Why CakePHP Is Superior to Other Web Frameworks! Examine Its Pros & Cons For ...
PDF
Alfresco and the Model Context Protocol (MCP)
DOCX
Top 13 Backend Frameworks for Web development in 2024
PPTX
Overview of Rest Service and ASP.NET WEB API
PDF
Top 10 python frameworks for web development in 2020
PPTX
PPTX
Crime Reporting System.pptx
PPSX
Advanced Web Development in PHP - Understanding REST API
PPTX
Developing Apps with Azure AD
PPTX
PHP Frameworks
PPTX
Getting started with dotnet core Web APIs
PDF
HEATH INSURANCE CLAIM MANAGEMENT SYSTEM PROJECT REPORT.
PPTX
Rkd Api Overview
PDF
Full Stack Developer Interview Questions (1).pdf
PDF
APIs Design - Creation - Management.pdf
PPTX
API & Backend Integration
PPTX
Extend soa with api management spoug- Madrid
PDF
Understanding API Architectures: Web API vs. Minimal API – An In-Depth Compar...
M meijer api management - tech-days 2015
INTERFACE by apidays_What's your Type? Understanding API Types and Choosing t...
Why CakePHP Is Superior to Other Web Frameworks! Examine Its Pros & Cons For ...
Alfresco and the Model Context Protocol (MCP)
Top 13 Backend Frameworks for Web development in 2024
Overview of Rest Service and ASP.NET WEB API
Top 10 python frameworks for web development in 2020
Crime Reporting System.pptx
Advanced Web Development in PHP - Understanding REST API
Developing Apps with Azure AD
PHP Frameworks
Getting started with dotnet core Web APIs
HEATH INSURANCE CLAIM MANAGEMENT SYSTEM PROJECT REPORT.
Rkd Api Overview
Full Stack Developer Interview Questions (1).pdf
APIs Design - Creation - Management.pdf
API & Backend Integration
Extend soa with api management spoug- Madrid
Understanding API Architectures: Web API vs. Minimal API – An In-Depth Compar...
Ad

Recently uploaded (20)

PDF
The Role of Automation and AI in EHS Management for Data Centers.pdf
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Best Practices for Rolling Out Competency Management Software.pdf
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
How Creative Agencies Leverage Project Management Software.pdf
PPTX
AIRLINE PRICE API | FLIGHT API COST |
PPTX
Mastering-Cybersecurity-The-Crucial-Role-of-Antivirus-Support-Services.pptx
PDF
System and Network Administraation Chapter 3
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PPTX
Transform Your Business with a Software ERP System
PDF
IEEE-CS Tech Predictions, SWEBOK and Quantum Software: Towards Q-SWEBOK
DOCX
The Five Best AI Cover Tools in 2025.docx
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPTX
FLIGHT TICKET RESERVATION SYSTEM | FLIGHT BOOKING ENGINE API
PDF
QAware_Mario-Leander_Reimer_Architecting and Building a K8s-based AI Platform...
PDF
System and Network Administration Chapter 2
PPTX
Presentation of Computer CLASS 2 .pptx
PDF
AI in Product Development-omnex systems
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
The Role of Automation and AI in EHS Management for Data Centers.pdf
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Best Practices for Rolling Out Competency Management Software.pdf
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
How Creative Agencies Leverage Project Management Software.pdf
AIRLINE PRICE API | FLIGHT API COST |
Mastering-Cybersecurity-The-Crucial-Role-of-Antivirus-Support-Services.pptx
System and Network Administraation Chapter 3
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Transform Your Business with a Software ERP System
IEEE-CS Tech Predictions, SWEBOK and Quantum Software: Towards Q-SWEBOK
The Five Best AI Cover Tools in 2025.docx
PTS Company Brochure 2025 (1).pdf.......
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
FLIGHT TICKET RESERVATION SYSTEM | FLIGHT BOOKING ENGINE API
QAware_Mario-Leander_Reimer_Architecting and Building a K8s-based AI Platform...
System and Network Administration Chapter 2
Presentation of Computer CLASS 2 .pptx
AI in Product Development-omnex systems
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
Ad

L1 - Introduction to python Backend.pptx

  • 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
  • 6. Lecture # 1 Introduction to Backend Development & Fast API
  • 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
  • 9. HTTP VS HTTPs 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
  • 28. Typical Python Application Architecture 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.
  • 31. ASGI Python Backend development & deployment Course By: Moiz Ahmed
  • 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.
  • 37. UVICORN VS GUNICORN Python Backend development & deployment Course By: Moiz Ahmed
  • 38. SWAGGER Python Backend development & deployment Course By: Moiz Ahmed
  • 39. REDOC Python Backend development & deployment Course By: Moiz Ahmed
  • 40. POSTMAN Python Backend development & deployment Course By: Moiz Ahmed