Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

This article will teach you how to create a CRUD RESTful API with Python, FastAPI, SQLAlchemy ORM, Pydantic, Alembic, PostgreSQL, and Docker-compose to perform the basic Create/Read/Update/Delete operations against a database.

Notifications You must be signed in to change notification settings

wpcodevo/python_fastapi

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RESTful API with Python,SQLAlchemy, & FastAPI: Access and Refresh Tokens

In this article, you'll learn how to secure a FastAPI app by implementing access and refresh token functionalities using JSON Web Tokens (JWTs). We'll use the FastAPI JWT Auth package to sign, encode and decode the access and refresh JWT tokens.

RESTful API with Python,SQLAlchemy, & FastAPI: Access and Refresh Tokens

Topics Covered

  • Python FastAPI JWT Authentication Overview
  • How to Setup FastAPI with PostgreSQL
    • Setup FastAPI
    • Initialize a Simple FastAPI Server
  • Setting up Environment Variables in FastAPI
  • Connect to the PostgreSQL Docker Container
  • Installing the UUID OSSP PostgreSQL Extension
  • Create Database Models with SQLAlchemy in FastAPI
  • Creating Schemas with Pydantic in FastAPI
  • Password Management with Bcrypt
  • Configure the FastAPI JWT Auth Extension
  • Creating the Authentication Controllers
    • User Registration Controller
    • User Sign-in Controller
    • Refresh Access Token Controller
    • Logout User Controller
  • How to add Protected Routes
  • Create a User Controller
  • Adding the Routes to FastAPI Middleware Pipeline
  • Database Migration with Alembic
  • Testing the FastAPI JSON Web Token API

Read the entire article here: https://codevoweb.com/restful-api-with-python-fastapi-access-and-refresh-tokens

1. RESTful API with Python,SQLAlchemy, & FastAPI: Access and Refresh Tokens

RESTful API with Python, SQLAlchemy, & FastAPI: Access and Refresh Tokens

2. RESTful API with Python, SQLAlchemy, & FastAPI: Send HTML Emails

RESTful API with Python, SQLAlchemy & FastAPI: Send HTML Emails

3. CRUD RESTful API Server with Python, FastAPI, SQLAlchemy, and PostgreSQL

CRUD RESTful API Server with Python, FastAPI, SQLAlchemy, and PostgreSQL

About

This article will teach you how to create a CRUD RESTful API with Python, FastAPI, SQLAlchemy ORM, Pydantic, Alembic, PostgreSQL, and Docker-compose to perform the basic Create/Read/Update/Delete operations against a database.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.