
Get started with building Python REST APIs using FastAPI, connecting to Amazon RDS, and deploying to Elastic Beanstalk, with domain setup, SSL certificates, and JWT authentication.
Discover course requirements for building Python and FastAPI REST APIs, including Python 3.9, the community edition IDE, Postman for testing, a local server for a database, and the required libraries.
Explore fast api, a modern Python web framework for building restful APIs, and learn the installation process, including Python 3.6+ requirements and the roles of starlet and pedantic.
Create your first FastAPI project by scaffolding a simple API folder, writing a main.py with a get root that returns hello world, and running it with uvicorn on port 8000.
Build a blog API with FastAPI using path parameters to fetch articles by ID, enforce integer types, and explore Swagger UI and Redoc for interactive docs.
Learn how non-path parameters in FastAPI are automatically treated as query parameters, and see how skip and limit control article listings via URL query strings like?skip=0&limit=20.
Learn how to send data with a request body in FastAPI using pedantic models for validation, and expose a post endpoint that returns a response body and an article schema.
Connects the FastAPI API to a database using SQLAlchemy ORM, demonstrates declarative base models and schemas, starts with SQLite for testing, and plans migration to MySQL or Amazon RDS.
Create and insert article data in a FastAPI app by building a SQLAlchemy session dependency, posting new articles through the route, and returning a 201 created status.
Learn to fetch all articles from your database with a FastAPI endpoint, using a DB session, a response model, and a list of article schemas to limit output.
Learn to fetch a single article by id with an articles route, define a response model, and handle not found errors with a proper status code.
Update data in a Python FastAPI REST API by updating an article record identified by ID, using delta updates, committing the DB, and testing with Swagger UI or Postman.
Implement a delete data endpoint in a FastAPI app, deleting by ID, returning 200 or 204 with no content, and committing and syncing the database session.
Explore Amazon RDS integration for a FastAPI project, covering DB instances, engines like MySQL, MariaDB, Postgres, Oracle, and SQL Server, free tier options, and setup for public access.
Create a MySQL database inside an Amazon RDS db instance using MySQL Workbench, connect with the endpoint, and name it fast api; next, models.py will create tables for fast api.
Configure a MySQL database for a FastAPI app on an Amazon RDS instance by installing the MySQL client, setting credentials, and wiring CRUD routes tested via Postman and Swagger.
Deploy FastAPI to Heroku using Gunicorn with uvicorn workers, create a Procfile, push to GitHub, connect to Heroku, enable automatic deployments, and test articles endpoints.
Learn to build asynchronous APIs with FastAPI using async code, replacing SQLAlchemy with Encode databases for PostgreSQL, MySQL, and SQLite, and deploy to Elastic Beanstalk and Amazon RDS.
Create a sqlite database for a fastapi project using sqlalchemy, defining an articles table with id, title, and description, and implement startup and shutdown using an engine and metadata.
Insert data by building a pedantic model and article schema, then post to create records with status 201 created, returning the article ID and full payload via JSON.
Fetch all articles with an asynchronous endpoint, query the article model, and return a list using a response model with article schema out, omitting ids.
Learn to implement a FastAPI route to get a single article by id, handle 404, fetch one, return article schema via a response model, tested with Postman.
Update article records by ID, changing the title and description, execute the database update, and verify results by reading articles and using postman.
Delete articles by id via the delete endpoint in a FastAPI REST API. Return 204 no content and a confirmation message data is deleted.
Organize FastAPI projects by creating a dedicated articles router, separating routes, wiring it into the main app with include_router, and exposing CRUD endpoints for articles.
Create a user system by adding a users table and a FastAPI post endpoint that hashes passwords with passlib SHA256, returns a user schema, and verifies data in the database.
Learn to build a get all users endpoint in FastAPI, returning only id and username by using a response model, list typing, and route tagging.
Implement a login endpoint in FastAPI by defining a login schema, validating username and password with SHA-256, and returning user data while handling not found and invalid password errors.
Learn to create and verify JWT tokens in a FastAPI app, signing with a secret, setting expiration, and testing with swagger UI and postman.
Implement token-based authentication using jwt and get current user to protect routes, decode token data, and restrict article CRUD to authorized users.
Push your fast api project to GitHub to prepare for Elastic Beanstalk deployment. Create dot eb extensions, a fast api config, and a proc file, then commit and push.
Deploy a Python FastAPI rest api to Amazon Elastic Beanstalk via code pipeline and GitHub, showcasing auto scaling, load balancing, and health monitoring with Swagger UI.
Identify and fix a health problem in Elastic Beanstalk by updating the target group's health check path, restoring the Fast API deployment to a healthy state.
Learn how to buy a domain using Amazon Route 53, understand hosted zones as a collection of records for a domain, and navigate the console to register and manage it.
Attach a custom domain to a FastAPI app by configuring a hosted zone and creating two records, an alias to Elastic Beanstalk and a www CNAME, then verify routing.
Request a public SSL certificate from AWS Certificate Manager for your domain using DNS validation, then create Route 53 records to issue and apply it to your Python FastAPI API.
Learn how to add SSL to a Python REST API deployed on Elastic Beanstalk by configuring a load balancer, selecting a certificate, enabling HTTPS, and validating via health checks.
Set up a fastapi project with tortoise orm and install the required libraries. Create a database and define an article model with id, title, and description.
Create a post route to insert article data, import article model, build article objects and dictionaries, and return the inserted article with its ID as you test via docs.
Learn how to fetch all data with a get route in a FastAPI app, returning articles from the database and validating results via the api docs and live execution.
Fetch a single data item by id in a FastAPI REST API, define the details route, and return the article or a not found error for missing id.
Learn how to update data in a fastapi rest api by updating an article with a specific id, building the update model, and returning the updated article.
Define a pedantic status model and a delete route in a FastAPI app to remove articles by id, returning status or not found errors.
Hello Students
Welcome to Python REST API with FastAPI, Amazon RDS & Elastic Beanstalk, in this course we are going to build Python REST API with FastAPI, also we are going to learn how to integrate Amazon RDS with FastAPI and how you can deploy your Python REST API to Elastic Beanstalk, first of all let me talk about FastAPI and Elastic Beanstalk, also we will learn that how you can build Asynchronous API's with Python and FastAPI.
What is FastAPI
FastAPI is a Web framework for developing RESTful APIs in Python. FastAPI is based on Pydantic and type hints to validate, serialize, and deserialize data, and automatically auto-generate OpenAPI documents. It fully supports asynchronous programming and can run with Uvicorn and Gunicorn.
What is Amazon RDS
Amazon Relational Database Service (RDS) is a distributed relational database service by Amazon Web Services. It is a web service running "in the cloud" designed to simplify the setup, operation, and scaling of a relational database for use in applications.
What is Elastic Beanstalk
AWS Elastic Beanstalk is an orchestration service offered by Amazon Web Services for deploying applications which orchestrates various AWS services, including EC2, S3, Simple Notification Service, CloudWatch, autoscaling, and Elastic Load Balancers.
This course is divided on to different sections
1: In the first section we will have a simple introduction to FastAPI and also we are going to learn about installation process
2: In the second section we are going to learn about fundamental concepts of FastAPI, also in this section we integrate amazon RDS (Relations Database Service ) with FastAPI, at the end we deploy our Python REST API to Heroku.
3: In the third section we are going to learn about building asynchronous API's with Python and FastAPI, we will talk about user system, authorization, API router and token authentication, at the end we deploy our project to Amazon Elastic Beanstalk, after that we buy a domain name from Amazon Route53 and we add our custom domain in the Python REST API, at the end we request SSL Certificate from Amazon Certificate Manager and we secure our Python REST API.
4: in the last section we talk about Tortoise ORM (Object Relational Mapper ) and we create some examples