Introduction
- FastAPI vs Django vs Flask
- Overview of FastAPI features and advantages
Getting Started
- Installing FastAPI
- Defining a schema using OpenAPI
Path and Query Parameters
- Declaring path parameter types
- Parsing and validating data
- Declaring required and optional parameters
- Converting query parameter types
- Multiple path and query parameters
Declaring a Request Body with Pydantic Models
- Creating a data model
- Combining path, query, and body parameters
- Declaring validations and metadata
- Using deeply nested models
- Defining example data
- Response and extra models
Defining Forms and Files
- Using form fields instead of JSON
- Creating file parameters
- Using file and form parameters
Handling Errors
- Using HTTPException
- Adding custom headers
- Installing custom exception handlers
- Overriding default exception handlers
Working with Databases
- ORMs and file structure
- Creating SQLAlchemy parts
- Creating database models
- Creating Pydantic models
- Performing CRUD operations
- Creating tables, dependency, and path operations
- Reviewing and checking files
- Interacting with the database
Security and Authentication
- Using Oauth2 and OpenID connect
- Defining multiple security schemes with OpenAPI
- Using the FastAPI utilities
Deployments
- Deployment concepts, stages, and tools
- Working with Gunicorn and Uvicorn
- Using container systems (Docker and Kubernetes)
Troubleshooting
Summary and Next Steps
Duration
14 hours (usually 2 days including breaks)
Requirements
- Experience with web development
- JavaScript and Python programming experience
Audience
Overview
FARM (FastAPI, React, and MongoDB) is similar to MERN, but performs faster with Python and FastAPI replacing Node.js and Express as the backend. FastAPI is a high-performance Python web framework used by top companies, such as Microsoft, Uber, and Netflix. React is an open source front-end JavaScript library, while MongoDB is a fully scalable NoSQL database.
This instructor-led, live training (online or onsite) is aimed at developers who wish to use the FARM (FastAPI, React, and MongoDB) stack to build dynamic, high-performance, and scalable web applications.
By the end of this training, participants will be able to:
- Set up the necessary development environment that integrates FastAPI, React, and MongoDB.
- Understand the key concepts, features, and benefits of the FARM stack.
- Learn how to build REST APIs with FastAPI.
- Learn how to design interactive applications with React.
- Develop, test, and deploy applications (front end and back end) using the FARM stack.
Format of the Course
- Interactive lecture and discussion.
- Lots of exercises and practice.
- Hands-on implementation in a live-lab environment.
Course Customization Options
- To request a customized training for this course, please contact us to arrange.
Course Outline
Introduction
- What is FARM stack?
- FARM vs MERN
Getting Started
- Setting up the development environment
- Setting up a MongoDB Atlas account
- Installing dependencies
- Connecting FastAPI with MongoDB
Building REST APIs (FastAPI)
- CRUD operations
- Updating the APIs
- MongoDB functions
- Testing the APIs
Developing the Frontend with ReactJS
- Creating a React project
- Installing axios and bootstrap
- Styling, CSS, and JSX
- Adding interactive functions
- Testing the application
Deploying the Application
- Backend deployment (Heroku)
- Frontend deployment (GitHub)
Securing the Application
- Authentication and user management
- Routers and access permissions
Troubleshooting
Summary and Next Steps