Skip to main content

sc_crawler.table_fields

Enumerations, JSON nested data objects & other helper classes used in sc_crawler.tables.

Classes:

class HashableDict​

Bases: dict

A dict that can be hashed by its JSON representation.

Useful for typehinting dict-type table columns that are primary keys (which need to be hashable for SQLAlchemy ORM). See sc_crawler.table_fields.HashableJSON class for the related sa_type.

class HashableJSON​

Bases: TypeDecorator

Alternative JSON SQLAlchemy column representation, which can be hashed.

class Json​

Bases: BaseModel

Custom base SQLModel class that supports dumping as JSON.

class Status​

Bases: str, Enum

Last known status of a resource, e.g. active or inactive.

Functions:

  • best – Return the best of the given statuses: ACTIVE, PLANNED_FOR_RETIREMENT, INACTIVE, then RETIRED.

Attributes:

  • ACTIVE – Active and available resource.
  • INACTIVE – Unavailable. For Server/Database: temporary or unknown cause.
  • PLANNED_FOR_RETIREMENT – Planned for retirement; only valid for Server and Database.
  • RETIRED – Not orderable anymore, but prices may still exist (e.g. active multi-year contracts). Only valid for Server and Database.
  • is_orderable (bool) – Whether a Server/Database with this status can still be ordered.
  • is_general (bool) – Whether this status is valid for non-server/database models (ACTIVE or INACTIVE only).

attr
Status.ACTIVE
​

ACTIVE = 'active'

Active and available resource.

attr
Status.INACTIVE
​

INACTIVE = 'inactive'

Unavailable. For Server/Database: temporary or unknown cause.

attr
Status.PLANNED_FOR_RETIREMENT
​

PLANNED_FOR_RETIREMENT = 'planned-for-retirement'

Planned for retirement; only valid for Server and Database.

attr
Status.RETIRED
​

RETIRED = 'retired'

Not orderable anymore, but prices may still exist (e.g. active multi-year contracts). Only valid for Server and Database.

meth
Status.best
​

best(statuses)

Return the best of the given statuses: ACTIVE, PLANNED_FOR_RETIREMENT, INACTIVE, then RETIRED.

attr
Status.is_orderable
​

is_orderable: bool

Whether a Server/Database with this status can still be ordered.

attr
Status.is_general
​

is_general: bool

Whether this status is valid for non-server/database models (ACTIVE or INACTIVE only).

class ResourceType​

Bases: str, Enum

Kind of resource a benchmark score refers to.

Attributes:

  • SERVER – Compute server instance.
  • DATABASE – Managed database instance.

attr
ResourceType.SERVER
​

SERVER = 'server'

Compute server instance.

attr
ResourceType.DATABASE
​

DATABASE = 'database'

Managed database instance.

class Cpu​

Bases: Json

CPU details.

Attributes:

attr
Cpu.manufacturer
​

manufacturer: Optional[str] = None

The manufacturer of the processor, e.g. Intel or AMD.

attr
Cpu.family
​

family: Optional[str] = None

The product line/family of the processor, e.g. Xeon, Core i7, Ryzen 9.

attr
Cpu.model
​

model: Optional[str] = None

The model number of the processor, e.g. 9750H.

attr
Cpu.cores
​

cores: Optional[int] = None

Number of CPU cores.

attr
Cpu.threads
​

threads: Optional[int] = None

Number of CPU threads.

attr
Cpu.l1_cache_size
​

l1_cache_size: Optional[int] = None

L1 cache size in bytes.

attr
Cpu.l2_cache_size
​

l2_cache_size: Optional[int] = None

L2 cache size in bytes.

attr
Cpu.l3_cache_size
​

l3_cache_size: Optional[int] = None

L3 cache size in bytes.

attr
Cpu.microcode
​

microcode: Optional[str] = None

Microcode version.

attr
Cpu.capabilities
​

capabilities: List[str] = []

List of CPU flag/features/capabilities, e.g. MMX, Intel SGX etc.

attr
Cpu.bugs
​

bugs: List[str] = []

List of known bugs, e.g. cpu_meltdown spectre_v1.

attr
Cpu.bogomips
​

bogomips: Optional[float] = None

BogoMips value.

class Gpu​

Bases: Json

GPU accelerator details.

Attributes:

attr
Gpu.manufacturer
​

manufacturer: str

The manufacturer/brand of the GPU accelerator, e.g. Nvidia or AMD.

attr
Gpu.family
​

family: Optional[str] = None

The model family/architecture of the GPU accelerator.

attr
Gpu.model
​

model: Optional[str] = None

The model number of the GPU accelerator.

attr
Gpu.memory
​

memory: int

Memory (MiB) allocated to the GPU accelerator.

attr
Gpu.firmware_version
​

firmware_version: Optional[str] = None

Firmware version.

attr
Gpu.bios_version
​

bios_version: Optional[str] = None

Video BIOS version.

attr
Gpu.graphics_clock
​

graphics_clock: Optional[int] = None

GPU core clock speed (Mhz).

attr
Gpu.sm_clock
​

sm_clock: Optional[int] = None

Streaming Multiprocessor clock speed (Mhz).

attr
Gpu.mem_clock
​

mem_clock: Optional[int] = None

Memory clock speed (Mhz).

attr
Gpu.video_clock
​

video_clock: Optional[int] = None

Video clock speed (Mhz).

class StorageType​

Bases: str, Enum

Type of a storage, e.g. HDD or SSD.

Attributes:

  • HDD – Magnetic hard disk drive.
  • SSD – Solid-state drive.
  • NVME_SSD – NVMe based solid-state drive.

attr
StorageType.HDD
​

HDD = 'hdd'

Magnetic hard disk drive.

attr
StorageType.SSD
​

SSD = 'ssd'

Solid-state drive.

attr
StorageType.NVME_SSD
​

NVME_SSD = 'nvme ssd'

NVMe based solid-state drive.

class DatabaseEngine​

Bases: str, Enum

Managed database engine.

Attributes:

attr
DatabaseEngine.POSTGRESQL
​

POSTGRESQL = 'postgresql'

PostgreSQL.

class DatabaseWireProtocol​

Bases: str, Enum

Wire protocol for a managed database type.

Attributes:

attr
DatabaseWireProtocol.POSTGRESQL
​

POSTGRESQL = 'postgresql'

PostgreSQL.

class DatabaseHaLevel​

Bases: str, Enum

High availability level for a managed database type.

Functions:

  • ordered – Return supported HA levels in canonical order (most available first).

Attributes:

  • NONE – No high availability.
  • SINGLE_ZONE – Single-zone high availability, meaning multiple databases in the same zone with failover or multi-master.
  • MULTI_ZONE – Multi-zone high availability, meaning multiple databases in multiple zones of the same region with failover or multi-master.
  • MULTI_REGION – Multi-region high availability, meaning multiple databases in multiple regions with failover or multi-master.

attr
DatabaseHaLevel.NONE
​

NONE = 'none'

No high availability.

attr
DatabaseHaLevel.SINGLE_ZONE
​

SINGLE_ZONE = 'single-zone'

Single-zone high availability, meaning multiple databases in the same zone with failover or multi-master.

attr
DatabaseHaLevel.MULTI_ZONE
​

MULTI_ZONE = 'multi-zone'

Multi-zone high availability, meaning multiple databases in multiple zones of the same region with failover or multi-master.

attr
DatabaseHaLevel.MULTI_REGION
​

MULTI_REGION = 'multi-region'

Multi-region high availability, meaning multiple databases in multiple regions with failover or multi-master.

meth
DatabaseHaLevel.ordered
​

ordered(levels)

Return supported HA levels in canonical order (most available first).

class DatabaseHaStrategy​

Bases: str, Enum

High availability replication strategy for a managed database type.

Functions:

  • ordered – Return supported HA strategies in canonical order (most capable first).

Attributes:

  • NONE – No high availability strategy.
  • PASSIVE_STANDBY – Passive standby for failover, e.g. standard RDS Multi-AZ with block storage replication.
  • READABLE_CLUSTER – Readable cluster for read scaling and failover, e.g. RDS Multi-AZ Cluster / Aurora with engine replication.
  • MULTI_MASTER – True multi-master, e.g. CockroachDB / Spanner / DynamoDB Global Tables.

attr
DatabaseHaStrategy.NONE
​

NONE = 'none'

No high availability strategy.

attr
DatabaseHaStrategy.PASSIVE_STANDBY
​

PASSIVE_STANDBY = 'passive-standby'

Passive standby for failover, e.g. standard RDS Multi-AZ with block storage replication.

attr
DatabaseHaStrategy.READABLE_CLUSTER
​

READABLE_CLUSTER = 'readable-cluster'

Readable cluster for read scaling and failover, e.g. RDS Multi-AZ Cluster / Aurora with engine replication.

attr
DatabaseHaStrategy.MULTI_MASTER
​

MULTI_MASTER = 'multi-master'

True multi-master, e.g. CockroachDB / Spanner / DynamoDB Global Tables.

meth
DatabaseHaStrategy.ordered
​

ordered(strategies)

Return supported HA strategies in canonical order (most capable first).

class DatabaseSecurityFeature​

Bases: str, Enum

Security capabilities supported by DBaaS providers.

Attributes:

  • IP_FILTERING – Access via public endpoint restricted to explicit IP/CIDR ranges.
  • PRIVATE_NETWORK – Provisioned natively inside customer's own private network/subnets (e.g. VPC/VNet).
  • NETWORK_PEERING – Private access via cross-network peering or private service endpoints (e.g. PrivateLink).
  • IDENTITY_BASED_AUTH – Auth offloaded to cloud or enterprise identity providers (e.g. IAM, Entra ID, OIDC, SSO).
  • CLIENT_CERT_AUTH – Mutual TLS (mTLS) authentication requiring client-side SSL/TLS certificates.
  • ENFORCED_TLS – Enforceable requirement that all database connections use SSL/TLS (no plaintext fallback).
  • CUSTOMER_MANAGED_KEYS – Bring Your Own Key (BYOK) support for storage encryption.
  • AUDIT_LOGGING – Detailed database audit logs (e.g. pgaudit) exportable to external logging services or storage.

attr
DatabaseSecurityFeature.IP_FILTERING
​

IP_FILTERING = 'ip-filtering'

Access via public endpoint restricted to explicit IP/CIDR ranges.

attr
DatabaseSecurityFeature.PRIVATE_NETWORK
​

PRIVATE_NETWORK = 'private-network'

Provisioned natively inside customer's own private network/subnets (e.g. VPC/VNet).

attr
DatabaseSecurityFeature.NETWORK_PEERING
​

NETWORK_PEERING = 'network-peering'

Private access via cross-network peering or private service endpoints (e.g. PrivateLink).

attr
DatabaseSecurityFeature.IDENTITY_BASED_AUTH
​

IDENTITY_BASED_AUTH = 'identity-based-auth'

Auth offloaded to cloud or enterprise identity providers (e.g. IAM, Entra ID, OIDC, SSO).

attr
DatabaseSecurityFeature.CLIENT_CERT_AUTH
​

CLIENT_CERT_AUTH = 'client-cert-auth'

Mutual TLS (mTLS) authentication requiring client-side SSL/TLS certificates.

attr
DatabaseSecurityFeature.ENFORCED_TLS
​

ENFORCED_TLS = 'enforced-tls'

Enforceable requirement that all database connections use SSL/TLS (no plaintext fallback).

attr
DatabaseSecurityFeature.CUSTOMER_MANAGED_KEYS
​

CUSTOMER_MANAGED_KEYS = 'customer-managed-keys'

Bring Your Own Key (BYOK) support for storage encryption.

attr
DatabaseSecurityFeature.AUDIT_LOGGING
​

AUDIT_LOGGING = 'audit-logging'

Detailed database audit logs (e.g. pgaudit) exportable to external logging services or storage.

class DatabaseStorageScope​

Bases: str, Enum

Scope of a managed database storage product.

Attributes:

  • DATA – Primary database data storage.
  • BACKUP – Backup or archive storage.

attr
DatabaseStorageScope.DATA
​

DATA = 'data'

Primary database data storage.

attr
DatabaseStorageScope.BACKUP
​

BACKUP = 'backup'

Backup or archive storage.

class Disk​

Bases: Json

Disk definition based on size and storage type.

Attributes:

attr
Disk.size
​

size: int = 0

Storage size in GB.

attr
Disk.storage_type
​

storage_type: StorageType

Type of the storage.

attr
Disk.description
​

description: Optional[str] = None

Optional description of the storage, e.g. temp disk.

class TrafficDirection​

Bases: str, Enum

Direction of the network traffic.

Attributes:

  • IN – Inbound traffic.
  • OUT – Outbound traffic.

attr
TrafficDirection.IN
​

IN = 'inbound'

Inbound traffic.

attr
TrafficDirection.OUT
​

OUT = 'outbound'

Outbound traffic.

class CpuAllocation​

Bases: str, Enum

CPU allocation methods at cloud vendors.

Attributes:

  • SHARED – Shared CPU with other virtual server tenants.
  • BURSTABLE – CPU that can temporarily burst above its baseline performance.
  • DEDICATED – Dedicated CPU with known performance.

attr
CpuAllocation.SHARED
​

SHARED = 'Shared'

Shared CPU with other virtual server tenants.

attr
CpuAllocation.BURSTABLE
​

BURSTABLE = 'Burstable'

CPU that can temporarily burst above its baseline performance.

attr
CpuAllocation.DEDICATED
​

DEDICATED = 'Dedicated'

Dedicated CPU with known performance.

class CpuArchitecture​

Bases: str, Enum

CPU architectures.

Attributes:

  • ARM64 – 64-bit ARM architecture.
  • ARM64_MAC – Apple 64-bit ARM architecture.
  • I386 – 32-bit x86 architecture.
  • X86_64 – 64-bit x86 architecture.
  • X86_64_MAC – Apple 64-bit x86 architecture.

attr
CpuArchitecture.ARM64
​

ARM64 = 'arm64'

64-bit ARM architecture.

attr
CpuArchitecture.ARM64_MAC
​

ARM64_MAC = 'arm64_mac'

Apple 64-bit ARM architecture.

attr
CpuArchitecture.I386
​

I386 = 'i386'

32-bit x86 architecture.

attr
CpuArchitecture.X86_64
​

X86_64 = 'x86_64'

64-bit x86 architecture.

attr
CpuArchitecture.X86_64_MAC
​

X86_64_MAC = 'x86_64_mac'

Apple 64-bit x86 architecture.

class DdrGeneration​

Bases: str, Enum

Generation of the DDR SDRAM.

Attributes:

  • DDR3 – DDR3 SDRAM.
  • DDR4 – DDR4 SDRAM.
  • DDR5 – DDR5 SDRAM.

attr
DdrGeneration.DDR3
​

DDR3 = 'DDR3'

DDR3 SDRAM.

attr
DdrGeneration.DDR4
​

DDR4 = 'DDR4'

DDR4 SDRAM.

attr
DdrGeneration.DDR5
​

DDR5 = 'DDR5'

DDR5 SDRAM.

class Allocation​

Bases: str, Enum

Server allocation options.

Attributes:

attr
Allocation.ONDEMAND
​

ONDEMAND = 'ondemand'

On-demand server.

attr
Allocation.RESERVED
​

RESERVED = 'reserved'

Reserved server.

attr
Allocation.SPOT
​

SPOT = 'spot'

Spot/preemptible server.

class PriceUnit​

Bases: str, Enum

Supported units for the price tables.

Attributes:

  • YEAR – Price per year.
  • MONTH – Price per month.
  • HOUR – Price per hour.
  • GIB – Price per gibibyte (GiB).
  • GB – Price per gigabyte (GB).
  • GB_MONTH – Price per gigabyte (GB)/month.

attr
PriceUnit.YEAR
​

YEAR = 'year'

Price per year.

attr
PriceUnit.MONTH
​

MONTH = 'month'

Price per month.

attr
PriceUnit.HOUR
​

HOUR = 'hour'

Price per hour.

attr
PriceUnit.GIB
​

GIB = 'GiB'

Price per gibibyte (GiB).

attr
PriceUnit.GB
​

GB = 'GB'

Price per gigabyte (GB).

attr
PriceUnit.GB_MONTH
​

GB_MONTH = 'GB/month'

Price per gigabyte (GB)/month.

class PriceTier​

Bases: Json

Price tier definition.

Infinite bounds (e.g. for an open-ended upper tier) are stored as float("inf") in Python and automatically serialized to the JSON-safe string "Infinity" on export. Both representations are accepted as input: the model validator converts "Infinity" back to float("inf") when loading from JSON.

Attributes:

  • lower (float) – Lower bound of pricing tier, e.g. 100 GB. Unit is defined in the parent object.
  • upper (float) – Upper bound of pricing tier, e.g. 1 TB. Unit is defined in the parent object.
  • price (float) – Price in the pricing tier. Currency is defined in the parent object.

attr
PriceTier.lower
​

lower: float

Lower bound of pricing tier, e.g. 100 GB. Unit is defined in the parent object.

attr
PriceTier.upper
​

upper: float

Upper bound of pricing tier, e.g. 1 TB. Unit is defined in the parent object.

attr
PriceTier.price
​

price: float

Price in the pricing tier. Currency is defined in the parent object.

class Parallelism​

Bases: str, Enum

Parallelism mode of a benchmark run.

Attributes:

  • SINGLE – Benchmark run on a single core.
  • MULTI – Benchmark run across multiple cores.

attr
Parallelism.SINGLE
​

SINGLE = 'single'

Benchmark run on a single core.

attr
Parallelism.MULTI
​

MULTI = 'multi'

Benchmark run across multiple cores.

class BenchmarkComponentAggregationMethod​

Bases: str, Enum

How component benchmark scores are combined into one composite score.

Attributes:

attr
BenchmarkComponentAggregationMethod.WEIGHTED_GEOMETRIC_MEAN
​

WEIGHTED_GEOMETRIC_MEAN = 'weighted_geometric_mean'

Weighted geometric mean: 2 ** (Σ wᵢ·log2(normalizedᵢ) / Σ wᵢ). Preserves ratio/percentage linearity and is robust to outliers.

class BenchmarkComponentNormalizationMethod​

Bases: str, Enum

How each raw benchmark value is scaled to be comparable across benchmarks.

Attributes:

  • MEDIAN_RATIO – Oriented ratio to the fleet median for that benchmark: raw/median when

attr
BenchmarkComponentNormalizationMethod.MEDIAN_RATIO
​

MEDIAN_RATIO = 'median_ratio'

Oriented ratio to the fleet median for that benchmark: raw/median when higher-is-better, median/raw otherwise. 1.0 == the fleet median.

class BenchmarkComponentMissingPolicy​

Bases: str, Enum

What to do when a component has no usable measurement for a server.

Attributes:

  • IGNORE – Omit the component and renormalize weights over the rest (default).
  • PENALIZE – Substitute the component's penalty floor as the normalized value and keep
  • REQUIRE – Suppress the whole compound score for that server if the component is

attr
BenchmarkComponentMissingPolicy.IGNORE
​

IGNORE = 'ignore'

Omit the component and renormalize weights over the rest (default). Use when the metric is genuinely optional

attr
BenchmarkComponentMissingPolicy.PENALIZE
​

PENALIZE = 'penalize'

