Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added product service functionality in python, modified load_catalog.py #457

Conversation

Adibuer-lab
Copy link
Contributor

@Adibuer-lab Adibuer-lab commented Jun 29, 2023

Issue #, if available:

Description of changes:
In this pull request, I have introduced a Python version of the existing Product Service, which was originally written in Go. By switching to Python, we hope to simplify maintenance and allow more people to contribute effectively.

Here is a summary of the main changes:

Added new Python scripts replicating the functionality of the Product Service, which was originally written in Go. These scripts include src/products/src/products-service/app.py, src/products/src/products-service/aws.py, src/products/src/products-service/requirements.txt, src/products/src/products-service/routes.py, src/products/src/products-service/server.py, src/products/src/products-service/services.py

Updated the Dockerfile to use a Python 3.11 slim image instead of the Golang image and use python scripts. The Python packages required by the new scripts are installed via the requirements.txt file

Original dockerfile for Go container is now src/carts/Dockerfile-go

Modified src/products/load_catalog.py to allow setting local dynamodb endpoint as argument and create tables if not created yet

The Dockerfiles and Python scripts have been placed in the same locations as their Go counterparts to keep the structure of the service consistent.

Description of testing performed to validate your changes (required if pull request includes CloudFormation or source code changes):

I validated the changes using the available integration tests, ensuring that the Python scripts correctly mimic the functionality of the original Go code. I also deployed the retail demo store with the changes in my own AWS account to confirm that the service works as expected in a live environment. All tests passed, and the deployment was successful.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@Adibuer-lab Adibuer-lab marked this pull request as ready for review November 9, 2023 09:44
@Adibuer-lab Adibuer-lab closed this Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant