table_fields
sc_crawler.table_fields
#
Enumerations, JSON nested data objects & other helper classes used in sc_crawler.tables.
Classes:
| Name | Description |
|---|---|
HashableDict |
A dict that can be hashed by its JSON representation. |
HashableJSON |
Alternative JSON SQLAlchemy column representation, which can be hashed. |
Json |
Custom base SQLModel class that supports dumping as JSON. |
Status |
Last known status of a resource, e.g. active or inactive. |
Cpu |
CPU details. |
Gpu |
GPU accelerator details. |
StorageType |
Type of a storage, e.g. HDD or SSD. |
Disk |
Disk definition based on size and storage type. |
TrafficDirection |
Direction of the network traffic. |
CpuAllocation |
CPU allocation methods at cloud vendors. |
CpuArchitecture |
CPU architectures. |
DdrGeneration |
Generation of the DDR SDRAM. |
Allocation |
Server allocation options. |
PriceUnit |
Supported units for the price tables. |
PriceTier |
Price tier definition. |
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.
Source code in sc_crawler/table_fields.py
HashableJSON
#
Bases: TypeDecorator
Alternative JSON SQLAlchemy column representation, which can be hashed.
Source code in sc_crawler/table_fields.py
Json
#
Status
#
Cpu
#
Bases: Json
CPU details.
Attributes:
| Name | Type | Description |
|---|---|---|
manufacturer |
Optional[str]
|
The manufacturer of the processor, e.g. Intel or AMD. |
family |
Optional[str]
|
The product line/family of the processor, e.g. Xeon, Core i7, Ryzen 9. |
model |
Optional[str]
|
The model number of the processor, e.g. 9750H. |
cores |
Optional[int]
|
Number of CPU cores. |
threads |
Optional[int]
|
Number of CPU threads. |
l1_cache_size |
Optional[int]
|
L1 cache size in bytes. |
l2_cache_size |
Optional[int]
|
L2 cache size in bytes. |
l3_cache_size |
Optional[int]
|
L3 cache size in bytes. |
microcode |
Optional[str]
|
Microcode version. |
capabilities |
List[str]
|
List of CPU flag/features/capabilities, e.g. MMX, Intel SGX etc. |
bugs |
List[str]
|
List of known bugs, e.g. cpu_meltdown spectre_v1. |
bogomips |
Optional[float]
|
BogoMips value. |
Source code in sc_crawler/table_fields.py
manufacturer
class-attribute
instance-attribute
#
The manufacturer of the processor, e.g. Intel or AMD.
family
class-attribute
instance-attribute
#
The product line/family of the processor, e.g. Xeon, Core i7, Ryzen 9.
model
class-attribute
instance-attribute
#
The model number of the processor, e.g. 9750H.
capabilities
class-attribute
instance-attribute
#
List of CPU flag/features/capabilities, e.g. MMX, Intel SGX etc.
bugs
class-attribute
instance-attribute
#
List of known bugs, e.g. cpu_meltdown spectre_v1.
Gpu
#
Bases: Json
GPU accelerator details.
Attributes:
| Name | Type | Description |
|---|---|---|
manufacturer |
str
|
The manufacturer/brand of the GPU accelerator, e.g. Nvidia or AMD. |
family |
Optional[str]
|
The model family/architecture of the GPU accelerator. |
model |
Optional[str]
|
The model number of the GPU accelerator. |
memory |
int
|
Memory (MiB) allocated to the GPU accelerator. |
firmware_version |
Optional[str]
|
Firmware version. |
bios_version |
Optional[str]
|
Video BIOS version. |
graphics_clock |
Optional[int]
|
GPU core clock speed (Mhz). |
sm_clock |
Optional[int]
|
Streaming Multiprocessor clock speed (Mhz). |
mem_clock |
Optional[int]
|
Memory clock speed (Mhz). |
video_clock |
Optional[int]
|
Video clock speed (Mhz). |
Source code in sc_crawler/table_fields.py
manufacturer
instance-attribute
#
The manufacturer/brand of the GPU accelerator, e.g. Nvidia or AMD.
family
class-attribute
instance-attribute
#
The model family/architecture of the GPU accelerator.
graphics_clock
class-attribute
instance-attribute
#
GPU core clock speed (Mhz).
sm_clock
class-attribute
instance-attribute
#
Streaming Multiprocessor clock speed (Mhz).
StorageType
#
Type of a storage, e.g. HDD or SSD.
Attributes:
| Name | Type | Description |
|---|---|---|
HDD |
Magnetic hard disk drive. |
|
SSD |
Solid-state drive. |
|
NVME_SSD |
NVMe based solid-state drive. |
|
NETWORK |
Storage over network, e.g. using NFS. |
Source code in sc_crawler/table_fields.py
NETWORK
class-attribute
instance-attribute
#
Storage over network, e.g. using NFS.
Disk
#
Bases: Json
Disk definition based on size and storage type.
Attributes:
| Name | Type | Description |
|---|---|---|
size |
int
|
Storage size in GiB. |
storage_type |
StorageType
|
Type of the storage. |
description |
Optional[str]
|
Optional description of the storage, e.g. temp disk. |
Source code in sc_crawler/table_fields.py
TrafficDirection
#
CpuAllocation
#
CPU allocation methods at cloud vendors.
Attributes:
| Name | Type | Description |
|---|---|---|
SHARED |
Shared CPU with other virtual server tenants. |
|
BURSTABLE |
CPU that can temporarily burst above its baseline performance. |
|
DEDICATED |
Dedicated CPU with known performance. |
Source code in sc_crawler/table_fields.py
CpuArchitecture
#
CPU architectures.
Attributes:
| Name | Type | Description |
|---|---|---|
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. |
Source code in sc_crawler/table_fields.py
DdrGeneration
#
Allocation
#
PriceUnit
#
Supported units for the price tables.
Attributes:
| Name | Type | Description |
|---|---|---|
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. |
Source code in sc_crawler/table_fields.py
PriceTier
#
Bases: Json
Price tier definition.
As standard JSON does not support Inf, NaN etc values, those should be passed as string, e.g. for the upper bound.
See float_inf_to_str for converting an infinite numeric value into "Infinity".
Attributes:
| Name | Type | Description |
|---|---|---|
lower |
Union[float, str]
|
Lower bound of pricing tier, e.g. 100 GB. Unit is defined in the parent object. |
upper |
Union[float, str]
|
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. |
Source code in sc_crawler/table_fields.py
lower
instance-attribute
#
Lower bound of pricing tier, e.g. 100 GB. Unit is defined in the parent object.
upper
instance-attribute
#
Upper bound of pricing tier, e.g. 1 TB. Unit is defined in the parent object.
price
instance-attribute
#
Price in the pricing tier. Currency is defined in the parent object.