sc_crawler.tables
Table definitions for vendors, regions, zones, and other cloud resources.
Classes:
- Country – Country and continent mapping.
- ComplianceFramework – List of Compliance Frameworks, such as HIPAA or SOC 2 Type 1.
- Vendor – Compute resource vendors, such as cloud and server providers.
- VendorComplianceLink – List of known Compliance Frameworks paired with vendors.
- Region – Regions of Vendors.
- Zone – Availability zones of Regions.
- Storage – Flexible storage options that can be attached to a Server.
- Server – Server types.
- ServerPrice – Server type prices per Region and Allocation method.
- ServerDescription – Variable length, plain English descriptions of Server hardware specs, performance, cost-efficiency, and workflow fit.
- StoragePrice – Flexible Storage prices in each Region.
- Database – Managed database SKUsSKU: Stock Keeping UnitAn identifier of a product a vendor sells, e.g. a server type, or a component that its price is built from, such as a vCPU or a GB of memory in a region. Cloud vendors' price lists are made of SKUs, which the Crawler combines into the price of each server type.Glossary.
- DatabasePrice – Managed database SKU prices per Region.
- DatabaseStorage – Managed database storage products.
- DatabaseStoragePrice – Managed database storage prices in each Region.
- TrafficPrice – Extra Traffic prices in each Region.
- Ipv4Price – Price of an IPv4 address in each Region.
- Benchmark – Benchmark scenario definitions.
- BenchmarkScore – Results of running Benchmark scenarios on Servers or managed Databases.
- ArchiveRule – Rules archiving records that were replaced by another record or deliberately dropped.
- Metadata – Key/value metadata table for database release information.
Functions:
- is_table – Checks if an object is a SQLModel table definition.
Attributes:
class Country tables.py:63–67
Bases: CountryBase
Country and continent mapping.
Attributes:
- 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.
class ComplianceFramework tables.py:70–75
Bases: ComplianceFrameworkBase
List of Compliance Frameworks, such as HIPAA or SOC 2 Type 1.
Attributes:
- 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 paragraphs, outlining key features and characteristics for reference. - logo (
Optional[str]) – Publicly accessible URLURL: Uniform Resource LocatorThe address of a resource on the web or a network, such as https://sparecores.com/, made of a scheme, a host, and a path.Glossary 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.
class Vendor tables.py:78–477
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:
- vendor_id (
str) – Unique identifier. - name (
str) – Human-friendly name. - logo (
Optional[str]) – Publicly accessible URLURL: Uniform Resource LocatorThe address of a resource on the web or a network, such as https://sparecores.com/, made of a scheme, a host, and a path.Glossary 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 public cloud service of the Vendor was launched. - status_page (
Optional[str]) – Public status page of the Vendor. - stopped_server_charged (
Optional[bool]) – If the Vendor charges for stopped servers. In case it depends on the instance type or different versions of stopped states, this field reports the worst case. - billing_increment_seconds (
Optional[int]) – The smallest increment of time for which the Vendor bills for. - minimum_billing_seconds (
Optional[int]) – The minimum amount of time for which the Vendor bills for. In case it depends on the instance type or other context, this field reports the worst case. - billing_comment (
Optional[str]) – Comment on the Vendor's billing. - status (
Status) – Status of the resource (active or inactive). - observed_at (
datetime) – Timestamp of the last observation.
Functions:
- set_table_rows_inactive – Set this vendor's records to INACTIVE in a table.
- set_table_rows_active – Set this vendor's records to ACTIVE in a table.
- inventory_compliance_frameworks – Get the vendor's all compliance frameworks.
- inventory_regions – Get the vendor's all regions.
- inventory_zones – Get all the zones in the vendor's regions.
- inventory_servers – Get the vendor's all server types.
- inventory_server_prices – Get the current standard/ondemand/reserved prices of all server types.
- inventory_server_prices_spot – Get the current spot pricesspot instanceA cloud server that runs on the vendor's spare capacity, at a large discount from its on-demand price, but which the vendor can stop or take back at short notice when it needs the capacity. Spot prices change with the demand, e.g. several times a day.AWS docsGlossary of all server types.
- inventory_storages – Get the vendor's all storage types.
- inventory_storage_prices – Get the current prices of all storage types.
- inventory_traffic_prices – Get the current prices of all traffic types.
- inventory_ipv4_prices – Get the current prices of all IPv4 types.
- inventory_databases – Get the vendor's all managed database types.
- inventory_database_prices – Get the current prices of all managed database types.
- inventory_database_storages – Get the vendor's all managed database storage products.
- inventory_database_storage_prices – Get the current prices of all managed database storage products.
attr Vendor.session tables.py:195–200
session
The Session to use for merging dependent objects into the database.
attr Vendor.progress_tracker tables.py:211–213
progress_tracker
The sc_crawler.logger.VendorProgressTracker to use for updating progress bars.
attr Vendor.tasks tables.py:224–226
tasks
Reexport progress_tracker.tasks for easier access.
meth Vendor.set_table_rows_inactive tables.py:231–262
set_table_rows_inactive(model, *args)
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.
Records marked as ARCHIVED are kept as-is,
just like the PLANNED_FOR_RETIREMENT and RETIRED servers and databases,
so that these keep their status and retirement date when no longer returned
by the vendor.
Examples:
>>> aws.set_table_rows_inactive(ServerPrice, ServerPrice.price < 10)
meth Vendor.set_table_rows_active tables.py:264–284
set_table_rows_active(model, *args)
Set this vendor's records to ACTIVE 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.
Records marked as ARCHIVED are kept as-is.
Examples:
>>> aws.set_table_rows_active(ServerPrice, ServerPrice.price < 10)
meth Vendor.inventory_compliance_frameworks tables.py:315–320
inventory_compliance_frameworks()
Get the vendor's all compliance frameworks.
meth Vendor.inventory_regions tables.py:322–325
inventory_regions()
Get the vendor's all regions.
meth Vendor.inventory_zones tables.py:327–330
inventory_zones()
Get all the zones in the vendor's regions.
meth Vendor.inventory_servers tables.py:332–379
inventory_servers()
Get the vendor's all server types.
meth Vendor.inventory_server_prices tables.py:381–389
inventory_server_prices()
Get the current standard/ondemand/reserved prices of all server types.
meth Vendor.inventory_server_prices_spot tables.py:391–399
inventory_server_prices_spot()
Get the current spot prices of all server types.
meth Vendor.inventory_storages tables.py:401–404
inventory_storages()
Get the vendor's all storage types.
meth Vendor.inventory_storage_prices tables.py:406–411
inventory_storage_prices()
Get the current prices of all storage types.
meth Vendor.inventory_traffic_prices tables.py:413–418
inventory_traffic_prices()
Get the current prices of all traffic types.
meth Vendor.inventory_ipv4_prices tables.py:420–425
inventory_ipv4_prices()
Get the current prices of all IPv4 types.
meth Vendor.inventory_databases tables.py:427–452
inventory_databases()
Get the vendor's all managed database types.
meth Vendor.inventory_database_prices tables.py:454–462
inventory_database_prices()
Get the current prices of all managed database types.
meth Vendor.inventory_database_storages tables.py:464–469
inventory_database_storages()
Get the vendor's all managed database storage products.
meth Vendor.inventory_database_storage_prices tables.py:471–477
inventory_database_storage_prices()
Get the current prices of all managed database storage products.
class VendorComplianceLink tables.py:480–486
Bases: VendorComplianceLinkBase
List of known Compliance Frameworks paired with vendors.
Attributes:
- vendor_id (
str) – Reference to the Vendor. - compliance_framework_id (
str) – Reference to the Compliance Framework. - comment (
Optional[str]) – Optional references, such as dates, URLsURL: Uniform Resource LocatorThe address of a resource on the web or a network, such as https://sparecores.com/, made of a scheme, a host, and a path.Glossary, and additional information/evidence. - status (
Status) – Status of the resource (active or inactive). - observed_at (
datetime) – Timestamp of the last observation.
class Region tables.py:489–515
Bases: RegionBase
Regions of Vendors.
Attributes:
- 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 APIAPI: Application Programming InterfaceA defined set of requests and responses through which one program uses another, such as a web service's HTTP endpoints or a library's functions.WikipediaGlossary calls. This is usually either the id or name of the resource, depending 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.
class Zone tables.py:518–542
Bases: ZoneBase
Availability zones of Regions.
Attributes:
- 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, depending 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.
class Storage tables.py:545–552
Bases: StorageBase
Flexible storage options that can be attached to a Server.
Attributes:
- 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 (MB/s). - min_size (
Optional[int]) – Minimum required size (GB). - max_size (
Optional[int]) – Maximum possible size (GB). - status (
Status) – Status of the resource (active or inactive). - observed_at (
datetime) – Timestamp of the last observation.
class Server tables.py:555–576
Bases: ServerBase
Server types.
Attributes:
- 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, depending on the vendor and actual API endpoint. - api_reference_object (
Optional[dict]) – How this resource is referenced in the vendor API calls, including the parameter name(s). - display_name (
str) – Human-friendly reference (usually the id or name) of the resource. - description (
str) – Short description. - family (
Optional[str]) – Broad workload class of the server in the vendor's own naming, e.g. General Purpose, Compute Optimized or Memory Optimized. - series (
Optional[str]) – Hardware line and generation of the server, e.g. m5 (AWS), n2 (GCP) or b3 (OVH). - vcpus (
int) – Default number of virtual CPUsCPU: Central Processing UnitThe general-purpose processor of a computer, which runs the operating system and programs. A CPU has one or more physical cores, and with SMT each core runs two or more hardware threads.WikipediaGlossary (vCPUvCPU: virtual CPUA CPU of a virtual machine, the unit in which cloud vendors sell compute. It is usually one hardware thread of a physical core with SMT, so two vCPUs may share one physical core.WikipediaGlossary) of the server. - hypervisorhypervisorThe software that runs virtual machines on a physical host and shares its CPUs, memory and devices between them, e.g. KVM, Xen, or the AWS Nitro system. Its type and settings can affect the performance of a cloud server, e.g. which CPU features the server sees.WikipediaGlossary (
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, burstableburstableA CPU allocation of a cloud server that guarantees only a fraction of its vCPUs' time, and lets it run faster for a while from credits it earns when idle, e.g. the AWS T instances. Compared to dedicated vCPUs, each backed by a hardware thread of its own, and shared ones, which compete with other servers, it is cheap for workloads that are mostly idle, but slow for sustained load.AWS docsGlossary 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_64AMD64The 64-bit version of the x86 instruction set architecture, introduced by AMD in 2003 and also implemented by Intel, which runs most cloud servers. Linux distributions and Docker name itamd64orx86_64.WikipediaGlossary). - 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_l1d_cache (
Optional[int]) – L1 data cache size (KiB). - cpu_l1d_cache_total (
Optional[int]) – Total L1 data cache size (KiB) across all cores. - cpu_l1i_cache (
Optional[int]) – L1 instruction cache size (KiB). - cpu_l1i_cache_total (
Optional[int]) – Total L1 instruction cache size (KiB) across all cores. - cpu_l2_cache (
Optional[int]) – L2 cacheCPU cacheSmall, fast memory inside a CPU that holds copies of recently used data, so that most accesses avoid the slower RAM. Server CPUs have three levels, each larger and slower than the one before. The L1 cache is split into a data cache (L1d) and an instruction cache (L1i) and belongs to one core, as the L2 cache usually does, while the L3 cache is shared by the cores of a socket, a die, or a group of cores.WikipediaGlossary size (KiB). - cpu_l2_cache_total (
Optional[int]) – Total L2 cache size (KiB) across all cores. - cpu_l3_cache (
Optional[int]) – L3 cache size (KiB). - cpu_l3_cache_total (
Optional[int]) – Total L3 cache size (KiB) across all cores. - cpu_flags (
List[str]) – CPU features/flags. - cpus (
List[Cpu]) – JSONJSON: JavaScript Object NotationA text format for structured data, built from objects (key-value pairs), arrays, strings, numbers, booleans, and null. Most languages and tools read and write it, which makes it a common format for API responses and benchmark output.JSONGlossary array of known CPU details, e.g. the manufacturer, family, model; L1/L2/L3 cache size; microcode version; feature flags; bugs etc. - ecpus (
Optional[float]) – The effective "real-world" core count, calculated by dividing the maximum multi-core SCoreSCore: Spare Cores scoreA CPU speed score of a server type in Spare Cores Navigator, used to compare the speed of server types. It is measured with thecpustressor ofstress-ngat increasing worker counts. The single-core SCore is the result with one worker; the multi-core SCore, the raw multi-core CPU speed that SCore means on its own, is the highest result.Glossary by the single-core SCore. - scalability (
Optional[float]) – Measures how efficiently the server scales from a single core performance to using multiple cores. A score of 100% means perfect linear scaling with zero performance loss. - hw_virt (
Optional[bool]) – If hardware virtualization (e.g. KVM) is supported. - memory_amount (
int) – RAMRAM: Random-Access MemoryThe main memory of a computer, which holds the running programs and their data. It is much faster than disk storage, and its content is lost when the power is off.WikipediaGlossary amount (MiB) reported by the vendor. - memory_amount_actual (
Optional[int]) – Actual RAM amount (MiB) measured on the instance via lstopo or other tool. This amount might not match the vendor-reported memory due to the BIOS or the hypervisor reserving a small percentage. - 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. - accelerator_count (
float) – Number of accelerator(s), e.g. GPUs or NPUs. - accelerator_memory_min (
Optional[int]) – Memory (MiB) allocated to the lowest-end accelerator. - accelerator_memory_total (
Optional[int]) – Overall memory (MiB) allocated to all the accelerator(s). - accelerator_type (
Optional[AcceleratorType]) – The type of the primary accelerator, e.g. GPUGPU: Graphics Processing UnitA processor with thousands of simple cores that run the same operation on many data elements in parallel. It was built to render graphics, and is now also used for general-purpose parallel work such as machine learning training and inference, scientific simulation, and video encoding. Cloud providers rent GPUs attached to virtual machines, with their own dedicated GPU memory.WikipediaGlossary or NPU. - accelerator_manufacturer (
Optional[str]) – The manufacturer of the primary accelerator, e.g. Nvidia or AMD. - accelerator_family (
Optional[str]) – The product family of the primary accelerator, e.g. Turing. - accelerator_model (
Optional[str]) – The model number of the primary accelerator, e.g. Tesla T4. - accelerators (
List[Accelerator]) – JSON array of accelerator details, including the manufacturer, name, and memory (MiB) of each accelerator. - storage_size (
int) – Overall size (GB) of the disk(s). - storage_type (
Optional[StorageType]) – Primary disk type, e.g. HDD, SSDSSD: Solid-State DriveA storage device that keeps data in flash memory instead of on spinning disks, so it reads and writes much faster than an HDD, especially at random locations. A controller with its own firmware maps logical blocks to flash pages, and many SSDs write incoming data to a fast cache first, then move it to slower flash. Cloud servers use SSDs as local disks and behind network block storage.WikipediaGlossary, or NVMe SSD. - storages (
List[Disk]) – JSON array of disks attached to the server, including the size (GB) and type of each disk. - storage_read_iops_max (
Optional[int]) – The vendor-published maximum read IOPS of the bundled disk(s), summed over all disks, also of different types (e.g. temp disk and NVMe), so a theoretical total. Per-disk values are in storages. - storage_write_iops_max (
Optional[int]) – The vendor-published maximum write IOPS of the bundled disk(s), summed over all disks, also of different types (e.g. temp disk and NVMe), so a theoretical total. Per-disk values are in storages. - storage_read_throughput_max (
Optional[int]) – The vendor-published maximum read throughput (MB/s) of the bundled disk(s), summed over all disks, also of different types (e.g. temp disk and NVMe), so a theoretical total. Per-disk values are in storages. - storage_write_throughput_max (
Optional[int]) – The vendor-published maximum write throughput (MB/s) of the bundled disk(s), summed over all disks, also of different types (e.g. temp disk and NVMe), so a theoretical total. Per-disk values are in storages. - compatible_storage_ids (
Optional[List[str]]) – List of storage_ids that can be attached to the server as extra storage. - network_speed_baseline (
Optional[float]) – The baseline network performance (Gbps) of the server, aggregated over all network cards. - network_speed_max (
Optional[float]) – The maximum network performance (Gbps) of the server, aggregated over all network cards. - network_storage_speed_baseline (
Optional[float]) – The baseline bandwidth performance of network-attached storage (Gbps). - network_storage_speed_max (
Optional[float]) – The maximum bandwidth performance of network-attached storage (Gbps). - inbound_traffic (
float) – Amount of complimentary inbound traffic (GB) per month. - outbound_traffic (
float) – Amount of complimentary outbound trafficegressThe network traffic leaving a cloud vendor's network, e.g. to the internet. Vendors usually charge for it per GB beyond an included amount, while incoming (ingress) traffic is usually free, so it can make up a large part of the costs of a service that sends a lot of data.Glossary (GB) per month. - ipv4 (
int) – Number of complimentary IPv4 address(es). - average_time_to_start (
Optional[float]) – Average time to start the server (seconds). - retirement_date (
Optional[date]) – Retirement date announced by the vendor for PLANNED_FOR_RETIREMENT and RETIRED records: the end of support (shutdown) if published, otherwise the end of sale. Empty when not announced or not known. - status (
Status) – Status of the resource (active or inactive). - observed_at (
datetime) – Timestamp of the last observation.
Functions:
- check_inspector_task_block_reasons – Check if the Server should run inspector task(s) and return block reasons.
meth Server.check_inspector_task_block_reasons tables.py:558–560
check_inspector_task_block_reasons(tasks)
Check if the Server should run inspector task(s) and return block reasons.
class ServerPrice tables.py:579–627
Bases: ServerPriceBase
Server type prices per Region and Allocation method.
Attributes:
- 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-demandon-demandA pricing model of cloud servers that charges for the time a server runs, without a commitment, typically per second or hour. The server runs until you stop it, unlike a spot instance, but it costs more than spot or reserved capacity.Glossary 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.
class ServerDescription tables.py:630–638
Bases: ServerDescriptionBase
Variable length, plain English descriptions of Server hardware specs, performance, cost-efficiency, and workflow fit.
Attributes:
- page (
List[str]) – Detailed server description with up to 500 words total across multiple paragraphs on hardware specs, benchmark-relative performance, qualitative cost efficiency, tradeoffs, and workload fit. - description (
str) – Dense and technical server description using around 150 words in a single paragraph. - og_description (
str) – 200 character server description explicitly including vendor and server name. - meta_description (
str) – 150 character server description explicitly including vendor and server name. - tagline (
str) – 20-word tagline on server positioning and key differentiators without the vendor or server name. - bullet_points (
List[str]) – 4-6 concise bullet points highlighting key features and best-fit workloads. - categories (
List[Category]) – One or more workload categories best fitting the server. - status (
Status) – Status of the resource (active or inactive). - observed_at (
datetime) – Timestamp of the last observation. - vendor_id (
str) – Reference to the Vendor. - server_id (
str) – Unique identifier, as called at the Vendor.
class StoragePrice tables.py:641–674
Bases: StoragePriceBase
Flexible Storage prices in each Region.
Attributes:
- 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.
class Database tables.py:677–698
Bases: DatabaseBase
Managed database SKUs.
Attributes:
- vendor_id (
str) – Reference to the Vendor. - database_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, depending on the vendor and actual API endpoint. - api_reference_object (
Optional[dict]) – How this resource is referenced in the vendor API calls, including the parameter name(s). - display_name (
str) – Human-friendly reference (usually the id or name) of the resource. - description (
Optional[str]) – Short description. - family (
Optional[str]) – Broad workload class of the database in the vendor's own naming, e.g. General Purpose or Memory Optimized. - series (
Optional[str]) – Hardware line and generation of the database, matching the series of the server it runs on, where known. - server_id (
Optional[str]) – Reference to the underlying cloud server's identifier. - vcpus (
Optional[int]) – Number of virtual CPU cores allocated to the database server instance. - memory_amount (
Optional[int]) – Amount of RAM (MiB) provisioned for the instance. - engine (
Optional[DatabaseEngine]) – Managed database engine running on the instance. - wire_protocol (
Optional[DatabaseWireProtocol]) – Network protocol used for client connections. - engine_versions (
List[str]) – Major database engine versions supported. - auto_upgrade_versions (
Optional[bool]) – Auto-upgrade between minor database engine versions. - ha (
List[DatabaseHaLevel]) – Ordered HA levels supported, highest tier first. - ha_strategy (
List[DatabaseHaStrategy]) – Ordered HA strategies supported, highest tier first. - max_read_replicas (
Optional[int]) – Maximum number of read-only replica nodes supported to scale read workloads. - custom_config (
Optional[bool]) – Whether database engine parameters/flags can be customized. - custom_extensions (
Optional[bool]) – Support for custom database engine extensions/plugins. - storage_size (
Optional[int]) – Bundled storage capacity included in the database (GB). - storage_extra_min (
Optional[int]) – Minimum custom storage size (in GB) that can be attached to the instance. - storage_extra_max (
Optional[int]) – Maximum storage limit (in GB) supported by the instance or storage tier. - storage_extra_autosize (
Optional[bool]) – Whether storage capacity can automatically expand as disk usage grows. - compatible_storage_ids (
Optional[List[str]]) – List of database_storage_ids that can be attached to the database as extra storage. - disk_encryption (
Optional[bool]) – Indicates whether underlying storage drives are encrypted at rest. - scheduled_backups (
Optional[bool]) – Support for automated snapshot schedules and backup retention management. - continuous_backups (
Optional[int]) – Maximum point-in-time recovery (PITR) log retention window expressed in days (0 if unsupported). - connection_pool (
Optional[bool]) – Managed connection proxy support. - system_monitoring (
Optional[bool]) – Availability of host-level CPU, RAM, and disk metrics dashboards. - database_monitoring (
Optional[bool]) – Database engine performance insights (slow queries, locks, execution plans). - autotuning_advice (
Optional[bool]) – Analyzes workload and generates actionable performance tuning advice. - autotuning_apply (
Optional[bool]) – System automatically executes performance fixes (e.g., index creation, parameter tuning) without operator intervention. - sla (
Optional[float]) – Service level agreement as a percentage, e.g. 99.95. - security_features (
List[DatabaseSecurityFeature]) – Security capabilities supported by DBaaS providers. - retirement_date (
Optional[date]) – Retirement date announced by the vendor for PLANNED_FOR_RETIREMENT and RETIRED records: the end of support (shutdown) if published, otherwise the end of sale. Empty when not announced or not known. - status (
Status) – Status of the resource (active or inactive). - observed_at (
datetime) – Timestamp of the last observation.
Functions:
- check_inspector_task_block_reasons – Check if the Database should run inspector task(s) and return block reasons.
meth Database.check_inspector_task_block_reasons tables.py:680–682
check_inspector_task_block_reasons(tasks)
Check if the Database should run inspector task(s) and return block reasons.
class DatabasePrice tables.py:701–734
Bases: DatabasePriceBase
Managed database SKU prices per Region.
Attributes:
- vendor_id (
str) – Reference to the Vendor. - region_id (
str) – Reference to the Region. - database_id (
str) – Reference to the Database. - allocation (
Allocation) – Allocation method, e.g. on-demand or spot. - ha (
DatabaseHaLevel) – HA level this price applies to. - ha_strategy (
DatabaseHaStrategy) – HA strategy this price applies to. - 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.
class DatabaseStorage tables.py:737–744
Bases: DatabaseStorageBase
Managed database storage products.
Attributes:
- vendor_id (
str) – Reference to the Vendor. - database_storage_id (
str) – Unique identifier, as called at the Vendor. - name (
str) – Human-friendly name. - description (
Optional[str]) – Short description. - scope (
DatabaseStorageScope) – Scope of the storage product, e.g. data or backup. - redundancy (
Optional[str]) – Redundancy model, e.g. LRS or GRS. - min_size (
Optional[int]) – Minimum required size (GB). - max_size (
Optional[int]) – Maximum possible size (GB). - max_iops (
Optional[int]) – Maximum Input/Output Operations Per Second. - max_throughput (
Optional[int]) – Maximum Throughput (MB/s). - status (
Status) – Status of the resource (active or inactive). - observed_at (
datetime) – Timestamp of the last observation.
class DatabaseStoragePrice tables.py:747–782
Bases: DatabaseStoragePriceBase
Managed database storage prices in each Region.
Attributes:
- vendor_id (
str) – Reference to the Vendor. - region_id (
str) – Reference to the Region. - database_storage_id (
str) – Reference to the DatabaseStorage. - 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.
class TrafficPrice tables.py:785–804
Bases: TrafficPriceBase
Extra Traffic prices in each Region.
Attributes:
- 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.
class Ipv4Price tables.py:807–826
Bases: Ipv4PriceBase
Price of an IPv4 address in each Region.
Attributes:
- 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.
class Benchmark tables.py:829–834
Bases: BenchmarkBase
Benchmark scenario definitions.
Attributes:
- benchmark_id (
str) – Unique identifier of a specific Benchmark. - category (
Optional[str]) – Category of the resource. - subcategory (
Optional[str]) – Subcategory of the benchmark within its category, e.g. the scope of an nvbandwidthnvbandwidthAn open-source NVIDIA tool that measures memory copy bandwidth and latency between the CPU and NVIDIA GPUs, between GPUs, and within one GPU. It copies with the GPU's copy engines or with kernels on its streaming multiprocessors, and reports one matrix per test, with a row and a column for each CPU or GPU taking part. It prints plain text or JSON, and an optional multinode build measures GPUs across several servers.GitHubGlossary test. - source (
Union[MeasuredSource,ExtrapolatedSource,CompoundSource]) – How the benchmark score is produced. A discriminated object keyed by 'kind': 'measured' (directly observed), 'extrapolated' (derived from this server's own measurements; carries 'derived_from' + 'note'), or 'compound' (aggregated across component benchmarks; carries 'aggregation', 'normalization', and the 'components' recipe). - name (
str) – Human-friendly name. - description (
Optional[str]) – Short description. - note (
Optional[str]) – Optional caveat/comment on how to interpret the metric, surfaced as a warning/info badge (e.g. limited scaling on high vCPU counts, or independence from vCPU count). Null when there is nothing to flag. - 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."}. - environment_fields (
dict) – A dictionary of descriptions on the environment details recorded with the benchmark scores, e.g. {"kernel_version": "Linux kernel version of the server."}. - measurement (
Optional[str]) – The name of measurement recorded 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.
class BenchmarkScore tables.py:837–865
Bases: BenchmarkScoreBase
Results of running Benchmark scenarios on Servers or managed Databases.
Attributes:
- vendor_id (
str) – Reference to the Vendor. - benchmark_id (
str) – Reference to the Benchmark. - resource_type (
ResourceType) – Kind of resource the score refers to. - resource_id (
str) – Reference to the resource (see resource_type). - config (
HashableDict|dict) – Dictionary of config parameters of the specific benchmark, e.g. {"bandwidth": 4096} - framework_version (
Optional[str]) – The version of the benchmark tool used. - environment (
Optional[dict]) – Extensible environment details (e.g. kernel_version, database_engine_version). - score (
float) – The resulting score of the benchmark. - score_breakdown (
Optional[WorkloadScoreBreakdown]) – Structured derivation of composite scores (e.g. workload profiles): per-component raw values, references, normalized values, weights, and coverage. Null for simple benchmark scores. - 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.
class ArchiveRule tables.py:868–1055
Bases: ArchiveRuleBase
Rules archiving records that were replaced by another record or deliberately dropped.
The rules are defined in sc_crawler.archive_rules, and are applied by
the pull and sync commands (see apply), which set the matched
records and their child records to ARCHIVED.
Examples:
>>> from sc_crawler.tables import ArchiveRule
>>> ArchiveRule(table_name="benchmark", match={"benchmark_id": "foo"}, reason="Dropped.")
ArchiveRule(table_name='benchmark', match={'benchmark_id': 'foo'}, reason='Dropped.', successor={}...
Attributes:
- table_name (
str) – Name of the table of the archived record(s), e.g.region. - match (
HashableDict|dict) – Primary key of the record to archive, or a subset of its columns to archive all records with those values, e.g. {"region_id": "2", "vendor_id": "hcloud"}. - successor (
HashableDict|dict) – New values of thematchcolumns identifying the successor of each archived record. Empty when there is no successor, or none that can be given as fixed values (seereason). - reason (
Optional[str]) – Why the record(s) got archived. - status (
Status) – Status of the resource (active or inactive). - observed_at (
datetime) – Timestamp of the last observation.
Functions:
- apply – Store the rules in the database, and archive the records they match.
- find_unmatched – Describe the rules referring to records that are in none of the databases.
- check – Check the definition of the rules, without a database.
meth ArchiveRule.apply tables.py:887–921
apply(session, rules=None)
Store the rules in the database, and archive the records they match.
All rules are written to the archive_rule table (also the ones not
matching any record), then the matched records and their child records
are set to ARCHIVED.
Parameters:
- session (
Session) – Database connection. Changes are not committed. - rules (
Optional[List[ArchiveRule]]) – Rules to apply. Defaults to all current rules.
Returns:
meth ArchiveRule.find_unmatched tables.py:923–965
find_unmatched(sessions, table_names=None, rules=None)
Describe the rules referring to records that are in none of the databases.
Checks both the match and the (non-empty) successor of the rules,
e.g. to find typos in the ids, or successors not provided by the vendor.
Parameters:
- sessions (
List[Session]) – Connections to the databases to look up the records in. - table_names (
Optional[List[str]]) – Check only the rules of these tables. Defaults to all tables. - rules (
Optional[List[ArchiveRule]]) – Rules to check. Defaults to all current rules.
Returns:
meth ArchiveRule.check tables.py:967–1055
check(rules=None)
Check the definition of the rules, without a database.
Parameters:
- rules (
Optional[List[ArchiveRule]]) – Rules to check. Defaults to all current rules.
Returns:
List[str]– Description of the problems found: unknown tables,matchkeys that are not primary key columns of the table,successorwith other keys thanmatch, enum columns not given by the value of a member, missingreasonof rules without a successor, and rules leading back to a record they archived (cycles).
func is_table tables.py:1071–1076
is_table(table)
Checks if an object is a SQLModel table definition.
attr tables tables.py:1079
tables: List[SQLModel] = [o for o in globals().values() if is_table(o)]
List of all SQLModel (table) models.
class Metadata tables.py:1086–1091
Bases: SQLModel
Key/value metadata table for database release information.