From bbc373bd2e9617c8da829b3a180e9c42f139a380 Mon Sep 17 00:00:00 2001 From: Max Nanis Date: Thu, 10 Sep 2026 10:27:51 -0700 Subject: Less from init, more from generalresearch, basic db test from shared conftest --- jb/models/amt.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 jb/models/amt.py (limited to 'jb/models/amt.py') diff --git a/jb/models/amt.py b/jb/models/amt.py new file mode 100644 index 0000000..e012741 --- /dev/null +++ b/jb/models/amt.py @@ -0,0 +1,19 @@ +from decimal import Decimal + +from pydantic import BaseModel, ConfigDict, Field + + +class AMTAccount(BaseModel): + model_config = ConfigDict(extra="ignore", validate_assignment=True) + + # Remaining available AWS Billing usage if you have enabled AWS Billing. + available_balance: Decimal = Field() + onhold_balance: Decimal = Field(default=Decimal(0)) + + # --- Properties --- + + @property + def is_healthy(self) -> bool: + # A healthy account is one with at least $2,500 worth of + # credit available to it + return self.available_balance >= 2_500 -- cgit v1.2.3