Code Monkey home page Code Monkey logo

fastapi-course-fbc's Introduction

Backend clone of social media app by using FastAPI

This API has 4 routes

1) Post route

This route is reponsible for creating post, deleting post, updating post and Checkinh post

2) Users route

This route is about creating users and searching user by id

3) Auth route

This route is about login system

4) Vote route

This route is about likes or vote system and this route contain code for upvote or back vote there is not logic about down vote

how to run locally

First clone this repo by using following command


git clone https://github.com/Sanjeev-Thiyagarajan/fastapi-course.git

then


cd fastapi-course

Then install fastapp using all flag like


pip install fastapi[all]

Then go this repo folder in your local computer run follwoing command


uvicorn main:app --reload

Then you can use following link to use the API


http://127.0.0.1:8000/docs 

After run this API you need a database in postgres

Create a database in postgres then create a file name .env and write the following things in you file

DATABASE_HOSTNAME = localhost
DATABASE_PORT = 5432
DATABASE_PASSWORD = passward_that_you_set
DATABASE_NAME = name_of_database
DATABASE_USERNAME = User_name
SECRET_KEY = 09d25e094faa2556c818166b7a99f6f0f4c3b88e8d3e7 
ALGORITHM = HS256
ACCESS_TOKEN_EXPIRE_MINUTES = 60(base)

Note: SECRET_KEY in this exmple is just a psudo key. You need to get a key for youself and you can get the SECRET_KEY from fastapi documantion

Here is the link of the playlist on youtube you can learn all about FASTAPI

fastapi-course-fbc's People

Contributors

sanjeev-thiyagarajan avatar muhammadnizamani avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.