Skip to content

FastAPI CRUD on MongoDB with OAuth2 authentication

Notifications You must be signed in to change notification settings

shadanxd/oneassure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

One Assure Asignment

FastAPI backend that does CRUD operation on mongodb and stores user's username name phone number description fields

Run Locally

Clone the project

  git clone https://github.com/shadanxd/oneassure.git

Go to the project directory

  cd oneassure

Install dependencies

  pip install fastapi
  pip install pymongo
pip install uvicorn
 pip install fastapi-security
  pip install pydantic
  pip install python-jose

Start the server

  uvicorn main:app --reload

Use FastAPI docs to check end points

localhost:8000/docs

API Reference

SignUp

  PUT /signup/
  {
  "username": "string",
  "name": "string",
  "phone": 0,
  "password": "string",
  "Description": "string"
  }

Login

  POST /login

Update phone number

  POST /login/update/phone/{username}/{number}

Update Name of any user

  POST /login/update/name/{username}/{newname}

Get User Details

  GET /login/getDetails/{username}

About

FastAPI CRUD on MongoDB with OAuth2 authentication

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published