From Zero to Backend Hero: Creating Full-Featured Apps with Flask/FastAPI

vivek keshore (~vivek17)


4

Votes

Description:

Have you ever struggled while starting a new project or backend app development? Or ever wondered what are best practices or approach to do a step by step development?

This workshop would be focussing on an enriching and detailed exploration into the world of backend development, using one of the two popular framework i.e. either Flask or FastAPI (based on audience choice)

We'll start by implementing a basic database design for the application, and then we'll delve into the heart of backend development: creating Application Programming Interfaces (APIs) that bridge the gap between your frontend and backend.

Think of APIs as friendly messengers that allow different parts of your application to communicate seamlessly. You'll gain insights into designing APIs that will handle the requests from the frontend/client, and deliver the data, showcasing an intricate symphony of interactions.

In the workshop the participants would learn configuring and developing the SQLAlchemy models, and then configuring Alembic to manage the database migrations. The workshop will demonstrate the app development that would involve the implementation and utilisation of Pydantic models for request validation and response serialisation. The API development would demonstrate configuring the logging, Redis cache, and swagger.

Overall the workshop would focus on modular and reusable structure of the application, and demonstrate the implementation of authentication and authorisation, layered structure, SQLAlchemy, Alembic, logging, caching, JWT token, register, login, OTP, SMTP mailing, background tasks, custom router, middleware, swagger docs, error handling and much much more. End to End.

Workshop Details

1. Module 1: Laying the Foundation (15 mins)

  • What are APIs
  • Request Response cycle
  • Overall structure

2. Kickstarting the Development (20 mins)

  • A simple ping or hello world API to show app is running
  • Creating the empty structure/scaffold of the application
  • Implement SQLAlchemy models
  • Configuring Alembic for DB migrations

3. Implementation of Pydantic Models (10 mins)

  • Implementing Request model
  • Differentiating the path params, url params, and body
  • Implementing Response model

4: Development of User management APIs (20 mins)

  • Development of Register user API
  • Development of service and db layer for register user
  • Sending welcome email to user (SMTP emailing)
  • Handling various response codes
  • Handling error and exceptions

5. Development of login, otp validation and logout APIs (45 mins)

  • Basics of JWT token generation and encrypting JWT payload
  • Sending OTP through email as background task
  • Utilization of Redis for storing and managing OTP
  • Issuing token over successful otp validation
  • Development of login, verify otp and logout APIs

6. Development of User management APIs (20 mins)

  • User CRUD operations
  • Validating the token
  • Authorization

7. Implementation of main business APIs (30 mins)

  • Implementation of a real life app like library or ticket booking.
  • The intention is to show the app development, code structuring, user authentication etc.

8. Implementation of middlewares (10 mins)

  • Understanding the concept of middlewares and implementing custom middleware
  • Middleware to encrypt/decrypt the complete json payload
  • Middleware to log every request before processing.

9. Key take away points and conclusion (10 mins)

Prerequisites:

Basic knowledge of Python

Speaker Info:

I am a Python Enthusiast who loves building software applications and education related content. I am a technology professional and a passionate programmer with 11 years of experience in Python & Python related technologies. I am currently working as Architect at SenecaGlobal Inc, Hyderabad.

I have been involved with multiple professional projects in various industrial domains and technical fields. My expertise is in application development, data processing & analysis, data structures, & algorithms, various non-relational and relational databases, Python, Flask, FastAPI, Celery, RabbitMQ, Redis, Cassandra, AWS, Airflow, and various other tech stacks. I am also an open source contributor, and published self developed libraries on PyPI. I love creating libraries and various utility tools that help me in solving a challenge/problem that could also be used by others in the developers community.

My personal interest is in exploring new technologies, web application development, IoT systems, spread Python education, and read novels. I also write and share my thoughts occasionally on Quora and Medium.

Speaker Links:

Previous Proposals

  • https://in.pycon.org/cfp/2021/proposals/hows-the-job-title-quantum-computer-programmer~bmZQr/
  • https://in.pycon.org/cfp/2021/proposals/one-api-to-rule-them-all-config-based-development~en5rE/

PyPI Libraries

And many more in progress ...

Docker HUB

Rhinestone

Medium Articles (Published in NerdForTech and MLearning.ai)

https://vivek-keshore.medium.com

Github

Github

LinkedIn

LinkedIn

Section: Web & App development
Type: Workshops
Target Audience: Beginner
Last Updated: