Order processing engine
Project description
Order Processing Engine
Python library for order processing and inventory management.
Installation
pip install order-processing-engine
Requirements
boto3- AWS credentials configured
- DynamoDB tables set up
Environment Variables
AWS region, Orders table, Order items table, Inventory table, Low stock threshold
Quick Start
from order_processing_engine_pkg.order_processing import OrderProcessingEngine
order_engine = OrderProcessingEngine()
Usage
Lambda — Create PENDING Order from CSV
order_id, order_number = order_engine.create_order(
order_items=[
{'sku': 'LAP-001', 'product_name': 'Laptop', 'quantity': 2, 'price': 930.20},
{'sku': 'MOU-001', 'product_name': 'Mouse', 'quantity': 5, 'price': 25.67}
],
s3_file_path='my-bucket/orders/order.csv'
)
Staff Confirm Order
success, result = order_engine.confirm_order(order_id)
if success:
low_stock_items = result # list of {'sku': xxx, 'remaining': xxx}
else:
error_message = result
Staff Modify Order Item
success, message = order_engine.modify_order(order_id, item_id, new_quantity=4)
Staff Cancel Order
success, message = order_engine.order_cancel(order_id)
Allowed Status Transitions
PENDING -> COMPLETED (confirm order)
PENDING -> CANCELLED (cancel order)
COMPLETED -> (cannot change after completed)
CANCELLED -> (cannot change after cancelled)
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file order_processing_engine-1.0.0.tar.gz.
File metadata
- Download URL: order_processing_engine-1.0.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
adfa033c971597e207d18a98335aa7109bcdfcf6ff3145a89e08a67dd4880e61
|
|
| MD5 |
83d733dc14e667769f8c5012d7b9bd49
|
|
| BLAKE2b-256 |
17f4ec639369449bfc49ffbd4d16a6886fd60159c3f910d2c3c00e87e5fece57
|
File details
Details for the file order_processing_engine-1.0.0-py3-none-any.whl.
File metadata
- Download URL: order_processing_engine-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3b411606f6078b31c6354ae4bc07a84c89306dd5e72c060a5652a87a45d4888
|
|
| MD5 |
9426b834ac7cc6890b9808d5900de0fd
|
|
| BLAKE2b-256 |
6f33a9085e91c4ab7be51caa4fae02c1c279dead3166b6f282924002f6918f8d
|