backorder 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,51 @@
1
+ Metadata-Version: 2.4
2
+ Name: backorder
3
+ Version: 0.1.0
4
+ Summary: Lightweight Python utility for supply chain metrics, EOQ, safety stock, and inventory modeling.
5
+ Author-email: Albergracht Technologies <technologies@albergracht.com>
6
+ License-Expression: MIT
7
+ Keywords: backorder,inventory,supply-chain,eoq,ecommerce,logistics
8
+ Requires-Python: >=3.8
9
+ Description-Content-Type: text/markdown
10
+
11
+ # 📦 backorder (alpha)
12
+
13
+ A lightweight, zero-dependency Python utility for e-commerce inventory management, supply chain calculations, and backorder mitigation.
14
+
15
+ Features include Economic Order Quantity (EOQ), Safety Stock calculation, and Reorder Point (ROP) modeling.
16
+
17
+ ## ⚡ Installation
18
+
19
+ ```bash
20
+ pip install backorder
21
+ ```
22
+
23
+ ## 🚀 Quickstart
24
+
25
+ ```bash
26
+ import backorder
27
+
28
+ # 1. Economic Order Quantity (EOQ)
29
+ # Balances the cost of ordering against the cost of holding inventory.
30
+ optimal_qty = backorder.economic_order_quantity(
31
+ annual_demand=10000,
32
+ order_cost=50.0,
33
+ holding_cost_per_unit=2.5
34
+ )
35
+ print(f"Optimal Order Quantity (EOQ): {optimal_qty} units")
36
+
37
+ # 2. Reorder Point & Safety Stock
38
+ # Calculates exactly when to reorder to prevent backorders.
39
+ model = backorder.InventoryModel(
40
+ average_daily_demand=30,
41
+ max_daily_demand=45,
42
+ average_lead_time_days=7,
43
+ max_lead_time_days=10
44
+ )
45
+
46
+ print(f"Safety Stock Needed: {model.safety_stock} units")
47
+ print(f"Reorder Point (ROP): {model.reorder_point} units")
48
+ ```
49
+
50
+ ## ⚠️ Disclaimer
51
+ This package provides mathematical models for supply chain estimates. It does not replace comprehensive ERP systems. Real-world supply chains are subject to unpredictable disruptions.
@@ -0,0 +1,41 @@
1
+ # 📦 backorder (alpha)
2
+
3
+ A lightweight, zero-dependency Python utility for e-commerce inventory management, supply chain calculations, and backorder mitigation.
4
+
5
+ Features include Economic Order Quantity (EOQ), Safety Stock calculation, and Reorder Point (ROP) modeling.
6
+
7
+ ## ⚡ Installation
8
+
9
+ ```bash
10
+ pip install backorder
11
+ ```
12
+
13
+ ## 🚀 Quickstart
14
+
15
+ ```bash
16
+ import backorder
17
+
18
+ # 1. Economic Order Quantity (EOQ)
19
+ # Balances the cost of ordering against the cost of holding inventory.
20
+ optimal_qty = backorder.economic_order_quantity(
21
+ annual_demand=10000,
22
+ order_cost=50.0,
23
+ holding_cost_per_unit=2.5
24
+ )
25
+ print(f"Optimal Order Quantity (EOQ): {optimal_qty} units")
26
+
27
+ # 2. Reorder Point & Safety Stock
28
+ # Calculates exactly when to reorder to prevent backorders.
29
+ model = backorder.InventoryModel(
30
+ average_daily_demand=30,
31
+ max_daily_demand=45,
32
+ average_lead_time_days=7,
33
+ max_lead_time_days=10
34
+ )
35
+
36
+ print(f"Safety Stock Needed: {model.safety_stock} units")
37
+ print(f"Reorder Point (ROP): {model.reorder_point} units")
38
+ ```
39
+
40
+ ## ⚠️ Disclaimer
41
+ This package provides mathematical models for supply chain estimates. It does not replace comprehensive ERP systems. Real-world supply chains are subject to unpredictable disruptions.
@@ -0,0 +1,4 @@
1
+ from .inventory import InventoryModel, economic_order_quantity, LEGAL_DISCLAIMER
2
+
3
+ __version__ = "0.1.0"
4
+ __all__ = ["InventoryModel", "economic_order_quantity", "LEGAL_DISCLAIMER"]
@@ -0,0 +1,57 @@
1
+ import math
2
+ from dataclasses import dataclass
3
+ from typing import Dict, Any
4
+
5
+ LEGAL_DISCLAIMER = "Informational supply chain calculations only. Does not replace enterprise ERP systems."
6
+
7
+
8
+ def economic_order_quantity(annual_demand: float, order_cost: float, holding_cost_per_unit: float) -> int:
9
+ """
10
+ Calculates the Economic Order Quantity (EOQ).
11
+ Formula: sqrt((2 * Demand * OrderCost) / HoldingCost)
12
+ Returns the optimal number of units to order to minimize total inventory costs.
13
+ """
14
+ if holding_cost_per_unit <= 0:
15
+ raise ValueError("Holding cost must be greater than zero.")
16
+ if annual_demand < 0 or order_cost < 0:
17
+ raise ValueError("Demand and order cost cannot be negative.")
18
+
19
+ eoq = math.sqrt((2.0 * annual_demand * order_cost) / holding_cost_per_unit)
20
+ return math.ceil(eoq)
21
+
22
+
23
+ @dataclass
24
+ class InventoryModel:
25
+ average_daily_demand: float
26
+ max_daily_demand: float
27
+ average_lead_time_days: float
28
+ max_lead_time_days: float
29
+
30
+ @property
31
+ def safety_stock(self) -> int:
32
+ """
33
+ Calculates the Safety Stock required to prevent backorders during lead time variability.
34
+ Formula: (Max Demand * Max Lead Time) - (Average Demand * Average Lead Time)
35
+ """
36
+ max_scenario = self.max_daily_demand * self.max_lead_time_days
37
+ avg_scenario = self.average_daily_demand * self.average_lead_time_days
38
+ stock = max_scenario - avg_scenario
39
+ return max(0, math.ceil(stock))
40
+
41
+ @property
42
+ def reorder_point(self) -> int:
43
+ """
44
+ Calculates the Reorder Point (ROP) - the inventory level at which a new order should be placed.
45
+ Formula: (Average Daily Demand * Average Lead Time) + Safety Stock
46
+ """
47
+ lead_time_demand = self.average_daily_demand * self.average_lead_time_days
48
+ return math.ceil(lead_time_demand + self.safety_stock)
49
+
50
+ def summary(self) -> Dict[str, Any]:
51
+ return {
52
+ "average_daily_demand": self.average_daily_demand,
53
+ "average_lead_time_days": self.average_lead_time_days,
54
+ "safety_stock": self.safety_stock,
55
+ "reorder_point": self.reorder_point,
56
+ "disclaimer": LEGAL_DISCLAIMER
57
+ }
@@ -0,0 +1,51 @@
1
+ Metadata-Version: 2.4
2
+ Name: backorder
3
+ Version: 0.1.0
4
+ Summary: Lightweight Python utility for supply chain metrics, EOQ, safety stock, and inventory modeling.
5
+ Author-email: Albergracht Technologies <technologies@albergracht.com>
6
+ License-Expression: MIT
7
+ Keywords: backorder,inventory,supply-chain,eoq,ecommerce,logistics
8
+ Requires-Python: >=3.8
9
+ Description-Content-Type: text/markdown
10
+
11
+ # 📦 backorder (alpha)
12
+
13
+ A lightweight, zero-dependency Python utility for e-commerce inventory management, supply chain calculations, and backorder mitigation.
14
+
15
+ Features include Economic Order Quantity (EOQ), Safety Stock calculation, and Reorder Point (ROP) modeling.
16
+
17
+ ## ⚡ Installation
18
+
19
+ ```bash
20
+ pip install backorder
21
+ ```
22
+
23
+ ## 🚀 Quickstart
24
+
25
+ ```bash
26
+ import backorder
27
+
28
+ # 1. Economic Order Quantity (EOQ)
29
+ # Balances the cost of ordering against the cost of holding inventory.
30
+ optimal_qty = backorder.economic_order_quantity(
31
+ annual_demand=10000,
32
+ order_cost=50.0,
33
+ holding_cost_per_unit=2.5
34
+ )
35
+ print(f"Optimal Order Quantity (EOQ): {optimal_qty} units")
36
+
37
+ # 2. Reorder Point & Safety Stock
38
+ # Calculates exactly when to reorder to prevent backorders.
39
+ model = backorder.InventoryModel(
40
+ average_daily_demand=30,
41
+ max_daily_demand=45,
42
+ average_lead_time_days=7,
43
+ max_lead_time_days=10
44
+ )
45
+
46
+ print(f"Safety Stock Needed: {model.safety_stock} units")
47
+ print(f"Reorder Point (ROP): {model.reorder_point} units")
48
+ ```
49
+
50
+ ## ⚠️ Disclaimer
51
+ This package provides mathematical models for supply chain estimates. It does not replace comprehensive ERP systems. Real-world supply chains are subject to unpredictable disruptions.
@@ -0,0 +1,8 @@
1
+ README.md
2
+ pyproject.toml
3
+ backorder/__init__.py
4
+ backorder/inventory.py
5
+ backorder.egg-info/PKG-INFO
6
+ backorder.egg-info/SOURCES.txt
7
+ backorder.egg-info/dependency_links.txt
8
+ backorder.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ backorder
@@ -0,0 +1,19 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "backorder"
7
+ version = "0.1.0"
8
+ description = "Lightweight Python utility for supply chain metrics, EOQ, safety stock, and inventory modeling."
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ requires-python = ">=3.8"
12
+ authors = [
13
+ { name = "Albergracht Technologies", email = "technologies@albergracht.com" },
14
+ ]
15
+ keywords = ["backorder", "inventory", "supply-chain", "eoq", "ecommerce", "logistics"]
16
+
17
+ [tool.setuptools.packages.find]
18
+ where = ["."]
19
+ include = ["backorder*"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+