This project is the implementation of inventory function under an E-Commerce platform, being developed for the NYU course DevOps & Agile Methodologies. The /service
folder contains models.py
file for the model and a routes.py
file for the service. The /tests
folder has test case starter code for testing the model and the service separately. For functionality implemenation, we refered to the lab-flask-tdd for code examples.
The project contains the following:
.gitignore - this will ignore vagrant and other metadata files
.flaskenv - Environment variables to configure Flask
.gitattributes - File to gix Windows CRLF issues
.devcontainers/ - Folder with support for VSCode Remote Containers
dot-env-example - copy to .env to use environment variables
pyproject.toml - Poetry list of Python libraries required by your code
service/ - service python package
├── __init__.py - package initializer
├── config.py - configuration parameters
├── models.py - module with business models
├── routes.py - module with service routes
└── common - common code package
├── cli_commands.py - Flask command to recreate all tables
├── error_handlers.py - HTTP error handling code
├── log_handlers.py - logging setup code
└── status.py - HTTP status constants
tests/ - test cases package
├── __init__.py - package initializer
├── factories.py - Factory for testing with fake objects
├── test_cli_commands.py - test suite for the CLI
├── test_models.py - test suite for business models
└── test_routes.py - test suite for service routes
This project provides a REST API for managing an inventory system, allowing for creating, reading, updating, and deleting inventory items.
The models.py file defines the data model for the Inventory. It uses SQLAlchemy for ORM (Object-Relational Mapping). The key components of the model include:
It also includes methods for basic CRUD (Create, Read, Update, Delete) operations, as well as serialization/deserialization for working with JSON data.
The routes.py file defines the endpoints for the Inventory API. Currently, placeholders are present, and further implementation is needed. The API endpoints include:
License This project is licensed under the Apache License 2.0. See the LICENSE file for more details.
Copyright (c) 2016, 2024 John Rofrano. All rights reserved.
Licensed under the Apache License. See LICENSE
This repository is part of the New York University (NYU) masters class: CSCI-GA.2820-001 DevOps and Agile Methodologies created and taught by John Rofrano, Adjunct Instructor, NYU Courant Institute, Graduate Division, Computer Science, and NYU Stern School of Business.
The team members are: