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/__init__.py | 39 --------------------------------------- 1 file changed, 39 deletions(-) (limited to 'jb/models/__init__.py') diff --git a/jb/models/__init__.py b/jb/models/__init__.py index 7fe23a7..e69de29 100644 --- a/jb/models/__init__.py +++ b/jb/models/__init__.py @@ -1,39 +0,0 @@ -from decimal import Decimal - -from pydantic import BaseModel, ConfigDict, Field - - -class HTTPHeaders(BaseModel): - request_id: str = Field(alias="x-amzn-requestid", min_length=36, max_length=36) - content_type: str = Field(alias="content-type", min_length=26, max_length=26) - # 'content-length': '1255', - content_length: str = Field(alias="content-length", min_length=2) - # 'Mon, 15 Jan 2024 23:40:32 GMT' - date: str = Field() - - connection: str | None = Field(default=None) # 'close' - - -class ResponseMetadata(BaseModel): - model_config = ConfigDict(extra="forbid", validate_assignment=True) - - request_id: str = Field(alias="RequestId", min_length=36, max_length=36) - status_code: int = Field(alias="HTTPStatusCode", ge=200, le=599) - headers: HTTPHeaders = Field(alias="HTTPHeaders") - retry_attempts: int = Field(alias="RetryAttempts", ge=0) - - -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