Skip to content

Aliemeka/bizzbuzz-fastapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bizzbuzz-fastapi

BizzBuzz API, a makeshift social media application that allows user to create long post messages.

Endpoint documentation

Swagger Documentation
Redocs Documentation

Requirements

  • You must be using at least Python 3.6

Set up

  1. Clone the project in your local computer
  2. Create a virtualenv file
  3. Terminal/CLI command: pip install --upgrade pip to update your pip version
  4. Install all dependencies with pip install -r requirements.txt
  5. Run uvicorn main:app to start the server.

Dependencies

Main dependencies

FastAPI for api server
Uvicorn - lightweight ASGI server
Pydantic to create schemas (comes with FastAPI by default)
Swagger UI for API documentation (embedded in FastAPI by default)
Redocs - alternative API documentation (embedded in FastAPI by default)
SQLAlchemy - database orm for interacting with SQL database
Bcrypt - for password hashing
PyJWT - for generating jwt tokens used for user authentication

Dev dependencies

Black for code formatting

Routes

Authentication routes /auth/*

  • POST /auth/register registers a new user
  • POST /auth/login logins a user using either the username or email and password

Posts routes /posts

  • GET /posts gets post (can also take "search" and "status" query parameter)
  • POST /posts adds a new post *
  • GET /posts/{postId} gets a post by id
  • PUT /posts/{postId} updates a post that matches an id * **
  • PATCH /posts/{postId}/status updates the status of a post that matches an id * **
  • DELETE /posts/{postId} deletes a post from database * **

* requires jwt token on Authorization header of request
** *requires that user is the author of post/like/reply*

Contribution

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a build.
  2. Update the README.md with details of changes to the interface, this includes new environment variables, exposed ports, useful file locations and container parameters.
  3. Make all pull requests of new features to the develop branch so it can be project

About

Bizzbuzz api built with FastAPI

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages