aboutsummaryrefslogtreecommitdiff
path: root/jb/models/amt.py
diff options
context:
space:
mode:
authorMax Nanis2026-09-10 10:27:51 -0700
committerMax Nanis2026-09-10 10:27:51 -0700
commitbbc373bd2e9617c8da829b3a180e9c42f139a380 (patch)
tree18fea752398e948ee5ddbc57f3ab871e8caae5fb /jb/models/amt.py
parent4dca7296742b607e74f16e2f6484c51163a41ace (diff)
downloadamt-jb-bbc373bd2e9617c8da829b3a180e9c42f139a380.tar.gz
amt-jb-bbc373bd2e9617c8da829b3a180e9c42f139a380.zip
Less from init, more from generalresearch, basic db test from shared conftest
Diffstat (limited to 'jb/models/amt.py')
-rw-r--r--jb/models/amt.py19
1 files changed, 19 insertions, 0 deletions
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