An open API service indexing awesome lists of open source software.

https://github.com/namangupta123/pizza_delivery_backend

REST API for a Pizza delivery service built with FastAPI, SQLAlchemy and PostgreSQL.
https://github.com/namangupta123/pizza_delivery_backend

fastapi postgresql rest-api server sqlalchemy-python

Last synced: 4 months ago
JSON representation

REST API for a Pizza delivery service built with FastAPI, SQLAlchemy and PostgreSQL.

Awesome Lists containing this project

README

        

## PIZZA DELIVERY BACKEND
This is a REST API for a Pizza delivery service built with FastAPI, SQLAlchemy and PostgreSQL.

## ROUTES TO IMPLEMENT
| METHOD | ROUTE | FUNCTIONALITY |ACCESS|
| ------- | ----- | ------------- | ------------- |
| *POST* | ```/auth/signup/``` | _Register new user_| _All users_|
| *POST* | ```/auth/login/``` | _Login user_|_All users_|
| *POST* | ```/orders/order/``` | _Place an order_|_All users_|
| *PUT* | ```/orders/order/update/{order_id}/``` | _Update an order_|_All users_|
| *PUT* | ```/orders/order/status/{order_id}/``` | _Update order status_|_Superuser_|
| *DELETE* | ```/orders/order/delete/{order_id}/``` | _Delete/Remove an order_ |_All users_|
| *GET* | ```/orders/user/orders/``` | _Get user's orders_|_All users_|
| *GET* | ```/orders/orders/``` | _List all orders made_|_Superuser_|
| *GET* | ```/orders/orders/{order_id}/``` | _Retrieve an order_|_Superuser_|
| *GET* | ```/orders/user/order/{order_id}/``` | _Get user's specific order_|
| *GET* | ```/docs/``` | _View API documentation_|_All users_|

## How to run the Project
- Install Postgreql
- Install Python
- Git clone the project with ``` git clone https://github.com/Namangupta123/Pizza_delivery_backend```
- Install the requirements with ```pip install -r requirements.txt ```
- Set Up your PostgreSQL database and set its URI in your ```database.py```
- Create your database by running ``` python init_db.py ```
- Finally run the API ```uvicorn main:app ```

## Contributing
Contributions are welcome! Here's how you can help:

1. Fork the repository
2. Create a new branch (`git checkout -b feature/improvement`)
3. Make your changes
4. Commit your changes (`git commit -am 'Add new feature'`)
5. Push to the branch (`git push origin feature/improvement`)
6. Create a Pull Request