Substitute the component's penalty floor as the normalized value and keep its full weight, so the composite collapses toward zero. Use when missing means failure (e.g. a benchmark that timed out / could not complete).

attr
BenchmarkComponentMissingPolicy.REQUIRE
​

REQUIRE = 'require'

Suppress the whole compound score for that server if the component is missing. Use when the component is load-bearing for the profile's meaning.

class ScoreComponent​

Bases: Json

One component's contribution to a composite workload profile score.

Attributes:

  • label (str) – Human-readable, concise description of what the component measures.
  • weight (float) – Relative weight of this component. Weights within a workload sum to 1.0.
  • weight_share (float) – The weight of this component as a share of the total weight (0.0 for ignored components).
  • raw (int|float | None) – The raw benchmark value.
  • reference (int|float | None) – The reference benchmark value, e.g. the fleet median.
  • normalized (float | None) – The normalized benchmark value, e.g. the ratio of the raw value to the reference value.
  • higher_is_better (bool) – Whether a higher value is better.
  • note (str | None) – Optional note about this component.
  • impact (float | None) – How much this benchmark component raised or lowered the overall workload score. Values are approximate percentages (positive helps, negative hurts the final score), do not add up to the total score, and actual formula depends on the workload's aggregation and normalization methods.

attr
ScoreComponent.label
​

label: str

Human-readable, concise description of what the component measures.

attr
ScoreComponent.weight
​

weight: float

Relative weight of this component. Weights within a workload sum to 1.0.

attr
ScoreComponent.weight_share
​

weight_share: float

The weight of this component as a share of the total weight (0.0 for ignored components).

attr
ScoreComponent.raw
​

raw: int | float | None = None

The raw benchmark value.

attr
ScoreComponent.reference
​

reference: int | float | None = None

The reference benchmark value, e.g. the fleet median.

attr
ScoreComponent.normalized
​

normalized: float | None = None

The normalized benchmark value, e.g. the ratio of the raw value to the reference value.

attr
ScoreComponent.higher_is_better
​

higher_is_better: bool = True

Whether a higher value is better.

attr
ScoreComponent.note
​

note: str | None = None

Optional note about this component.

attr
ScoreComponent.impact
​

impact: float | None = None

How much this benchmark component raised or lowered the overall workload score. Values are approximate percentages (positive helps, negative hurts the final score), do not add up to the total score, and actual formula depends on the workload's aggregation and normalization methods.

class WorkloadScoreBreakdown​

Bases: Json

Per-server realized calculation of a composite workload profile score.

Attributes:

attr
WorkloadScoreBreakdown.aggregation
​

aggregation: BenchmarkComponentAggregationMethod

How the component benchmark scores are combined into one composite score.

attr
WorkloadScoreBreakdown.normalization
​

normalization: BenchmarkComponentNormalizationMethod

How each raw benchmark value is scaled to be comparable across benchmarks.

attr
WorkloadScoreBreakdown.coverage
​

coverage: float

The total weight of the components.

attr
WorkloadScoreBreakdown.components
​

components: list[ScoreComponent]

The components of the workload profile.

class Category​

Bases: str, Enum

Workload category for a cloud server type.

Attributes:

attr
Category.GENERAL_PURPOSE
​

GENERAL_PURPOSE = 'General Purpose'

General-purpose server.

attr
Category.COMPUTE_OPTIMIZED
​

COMPUTE_OPTIMIZED = 'Compute Optimized'

Compute-optimized server.

attr
Category.MEMORY_OPTIMIZED
​

MEMORY_OPTIMIZED = 'Memory Optimized'

Memory-optimized server.

attr
Category.STORAGE_AND_DATABASE
​

STORAGE_AND_DATABASE = 'Storage & Database'

Storage- and database-optimized server.

attr
Category.GPU_ACCELERATED
​

GPU_ACCELERATED = 'GPU Accelerated'

GPU-accelerated server.

attr
Category.BURSTABLE_AND_BUDGET
​

BURSTABLE_AND_BUDGET = 'Burstable & Budget'

Burstable and budget-friendly server.