Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

CLI Interface Documentation

Overview: The CLI interface provides a simple way to interact with a PostgreSQL database for managing vehicle sales data. It offers various functionalities to perform operations such as listing vehicles, adding new sales, updating vehicle conditions, and more.

Usage:

  1. Ensure that Python and psycopg2 library are installed on your system.
  2. Run the Python script (db.py) in a terminal or command prompt.

Functionality:

  1. List All Vehicles

    • Displays all vehicles currently stored in the database.

    • Output includes make, model, and trim for each vehicle.

  2. Show Vehicle Instances

    • Displays all vehicle instances with details such as VIN, year, condition, odometer, and more.

  3. Add New Vehicle

    • Allows users to add a new vehicle to the database.

    • Prompts for make, model, and trim of the vehicle.

  4. Update Vehicle Condition

    • Updates the condition of a specific vehicle instance identified by its VIN.

    • Prompts for the VIN of the vehicle and the new condition.

  5. Delete Vehicle Instance

    • Deletes a specific vehicle instance from the database.

    • Prompts for the VIN of the vehicle instance to delete.

  6. List All Sales

    • Displays all sales records stored in the database.

    • Output includes VIN, seller, selling price, and sale date for each sale.

  7. Add New Sale

    • Allows users to add a new sale record to the database.

    • Prompts for VIN, seller name, selling price, and sale date.

  8. Total Sales Report

    • Calculates and displays the total sales amount from all sale records in the database.

  9. Show Vehicle by VIN

    • Displays details of a specific vehicle instance based on its VIN.

    • Prompts for the VIN of the vehicle instance to retrieve.

  10. Add Seller

    • Allows users to add a new seller to the database.

    • Prompts for the name of the seller.

  11. Exit

    • Exits the CLI interface.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages