0% found this document useful (0 votes)
15 views2 pages

Ecommerce Logging Assignment

The mini project assignment involves creating an E-commerce Order Logger using Python logging and SQLite3 to log order activities such as adding, updating, and canceling orders. Key tasks include loading CSV data into a database, implementing two versions of a logger, logging operations with relevant details, and optionally adding advanced features like context-based logging and analytics. The submission should include a Python script or Jupyter Notebook, sample data, logs, and optionally documentation.

Uploaded by

ratneshradhe777
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views2 pages

Ecommerce Logging Assignment

The mini project assignment involves creating an E-commerce Order Logger using Python logging and SQLite3 to log order activities such as adding, updating, and canceling orders. Key tasks include loading CSV data into a database, implementing two versions of a logger, logging operations with relevant details, and optionally adding advanced features like context-based logging and analytics. The submission should include a Python script or Jupyter Notebook, sample data, logs, and optionally documentation.

Uploaded by

ratneshradhe777
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Mini Project Assignment: E-commerce Order Logger with Logging & SQLite3

Objective:

Develop a real-world mini project that logs order activities (like add, update, cancel)

in an E-commerce system using Python logging and SQLite3.

Files Provided:

- ecommerce_orders.csv (sample order data)

Tasks:

1. Load the CSV data and insert it into an SQLite database.

2. Create two versions of your logger:

a. Without logging config (basic logging with FileHandler & StreamHandler)

b. With logging config (using dictConfig or config file)

3. Implement order actions (e.g., update status, cancel order, add order).

4. Log every operation: user, action, order ID, and timestamp.

5. Create a function to fetch all order logs.

6. Optional: Add rotating file handler or timed file handler.

Logging Tips:

- Use loggers with appropriate names.

- Create a custom formatter to include function name, line number, and time.

- Store logs in `logs/` folder (create programmatically if needed).

Advanced (Optional):

- Use context-based logging.


- Allow SQLite rollback on failure and log the error.

- Create an analytics function to show:

a. Most frequently ordered product

b. Number of pending vs delivered orders

Submission Format:

- Python script or Jupyter Notebook

- `ecommerce_orders.csv`

- `project_logs/` directory with logs

- Readme.md (optional, for documentation)

Evaluation Criteria:

- Code structure and clarity

- Logging usage and completeness

- SQLite usage and data accuracy

- Optional tasks if completed

Good luck!

You might also like