tables
sc_crawler.tables
#
Table definitions for vendors, regions, zones, and other cloud resources.
Country
#
Bases: CountryBase
Country and continent mapping.
Attributes:
Name | Type | Description |
---|---|---|
country_id |
str
|
Country code by ISO 3166 alpha-2. |
continent |
str
|
Continent name. |
status |
Status
|
Status of the resource (active or inactive). |
observed_at |
datetime
|
Timestamp of the last observation. |
Source code in sc_crawler/tables.py
ComplianceFramework
#
Bases: ComplianceFrameworkBase
List of Compliance Frameworks, such as HIPAA or SOC 2 Type 1.
Attributes:
Name | Type | Description |
---|---|---|
compliance_framework_id |
str
|
Unique identifier. |
name |
str
|
Human-friendly name. |
abbreviation |
Optional[str]
|
Short abbreviation of the Framework name. |
description |
Optional[str]
|
Description of the framework in a few paragrahs, outlining key features and characteristics for reference. |
logo |
Optional[str]
|
Publicly accessible URL to the image of the Framework's logo. |
homepage |
Optional[str]
|
Public homepage with more information on the Framework. |
status |
Status
|
Status of the resource (active or inactive). |
observed_at |
datetime
|
Timestamp of the last observation. |
Source code in sc_crawler/tables.py
Vendor
#
Bases: VendorBase
Compute resource vendors, such as cloud and server providers.
Examples:
>>> from sc_crawler.tables import Vendor
>>> from sc_crawler.lookup import countries
>>> aws = Vendor(vendor_id='aws', name='Amazon Web Services', homepage='https://aws.amazon.com', country=countries["US"], founding_year=2002)
>>> aws
Vendor(vendor_id='aws'...
>>> from sc_crawler import vendors
>>> vendors.aws
Vendor(vendor_id='aws'...
Attributes:
Name | Type | Description |
---|---|---|
vendor_id |
str
|
Unique identifier. |
name |
str
|
Human-friendly name. |
logo |
Optional[str]
|
Publicly accessible URL to the image of the Vendor's logo. |
homepage |
Optional[str]
|
Public homepage of the Vendor. |
country_id |
str
|
Reference to the Country, where the Vendor's main headquarter is located. |
state |
Optional[str]
|
Optional state/administrative area of the Vendor's location within the Country. |
city |
Optional[str]
|
Optional city name of the Vendor's main location. |
address_line |
Optional[str]
|
Optional address line of the Vendor's main location. |
zip_code |
Optional[str]
|
Optional ZIP code of the Vendor's main location. |
founding_year |
int
|
4-digit year when the Vendor was founded. |
status_page |
Optional[str]
|
Public status page of the Vendor. |
status |
Status
|
Status of the resource (active or inactive). |
observed_at |
datetime
|
Timestamp of the last observation. |
Source code in sc_crawler/tables.py
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 |
|
session
deletable
property
writable
#
The Session to use for merging dependent objects into the database.
progress_tracker
deletable
property
writable
#
The sc_crawler.logger.VendorProgressTracker to use for updating progress bars.
set_table_rows_inactive
#
Set this vendor's records to INACTIVE in a table.
Positional arguments can be used to pass further filters (besides the default model.vendor_id filter) referencing the model object with SQLModel syntax.
Examples:
Source code in sc_crawler/tables.py
inventory_compliance_frameworks
#
Get the vendor's all compliance frameworks.
inventory_regions
#
inventory_zones
#
inventory_servers
#
Get the vendor's all server types.
Source code in sc_crawler/tables.py
inventory_server_prices
#
Get the current standard/ondemand/reserved prices of all server types.
Source code in sc_crawler/tables.py
inventory_server_prices_spot
#
Get the current spot prices of all server types.
Source code in sc_crawler/tables.py
VendorComplianceLink
#
Bases: VendorComplianceLinkBase
List of known Compliance Frameworks paired with vendors.
Attributes:
Name | Type | Description |
---|---|---|
vendor_id |
str
|
Reference to the Vendor. |
compliance_framework_id |
str
|
Reference to the Compliance Framework. |
comment |
Optional[str]
|
Optional references, such as dates, URLs, and additional information/evidence. |
status |
Status
|
Status of the resource (active or inactive). |
observed_at |
datetime
|
Timestamp of the last observation. |
Source code in sc_crawler/tables.py
Region
#
Bases: RegionBase
Regions of Vendors.
Attributes:
Name | Type | Description |
---|---|---|
vendor_id |
str
|
Reference to the Vendor. |
region_id |
str
|
Unique identifier, as called at the Vendor. |
name |
str
|
Human-friendly name. |
api_reference |
str
|
How this resource is referenced in the vendor API calls. This is usually either the id or name of the resource, depening on the vendor and actual API endpoint. |
display_name |
str
|
Human-friendly reference (usually the id or name) of the resource. |
aliases |
List[str]
|
List of other commonly used names for the same Region. |
country_id |
str
|
Reference to the Country, where the Region is located. |
state |
Optional[str]
|
Optional state/administrative area of the Region's location within the Country. |
city |
Optional[str]
|
Optional city name of the Region's location. |
address_line |
Optional[str]
|
Optional address line of the Region's location. |
zip_code |
Optional[str]
|
Optional ZIP code of the Region's location. |
lon |
Optional[float]
|
Longitude coordinate of the Region's known or approximate location. |
lat |
Optional[float]
|
Latitude coordinate of the Region's known or approximate location. |
founding_year |
Optional[int]
|
4-digit year when the Region was founded. |
green_energy |
Optional[bool]
|
If the Region is 100% powered by renewable energy. |
status |
Status
|
Status of the resource (active or inactive). |
observed_at |
datetime
|
Timestamp of the last observation. |
Source code in sc_crawler/tables.py
Zone
#
Bases: ZoneBase
Availability zones of Regions.
Attributes:
Name | Type | Description |
---|---|---|
vendor_id |
str
|
Reference to the Vendor. |
region_id |
str
|
Reference to the Region. |
zone_id |
str
|
Unique identifier, as called at the Vendor. |
name |
str
|
Human-friendly name. |
api_reference |
str
|
How this resource is referenced in the vendor API calls. This is usually either the id or name of the resource, depening on the vendor and actual API endpoint. |
display_name |
str
|
Human-friendly reference (usually the id or name) of the resource. |
status |
Status
|
Status of the resource (active or inactive). |
observed_at |
datetime
|
Timestamp of the last observation. |
Source code in sc_crawler/tables.py
Storage
#
Bases: StorageBase
Flexible storage options that can be attached to a Server.
Attributes:
Name | Type | Description |
---|---|---|
vendor_id |
str
|
Reference to the Vendor. |
storage_id |
str
|
Unique identifier, as called at the Vendor. |
name |
str
|
Human-friendly name. |
description |
Optional[str]
|
Short description. |
storage_type |
StorageType
|
High-level category of the storage, e.g. HDD or SDD. |
max_iops |
Optional[int]
|
Maximum Input/Output Operations Per Second. |
max_throughput |
Optional[int]
|
Maximum Throughput (MiB/s). |
min_size |
Optional[int]
|
Minimum required size (GiB). |
max_size |
Optional[int]
|
Maximum possible size (GiB). |
status |
Status
|
Status of the resource (active or inactive). |
observed_at |
datetime
|
Timestamp of the last observation. |
Source code in sc_crawler/tables.py
Server
#
Bases: ServerBase
Server types.
Attributes:
Name | Type | Description |
---|---|---|
vendor_id |
str
|
Reference to the Vendor. |
server_id |
str
|
Unique identifier, as called at the Vendor. |
name |
str
|
Human-friendly name. |
api_reference |
str
|
How this resource is referenced in the vendor API calls. This is usually either the id or name of the resource, depening on the vendor and actual API endpoint. |
display_name |
str
|
Human-friendly reference (usually the id or name) of the resource. |
description |
Optional[str]
|
Short description. |
family |
Optional[str]
|
Server family, e.g. General-purpose machine (GCP), or M5g (AWS). |
vcpus |
int
|
Default number of virtual CPUs (vCPU) of the server. |
hypervisor |
Optional[str]
|
Hypervisor of the virtual server, e.g. Xen, KVM, Nitro or Dedicated. |
cpu_allocation |
CpuAllocation
|
Allocation of CPU(s) to the server, e.g. shared, burstable or dedicated. |
cpu_cores |
Optional[int]
|
Default number of CPU cores of the server. Equals to vCPUs when HyperThreading is disabled. |
cpu_speed |
Optional[float]
|
Vendor-reported maximum CPU clock speed (GHz). |
cpu_architecture |
CpuArchitecture
|
CPU architecture (arm64, arm64_mac, i386, or x86_64). |
cpu_manufacturer |
Optional[str]
|
The manufacturer of the primary processor, e.g. Intel or AMD. |
cpu_family |
Optional[str]
|
The product line/family of the primary processor, e.g. Xeon, Core i7, Ryzen 9. |
cpu_model |
Optional[str]
|
The model number of the primary processor, e.g. 9750H. |
cpu_l1_cache |
Optional[int]
|
L1 cache size (byte). |
cpu_l2_cache |
Optional[int]
|
L2 cache size (byte). |
cpu_l3_cache |
Optional[int]
|
L3 cache size (byte). |
cpu_flags |
List[str]
|
CPU features/flags. |
cpus |
List[Cpu]
|
JSON array of known CPU details, e.g. the manufacturer, family, model; L1/L2/L3 cache size; microcode version; feature flags; bugs etc. |
memory_amount |
int
|
RAM amount (MiB). |
memory_generation |
Optional[DdrGeneration]
|
Generation of the DDR SDRAM, e.g. DDR4 or DDR5. |
memory_speed |
Optional[int]
|
DDR SDRAM clock rate (Mhz). |
memory_ecc |
Optional[bool]
|
If the DDR SDRAM uses error correction code to detect and correct n-bit data corruption. |
gpu_count |
int
|
Number of GPU accelerator(s). |
gpu_memory_min |
Optional[int]
|
Memory (MiB) allocated to the lowest-end GPU accelerator. |
gpu_memory_total |
Optional[int]
|
Overall memory (MiB) allocated to all the GPU accelerator(s). |
gpu_manufacturer |
Optional[str]
|
The manufacturer of the primary GPU accelerator, e.g. Nvidia or AMD. |
gpu_family |
Optional[str]
|
The product family of the primary GPU accelerator, e.g. Turing. |
gpu_model |
Optional[str]
|
The model number of the primary GPU accelerator, e.g. Tesla T4. |
gpus |
List[Gpu]
|
JSON array of GPU accelerator details, including the manufacturer, name, and memory (MiB) of each GPU. |
storage_size |
int
|
Overall size (GB) of the disk(s). |
storage_type |
Optional[StorageType]
|
Primary disk type, e.g. HDD, SSD, NVMe SSD, or network). |
storages |
List[Disk]
|
JSON array of disks attached to the server, including the size (MiB) and type of each disk. |
network_speed |
Optional[float]
|
The baseline network performance (Gbps) of the network card. |
inbound_traffic |
float
|
Amount of complimentary inbound traffic (GB) per month. |
outbound_traffic |
float
|
Amount of complimentary outbound traffic (GB) per month. |
ipv4 |
int
|
Number of complimentary IPv4 address(es). |
status |
Status
|
Status of the resource (active or inactive). |
observed_at |
datetime
|
Timestamp of the last observation. |
Source code in sc_crawler/tables.py
ServerPrice
#
Bases: ServerPriceBase
Server type prices per Region and Allocation method.
Attributes:
Name | Type | Description |
---|---|---|
vendor_id |
str
|
Reference to the Vendor. |
region_id |
str
|
Reference to the Region. |
zone_id |
str
|
Reference to the Zone. |
server_id |
str
|
Reference to the Server. |
operating_system |
str
|
Operating System. |
allocation |
Allocation
|
Allocation method, e.g. on-demand or spot. |
unit |
PriceUnit
|
Billing unit of the pricing model. |
price |
float
|
Actual price of a billing unit. |
price_upfront |
float
|
Price to be paid when setting up the resource. |
price_tiered |
List[PriceTier]
|
List of pricing tiers with min/max thresholds and actual prices. |
currency |
str
|
Currency of the prices. |
status |
Status
|
Status of the resource (active or inactive). |
observed_at |
datetime
|
Timestamp of the last observation. |
Source code in sc_crawler/tables.py
StoragePrice
#
Bases: StoragePriceBase
Flexible Storage prices in each Region.
Attributes:
Name | Type | Description |
---|---|---|
vendor_id |
str
|
Reference to the Vendor. |
region_id |
str
|
Reference to the Region. |
storage_id |
str
|
Reference to the Storage. |
unit |
PriceUnit
|
Billing unit of the pricing model. |
price |
float
|
Actual price of a billing unit. |
price_upfront |
float
|
Price to be paid when setting up the resource. |
price_tiered |
List[PriceTier]
|
List of pricing tiers with min/max thresholds and actual prices. |
currency |
str
|
Currency of the prices. |
status |
Status
|
Status of the resource (active or inactive). |
observed_at |
datetime
|
Timestamp of the last observation. |
Source code in sc_crawler/tables.py
TrafficPrice
#
Bases: TrafficPriceBase
Extra Traffic prices in each Region.
Attributes:
Name | Type | Description |
---|---|---|
vendor_id |
str
|
Reference to the Vendor. |
region_id |
str
|
Reference to the Region. |
direction |
TrafficDirection
|
Direction of the traffic: inbound or outbound. |
unit |
PriceUnit
|
Billing unit of the pricing model. |
price |
float
|
Actual price of a billing unit. |
price_upfront |
float
|
Price to be paid when setting up the resource. |
price_tiered |
List[PriceTier]
|
List of pricing tiers with min/max thresholds and actual prices. |
currency |
str
|
Currency of the prices. |
status |
Status
|
Status of the resource (active or inactive). |
observed_at |
datetime
|
Timestamp of the last observation. |
Source code in sc_crawler/tables.py
Ipv4Price
#
Bases: Ipv4PriceBase
Price of an IPv4 address in each Region.
Attributes:
Name | Type | Description |
---|---|---|
vendor_id |
str
|
Reference to the Vendor. |
region_id |
str
|
Reference to the Region. |
unit |
PriceUnit
|
Billing unit of the pricing model. |
price |
float
|
Actual price of a billing unit. |
price_upfront |
float
|
Price to be paid when setting up the resource. |
price_tiered |
List[PriceTier]
|
List of pricing tiers with min/max thresholds and actual prices. |
currency |
str
|
Currency of the prices. |
status |
Status
|
Status of the resource (active or inactive). |
observed_at |
datetime
|
Timestamp of the last observation. |
Source code in sc_crawler/tables.py
Benchmark
#
Bases: BenchmarkBase
Benchmark scenario definitions.
Attributes:
Name | Type | Description |
---|---|---|
benchmark_id |
str
|
Unique identifier of a specific Benchmark. |
name |
str
|
Human-friendly name. |
description |
Optional[str]
|
Short description. |
framework |
str
|
The name of the benchmark framework/software/tool used. |
config_fields |
dict
|
A dictionary of descriptions on the framework-specific config options, e.g. {"bandwidth": "Memory amount to use for compression in MB."}. |
measurement |
Optional[str]
|
The name of measurement recoreded in the benchmark. |
unit |
Optional[str]
|
Optional unit of measurement for the benchmark score. |
higher_is_better |
bool
|
If higher benchmark score means better performance, or vica versa. |
status |
Status
|
Status of the resource (active or inactive). |
observed_at |
datetime
|
Timestamp of the last observation. |
Source code in sc_crawler/tables.py
BenchmarkScore
#
Bases: BenchmarkScoreBase
Results of running Benchmark scenarios on Servers.
Attributes:
Name | Type | Description |
---|---|---|
vendor_id |
str
|
Reference to the Vendor. |
server_id |
str
|
Reference to the Server. |
benchmark_id |
str
|
Reference to the Benchmark. |
config |
HashableDict | dict
|
Dictionary of config parameters of the specific benchmark, e.g. {"bandwidth": 4096} |
score |
float
|
The resulting score of the benchmark. |
note |
Optional[str]
|
Optional note, comment or context on the benchmark score. |
status |
Status
|
Status of the resource (active or inactive). |
observed_at |
datetime
|
Timestamp of the last observation. |
Source code in sc_crawler/tables.py
tables
module-attribute
#
List of all SQLModel (table) models.