Flask Order Management API

Flask Python MySQL

This project is a RESTful API for managing orders and order items.

ER Diagram

er_diagram

Features

  • Create Person: Create a new person.
  • Create Order: Create a new order.
  • Add Order Items: Add items to an existing order.
  • Get Orders: Retrieve a list of orders along with their details and items.
  • Get Order by ID: Retrieve a specific order by its ID.
  • Update Order: Update the name of an existing order.

Technologies Used

  • Flask: Python web framework for building the API.
  • MySQL: Database management system for storing order and item data.
  • Python MySQL Connector: Python driver for connecting to MySQL databases.
  • Postman: API development and testing tool.

API Endpoints

  • POST /create_person: Create a new person.
create_person
  • GET /orders: Retrieve a list of orders along with their details and items.
display_orders
  • GET /orders/{order_id}: Retrieve a specific order by its ID.
display_one_order
  • POST /orders/create_order: Create a new order.
create_order
  • PUT /orders/update: Update the name of an existing order.
update_order
  • POST /orders/add_items: Add items to an existing order.
add_items