BizzBuzz API, a makeshift social media application that allows user to create long post messages.
Swagger Documentation
Redocs Documentation
- You must be using at least Python 3.10
- Clone the project in your local computer
- Create a virtualenv file
- Terminal/CLI command:
pip install --upgrade pip
to update your pip version - Install all dependencies with
pip install -r requirements.txt
- Run
uvicorn main:app
to start the server.
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
Sendgrid - sendgrid library for sending emails
Black for code formatting
- POST
/auth/register
registers a new user - POST
/auth/login
logins a user using either the username or email and password
- 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*
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.
- Ensure any install or build dependencies are removed before the end of the layer when doing a build.
- Update the README.md with details of changes to the interface, this includes new environment variables, exposed ports, useful file locations and container parameters.
- Make all pull requests of new features to the develop branch so it can be project