Skip to content

bsthen/Sample-CRUD-FastAPI-MongoDB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sample CRUD FastAPI with MongoDB

Introduction

I'm going to build a sample CRUD with FastAPI and MongoDB. Using this sample to understand how to connect FastAPI with MongoDB.

Installations

git clone https://github.com/bsthen/Sample-CRUD-FastAPI-MongoDB.git && cd Sample-CRUD-FastAPI-MongoDB

Create a virtual environment:

python3 -m venv env

Or looking for install virtual envirometns link here.

Activate ENV for Linux or macOS

source env/bin/activate

Or

Activate ENV for Windows

\env\Scripts\activate.bat

Install Dependencies

pip3 install -r requirements.txt

Run the application

uvicorn main:app --reload

Open http://localhost:8000/docs/

Database

please copy sample.env and rename it to .env and replace your mongodb connection url.

About

Sample CRUD FastAPI with MongoDB

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published