Skip to content

This article will teach you how to create a CRUD RESTful API with Python, FastAPI, PyMongo, MongoDB, 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

rgstephens/fastapi_mongodb

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CRUD RESTful API Server with Python, FastAPI, and MongoDB

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

CRUD RESTful API Server with Python, FastAPI, and MongoDB

Topics Covered

  • Python, FastAPI, MongoDB CRUD API Overview
  • Setting up FastAPI with MongoDB
    • Installing FastAPI
  • Running the FastAPI Server
  • Loading Environment Variables with Pydantic
  • Connecting to the MongoDB Database Server
  • Creating the Schemas with Pydantic
  • Serializers for the MongoDB Documents
  • Creating the API Route Controllers
    • Get All Posts Controller
    • Create New Post Controller
    • Update Post Controller
    • Get Single Post Controller
    • Delete Post Controller
  • Add the Routes to the FastAPI Middleware Stack

Read the entire article here: https://codevoweb.com/crud-restful-api-server-with-python-fastapi-and-mongodb

Articles in this series:

1. API with Python, FastAPI, and MongoDB: JWT Authentication

API with Python, FastAPI, and MongoDB: JWT Authentication

2. Build API with Python & FastAPI: SignUp User and Verify Email

Build API with Python & FastAPI: SignUp User and Verify Email

3. CRUD RESTful API Server with Python, FastAPI, and MongoDB

CRUD RESTful API Server with Python, FastAPI, and MongoDB

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 70.0%
  • HTML 25.2%
  • Shell 4.2%
  • Makefile 0.6%