# `sc_crawler.tables`

> Table definitions for vendors, regions, zones, and other cloud resources.

# `sc_crawler.tables`

**Classes:**

- [**Country**](#country) – Country and continent mapping.
- [**ComplianceFramework**](#complianceframework) – List of Compliance Frameworks, such as HIPAA or SOC 2 Type 1.
- [**Vendor**](#vendor) – Compute resource vendors, such as cloud and server providers.
- [**VendorComplianceLink**](#vendorcompliancelink) – List of known Compliance Frameworks paired with vendors.
- [**Region**](#region) – Regions of Vendors.
- [**Zone**](#zone) – Availability zones of Regions.
- [**Storage**](#storage) – Flexible storage options that can be attached to a Server.
- [**Server**](#server) – Server types.
- [**ServerPrice**](#serverprice) – Server type prices per Region and Allocation method.
- [**ServerDescription**](#serverdescription) – Variable length, plain English descriptions of Server hardware specs, performance, cost-efficiency, and workflow fit.
- [**StoragePrice**](#storageprice) – Flexible Storage prices in each Region.
- [**Database**](#database) – Managed database SKUs.
- [**DatabasePrice**](#databaseprice) – Managed database SKU prices per Region.
- [**DatabaseStorage**](#databasestorage) – Managed database storage products.
- [**DatabaseStoragePrice**](#databasestorageprice) – Managed database storage prices in each Region.
- [**TrafficPrice**](#trafficprice) – Extra Traffic prices in each Region.
- [**Ipv4Price**](#ipv4price) – Price of an IPv4 address in each Region.
- [**Benchmark**](#benchmark) – Benchmark scenario definitions.
- [**BenchmarkScore**](#benchmarkscore) – Results of running Benchmark scenarios on Servers or managed Databases.
- [**ArchiveRule**](#archiverule) – Rules archiving records that were replaced by another record or deliberately dropped.
- [**Metadata**](#metadata) – Key/value metadata table for database release information.

**Functions:**

- [**is_table**](#is_table) – Checks if an object is a SQLModel table definition.

**Attributes:**

- [**tables**](#tables) ([`List`](https://docs.python.org/3/library/typing.html#typing.List)`[SQLModel]`) – List of all SQLModel (table) models.

## class <code class="doc-name">Country</code> [tables.py:63–67](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L63-L67)

Bases: [`CountryBase`](https://docs.sparecores.com/crawler/reference/table_bases.md)

Country and continent mapping.

**Attributes:**

- **country_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Country code by ISO 3166 alpha-2.
- **continent** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Continent name.
- **status** ([`Status`](https://docs.sparecores.com/crawler/reference/table_fields.md#status)) – Status of the resource (active or inactive).
- **observed_at** ([`datetime`](https://docs.python.org/3/library/datetime.html#module-datetime)) – Timestamp of the last observation.

## class <code class="doc-name">ComplianceFramework</code> [tables.py:70–75](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L70-L75)

Bases: [`ComplianceFrameworkBase`](https://docs.sparecores.com/crawler/reference/table_bases.md)

List of Compliance Frameworks, such as HIPAA or SOC 2 Type 1.

**Attributes:**

- **compliance_framework_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Unique identifier.
- **name** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Human-friendly name.
- **abbreviation** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – Short abbreviation of the Framework name.
- **description** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – Description of the framework in a few paragraphs, outlining key features and characteristics for reference.
- **logo** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – Publicly accessible URL to the image of the Framework's logo.
- **homepage** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – Public homepage with more information on the Framework.
- **status** ([`Status`](https://docs.sparecores.com/crawler/reference/table_fields.md#status)) – Status of the resource (active or inactive).
- **observed_at** ([`datetime`](https://docs.python.org/3/library/datetime.html#module-datetime)) – Timestamp of the last observation.

## class <code class="doc-name">Vendor</code> [tables.py:78–477](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L78-L477)

Bases: [`VendorBase`](https://docs.sparecores.com/crawler/reference/table_bases.md)

Compute resource vendors, such as cloud and server providers.

**Examples:**

```pycon
>>> 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`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Unique identifier.
- **name** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Human-friendly name.
- **logo** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – Publicly accessible URL to the image of the Vendor's logo.
- **homepage** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – Public homepage of the Vendor.
- **country_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Reference to the Country, where the Vendor's main headquarter is located.
- **state** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – Optional state/administrative area of the Vendor's location within the Country.
- **city** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – Optional city name of the Vendor's main location.
- **address_line** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – Optional address line of the Vendor's main location.
- **zip_code** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – Optional ZIP code of the Vendor's main location.
- **founding_year** ([`int`](https://docs.python.org/3/builtins/functions.html#int)) – 4-digit year when the public cloud service of the Vendor was launched.
- **status_page** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – Public status page of the Vendor.
- **stopped_server_charged** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`bool`](https://docs.python.org/3/builtins/functions.html#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`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`int`](https://docs.python.org/3/builtins/functions.html#int)`]`) – The smallest increment of time for which the Vendor bills for.
- **minimum_billing_seconds** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`int`](https://docs.python.org/3/builtins/functions.html#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`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – Comment on the Vendor's billing.
- **status** ([`Status`](https://docs.sparecores.com/crawler/reference/table_fields.md#status)) – Status of the resource (active or inactive).
- **observed_at** ([`datetime`](https://docs.python.org/3/library/datetime.html#module-datetime)) – Timestamp of the last observation.

**Functions:**

- [**set_table_rows_inactive**](#vendorset_table_rows_inactive) – Set this vendor's records to [INACTIVE](https://docs.sparecores.com/crawler/reference/table_fields.md#status) in a table.
- [**set_table_rows_active**](#vendorset_table_rows_active) – Set this vendor's records to [ACTIVE](https://docs.sparecores.com/crawler/reference/table_fields.md#status) in a table.
- [**inventory_compliance_frameworks**](#vendorinventory_compliance_frameworks) – Get the vendor's all compliance frameworks.
- [**inventory_regions**](#vendorinventory_regions) – Get the vendor's all regions.
- [**inventory_zones**](#vendorinventory_zones) – Get all the zones in the vendor's regions.
- [**inventory_servers**](#vendorinventory_servers) – Get the vendor's all server types.
- [**inventory_server_prices**](#vendorinventory_server_prices) – Get the current standard/ondemand/reserved prices of all server types.
- [**inventory_server_prices_spot**](#vendorinventory_server_prices_spot) – Get the current spot prices of all server types.
- [**inventory_storages**](#vendorinventory_storages) – Get the vendor's all storage types.
- [**inventory_storage_prices**](#vendorinventory_storage_prices) – Get the current prices of all storage types.
- [**inventory_traffic_prices**](#vendorinventory_traffic_prices) – Get the current prices of all traffic types.
- [**inventory_ipv4_prices**](#vendorinventory_ipv4_prices) – Get the current prices of all IPv4 types.
- [**inventory_databases**](#vendorinventory_databases) – Get the vendor's all managed database types.
- [**inventory_database_prices**](#vendorinventory_database_prices) – Get the current prices of all managed database types.
- [**inventory_database_storages**](#vendorinventory_database_storages) – Get the vendor's all managed database storage products.
- [**inventory_database_storage_prices**](#vendorinventory_database_storage_prices) – Get the current prices of all managed database storage products.

### attr <code class="doc-parent">Vendor.</code><code class="doc-name">session</code> [tables.py:195–200](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L195-L200)

```python
session
```

The Session to use for merging dependent objects into the database.

### attr <code class="doc-parent">Vendor.</code><code class="doc-name">progress_tracker</code> [tables.py:211–213](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L211-L213)

```python
progress_tracker
```

The [sc_crawler.logger.VendorProgressTracker](https://docs.sparecores.com/crawler/reference/logger.md#vendorprogresstracker) to use for updating progress bars.

### attr <code class="doc-parent">Vendor.</code><code class="doc-name">tasks</code> [tables.py:224–226](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L224-L226)

```python
tasks
```

Reexport progress_tracker.tasks for easier access.

### meth <code class="doc-parent">Vendor.</code><code class="doc-name">set_table_rows_inactive</code> [tables.py:231–262](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L231-L262)

```python
set_table_rows_inactive(model, *args)
```

Set this vendor's records to [INACTIVE](https://docs.sparecores.com/crawler/reference/table_fields.md#status) 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](https://docs.sparecores.com/crawler/reference/table_fields.md#status) 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:**

```pycon
>>> aws.set_table_rows_inactive(ServerPrice, ServerPrice.price < 10)
```

### meth <code class="doc-parent">Vendor.</code><code class="doc-name">set_table_rows_active</code> [tables.py:264–284](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L264-L284)

```python
set_table_rows_active(model, *args)
```

Set this vendor's records to [ACTIVE](https://docs.sparecores.com/crawler/reference/table_fields.md#status) 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](https://docs.sparecores.com/crawler/reference/table_fields.md#status) are kept as-is.

**Examples:**

```pycon
>>> aws.set_table_rows_active(ServerPrice, ServerPrice.price < 10)
```

### meth <code class="doc-parent">Vendor.</code><code class="doc-name">inventory_compliance_frameworks</code> [tables.py:315–320](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L315-L320)

```python
inventory_compliance_frameworks()
```

Get the vendor's all compliance frameworks.

### meth <code class="doc-parent">Vendor.</code><code class="doc-name">inventory_regions</code> [tables.py:322–325](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L322-L325)

```python
inventory_regions()
```

Get the vendor's all regions.

### meth <code class="doc-parent">Vendor.</code><code class="doc-name">inventory_zones</code> [tables.py:327–330](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L327-L330)

```python
inventory_zones()
```

Get all the zones in the vendor's regions.

### meth <code class="doc-parent">Vendor.</code><code class="doc-name">inventory_servers</code> [tables.py:332–379](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L332-L379)

```python
inventory_servers()
```

Get the vendor's all server types.

### meth <code class="doc-parent">Vendor.</code><code class="doc-name">inventory_server_prices</code> [tables.py:381–389](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L381-L389)

```python
inventory_server_prices()
```

Get the current standard/ondemand/reserved prices of all server types.

### meth <code class="doc-parent">Vendor.</code><code class="doc-name">inventory_server_prices_spot</code> [tables.py:391–399](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L391-L399)

```python
inventory_server_prices_spot()
```

Get the current spot prices of all server types.

### meth <code class="doc-parent">Vendor.</code><code class="doc-name">inventory_storages</code> [tables.py:401–404](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L401-L404)

```python
inventory_storages()
```

Get the vendor's all storage types.

### meth <code class="doc-parent">Vendor.</code><code class="doc-name">inventory_storage_prices</code> [tables.py:406–411](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L406-L411)

```python
inventory_storage_prices()
```

Get the current prices of all storage types.

### meth <code class="doc-parent">Vendor.</code><code class="doc-name">inventory_traffic_prices</code> [tables.py:413–418](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L413-L418)

```python
inventory_traffic_prices()
```

Get the current prices of all traffic types.

### meth <code class="doc-parent">Vendor.</code><code class="doc-name">inventory_ipv4_prices</code> [tables.py:420–425](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L420-L425)

```python
inventory_ipv4_prices()
```

Get the current prices of all IPv4 types.

### meth <code class="doc-parent">Vendor.</code><code class="doc-name">inventory_databases</code> [tables.py:427–452](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L427-L452)

```python
inventory_databases()
```

Get the vendor's all managed database types.

### meth <code class="doc-parent">Vendor.</code><code class="doc-name">inventory_database_prices</code> [tables.py:454–462](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L454-L462)

```python
inventory_database_prices()
```

Get the current prices of all managed database types.

### meth <code class="doc-parent">Vendor.</code><code class="doc-name">inventory_database_storages</code> [tables.py:464–469](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L464-L469)

```python
inventory_database_storages()
```

Get the vendor's all managed database storage products.

### meth <code class="doc-parent">Vendor.</code><code class="doc-name">inventory_database_storage_prices</code> [tables.py:471–477](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L471-L477)

```python
inventory_database_storage_prices()
```

Get the current prices of all managed database storage products.

## class <code class="doc-name">VendorComplianceLink</code> [tables.py:480–486](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L480-L486)

Bases: [`VendorComplianceLinkBase`](https://docs.sparecores.com/crawler/reference/table_bases.md)

List of known Compliance Frameworks paired with vendors.

**Attributes:**

- **vendor_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Reference to the Vendor.
- **compliance_framework_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Reference to the Compliance Framework.
- **comment** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – Optional references, such as dates, URLs, and additional information/evidence.
- **status** ([`Status`](https://docs.sparecores.com/crawler/reference/table_fields.md#status)) – Status of the resource (active or inactive).
- **observed_at** ([`datetime`](https://docs.python.org/3/library/datetime.html#module-datetime)) – Timestamp of the last observation.

## class <code class="doc-name">Region</code> [tables.py:489–515](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L489-L515)

Bases: [`RegionBase`](https://docs.sparecores.com/crawler/reference/table_bases.md)

Regions of Vendors.

**Attributes:**

- **vendor_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Reference to the Vendor.
- **region_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Unique identifier, as called at the Vendor.
- **name** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Human-friendly name.
- **api_reference** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#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`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Human-friendly reference (usually the id or name) of the resource.
- **aliases** ([`List`](https://docs.python.org/3/library/typing.html#typing.List)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – List of other commonly used names for the same Region.
- **country_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Reference to the Country, where the Region is located.
- **state** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – Optional state/administrative area of the Region's location within the Country.
- **city** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – Optional city name of the Region's location.
- **address_line** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – Optional address line of the Region's location.
- **zip_code** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – Optional ZIP code of the Region's location.
- **lon** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`float`](https://docs.python.org/3/builtins/functions.html#float)`]`) – Longitude coordinate of the Region's known or approximate location.
- **lat** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`float`](https://docs.python.org/3/builtins/functions.html#float)`]`) – Latitude coordinate of the Region's known or approximate location.
- **founding_year** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`int`](https://docs.python.org/3/builtins/functions.html#int)`]`) – 4-digit year when the Region was founded.
- **green_energy** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`bool`](https://docs.python.org/3/builtins/functions.html#bool)`]`) – If the Region is 100% powered by renewable energy.
- **status** ([`Status`](https://docs.sparecores.com/crawler/reference/table_fields.md#status)) – Status of the resource (active or inactive).
- **observed_at** ([`datetime`](https://docs.python.org/3/library/datetime.html#module-datetime)) – Timestamp of the last observation.

## class <code class="doc-name">Zone</code> [tables.py:518–542](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L518-L542)

Bases: [`ZoneBase`](https://docs.sparecores.com/crawler/reference/table_bases.md)

Availability zones of Regions.

**Attributes:**

- **vendor_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Reference to the Vendor.
- **region_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Reference to the Region.
- **zone_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Unique identifier, as called at the Vendor.
- **name** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Human-friendly name.
- **api_reference** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#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`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Human-friendly reference (usually the id or name) of the resource.
- **status** ([`Status`](https://docs.sparecores.com/crawler/reference/table_fields.md#status)) – Status of the resource (active or inactive).
- **observed_at** ([`datetime`](https://docs.python.org/3/library/datetime.html#module-datetime)) – Timestamp of the last observation.

## class <code class="doc-name">Storage</code> [tables.py:545–552](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L545-L552)

Bases: [`StorageBase`](https://docs.sparecores.com/crawler/reference/table_bases.md)

Flexible storage options that can be attached to a Server.

**Attributes:**

- **vendor_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Reference to the Vendor.
- **storage_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Unique identifier, as called at the Vendor.
- **name** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Human-friendly name.
- **description** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – Short description.
- **storage_type** ([`StorageType`](https://docs.sparecores.com/crawler/reference/table_fields.md#storagetype)) – High-level category of the storage, e.g. HDD or SDD.
- **max_iops** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`int`](https://docs.python.org/3/builtins/functions.html#int)`]`) – Maximum Input/Output Operations Per Second.
- **max_throughput** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`int`](https://docs.python.org/3/builtins/functions.html#int)`]`) – Maximum Throughput (MB/s).
- **min_size** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`int`](https://docs.python.org/3/builtins/functions.html#int)`]`) – Minimum required size (GB).
- **max_size** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`int`](https://docs.python.org/3/builtins/functions.html#int)`]`) – Maximum possible size (GB).
- **status** ([`Status`](https://docs.sparecores.com/crawler/reference/table_fields.md#status)) – Status of the resource (active or inactive).
- **observed_at** ([`datetime`](https://docs.python.org/3/library/datetime.html#module-datetime)) – Timestamp of the last observation.

## class <code class="doc-name">Server</code> [tables.py:555–576](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L555-L576)

Bases: [`ServerBase`](https://docs.sparecores.com/crawler/reference/table_bases.md)

Server types.

**Attributes:**

- **vendor_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Reference to the Vendor.
- **server_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Unique identifier, as called at the Vendor.
- **name** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Human-friendly name.
- **api_reference** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#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`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`dict`](https://docs.python.org/3/builtins/stdtypes.html#dict)`]`) – How this resource is referenced in the vendor API calls, including the parameter name(s).
- **display_name** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Human-friendly reference (usually the id or name) of the resource.
- **description** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Short description.
- **family** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – Broad workload class of the server in the vendor's own naming, e.g. General Purpose, Compute Optimized or Memory Optimized.
- **series** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – Hardware line and generation of the server, e.g. m5 (AWS), n2 (GCP) or b3 (OVH).
- **vcpus** ([`int`](https://docs.python.org/3/builtins/functions.html#int)) – Default number of virtual CPUs (vCPU) of the server.
- **hypervisor** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – Hypervisor of the virtual server, e.g. Xen, KVM, Nitro or Dedicated.
- **cpu_allocation** ([`CpuAllocation`](https://docs.sparecores.com/crawler/reference/table_fields.md#cpuallocation)) – Allocation of CPU(s) to the server, e.g. shared, burstable or dedicated.
- **cpu_cores** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`int`](https://docs.python.org/3/builtins/functions.html#int)`]`) – Default number of CPU cores of the server. Equals to vCPUs when HyperThreading is disabled.
- **cpu_speed** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`float`](https://docs.python.org/3/builtins/functions.html#float)`]`) – Vendor-reported maximum CPU clock speed (GHz).
- **cpu_architecture** ([`CpuArchitecture`](https://docs.sparecores.com/crawler/reference/table_fields.md#cpuarchitecture)) – CPU architecture (arm64, arm64_mac, i386, or x86_64).
- **cpu_manufacturer** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – The manufacturer of the primary processor, e.g. Intel or AMD.
- **cpu_family** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – The product line/family of the primary processor, e.g. Xeon, Core i7, Ryzen 9.
- **cpu_model** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – The model number of the primary processor, e.g. 9750H.
- **cpu_l1d_cache** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`int`](https://docs.python.org/3/builtins/functions.html#int)`]`) – L1 data cache size (KiB).
- **cpu_l1d_cache_total** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`int`](https://docs.python.org/3/builtins/functions.html#int)`]`) – Total L1 data cache size (KiB) across all cores.
- **cpu_l1i_cache** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`int`](https://docs.python.org/3/builtins/functions.html#int)`]`) – L1 instruction cache size (KiB).
- **cpu_l1i_cache_total** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`int`](https://docs.python.org/3/builtins/functions.html#int)`]`) – Total L1 instruction cache size (KiB) across all cores.
- **cpu_l2_cache** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`int`](https://docs.python.org/3/builtins/functions.html#int)`]`) – L2 cache size (KiB).
- **cpu_l2_cache_total** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`int`](https://docs.python.org/3/builtins/functions.html#int)`]`) – Total L2 cache size (KiB) across all cores.
- **cpu_l3_cache** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`int`](https://docs.python.org/3/builtins/functions.html#int)`]`) – L3 cache size (KiB).
- **cpu_l3_cache_total** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`int`](https://docs.python.org/3/builtins/functions.html#int)`]`) – Total L3 cache size (KiB) across all cores.
- **cpu_flags** ([`List`](https://docs.python.org/3/library/typing.html#typing.List)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – CPU features/flags.
- **cpus** ([`List`](https://docs.python.org/3/library/typing.html#typing.List)`[`[`Cpu`](https://docs.sparecores.com/crawler/reference/table_fields.md#cpu)`]`) – JSON array of known CPU details, e.g. the manufacturer, family, model; L1/L2/L3 cache size; microcode version; feature flags; bugs etc.
- **ecpus** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`float`](https://docs.python.org/3/builtins/functions.html#float)`]`) – The effective "real-world" core count, calculated by dividing the maximum multi-core SCore by the single-core SCore.
- **scalability** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`float`](https://docs.python.org/3/builtins/functions.html#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`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`bool`](https://docs.python.org/3/builtins/functions.html#bool)`]`) – If hardware virtualization (e.g. KVM) is supported.
- **memory_amount** ([`int`](https://docs.python.org/3/builtins/functions.html#int)) – RAM amount (MiB) reported by the vendor.
- **memory_amount_actual** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`int`](https://docs.python.org/3/builtins/functions.html#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`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`DdrGeneration`](https://docs.sparecores.com/crawler/reference/table_fields.md#ddrgeneration)`]`) – Generation of the DDR SDRAM, e.g. DDR4 or DDR5.
- **memory_speed** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`int`](https://docs.python.org/3/builtins/functions.html#int)`]`) – DDR SDRAM clock rate (Mhz).
- **memory_ecc** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`bool`](https://docs.python.org/3/builtins/functions.html#bool)`]`) – If the DDR SDRAM uses error correction code to detect and correct n-bit data corruption.
- **accelerator_count** ([`float`](https://docs.python.org/3/builtins/functions.html#float)) – Number of accelerator(s), e.g. GPUs or NPUs.
- **accelerator_memory_min** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`int`](https://docs.python.org/3/builtins/functions.html#int)`]`) – Memory (MiB) allocated to the lowest-end accelerator.
- **accelerator_memory_total** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`int`](https://docs.python.org/3/builtins/functions.html#int)`]`) – Overall memory (MiB) allocated to all the accelerator(s).
- **accelerator_type** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`AcceleratorType`](https://docs.sparecores.com/crawler/reference/table_fields.md#acceleratortype)`]`) – The type of the primary accelerator, e.g. GPU or NPU.
- **accelerator_manufacturer** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – The manufacturer of the primary accelerator, e.g. Nvidia or AMD.
- **accelerator_family** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – The product family of the primary accelerator, e.g. Turing.
- **accelerator_model** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – The model number of the primary accelerator, e.g. Tesla T4.
- **accelerators** ([`List`](https://docs.python.org/3/library/typing.html#typing.List)`[`[`Accelerator`](https://docs.sparecores.com/crawler/reference/table_fields.md#accelerator)`]`) – JSON array of accelerator details, including the manufacturer, name, and memory (MiB) of each accelerator.
- **storage_size** ([`int`](https://docs.python.org/3/builtins/functions.html#int)) – Overall size (GB) of the disk(s).
- **storage_type** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`StorageType`](https://docs.sparecores.com/crawler/reference/table_fields.md#storagetype)`]`) – Primary disk type, e.g. HDD, SSD, or NVMe SSD.
- **storages** ([`List`](https://docs.python.org/3/library/typing.html#typing.List)`[`[`Disk`](https://docs.sparecores.com/crawler/reference/table_fields.md#disk)`]`) – JSON array of disks attached to the server, including the size (GB) and type of each disk.
- **storage_read_iops_max** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`int`](https://docs.python.org/3/builtins/functions.html#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`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`int`](https://docs.python.org/3/builtins/functions.html#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`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`int`](https://docs.python.org/3/builtins/functions.html#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`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`int`](https://docs.python.org/3/builtins/functions.html#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`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`List`](https://docs.python.org/3/library/typing.html#typing.List)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]]`) – List of storage_ids that can be attached to the server as extra storage.
- **network_speed_baseline** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`float`](https://docs.python.org/3/builtins/functions.html#float)`]`) – The baseline network performance (Gbps) of the server, aggregated over all network cards.
- **network_speed_max** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`float`](https://docs.python.org/3/builtins/functions.html#float)`]`) – The maximum network performance (Gbps) of the server, aggregated over all network cards.
- **network_storage_speed_baseline** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`float`](https://docs.python.org/3/builtins/functions.html#float)`]`) – The baseline bandwidth performance of network-attached storage (Gbps).
- **network_storage_speed_max** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`float`](https://docs.python.org/3/builtins/functions.html#float)`]`) – The maximum bandwidth performance of network-attached storage (Gbps).
- **inbound_traffic** ([`float`](https://docs.python.org/3/builtins/functions.html#float)) – Amount of complimentary inbound traffic (GB) per month.
- **outbound_traffic** ([`float`](https://docs.python.org/3/builtins/functions.html#float)) – Amount of complimentary outbound traffic (GB) per month.
- **ipv4** ([`int`](https://docs.python.org/3/builtins/functions.html#int)) – Number of complimentary IPv4 address(es).
- **average_time_to_start** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`float`](https://docs.python.org/3/builtins/functions.html#float)`]`) – Average time to start the server (seconds).
- **retirement_date** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`date`](https://docs.python.org/3/library/datetime.html#datetime.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`](https://docs.sparecores.com/crawler/reference/table_fields.md#status)) – Status of the resource (active or inactive).
- **observed_at** ([`datetime`](https://docs.python.org/3/library/datetime.html#module-datetime)) – Timestamp of the last observation.

**Functions:**

- [**check_inspector_task_block_reasons**](#servercheck_inspector_task_block_reasons) – Check if the Server should run inspector task(s) and return block reasons.

### meth <code class="doc-parent">Server.</code><code class="doc-name">check_inspector_task_block_reasons</code> [tables.py:558–560](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L558-L560)

```python
check_inspector_task_block_reasons(tasks)
```

Check if the Server should run inspector task(s) and return block reasons.

## class <code class="doc-name">ServerPrice</code> [tables.py:579–627](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L579-L627)

Bases: [`ServerPriceBase`](https://docs.sparecores.com/crawler/reference/table_bases.md)

Server type prices per Region and Allocation method.

**Attributes:**

- **vendor_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Reference to the Vendor.
- **region_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Reference to the Region.
- **zone_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Reference to the Zone.
- **server_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Reference to the Server.
- **operating_system** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Operating System.
- **allocation** ([`Allocation`](https://docs.sparecores.com/crawler/reference/table_fields.md#allocation)) – Allocation method, e.g. on-demand or spot.
- **unit** ([`PriceUnit`](https://docs.sparecores.com/crawler/reference/table_fields.md#priceunit)) – Billing unit of the pricing model.
- **price** ([`float`](https://docs.python.org/3/builtins/functions.html#float)) – Actual price of a billing unit.
- **price_upfront** ([`float`](https://docs.python.org/3/builtins/functions.html#float)) – Price to be paid when setting up the resource.
- **price_tiered** ([`List`](https://docs.python.org/3/library/typing.html#typing.List)`[`[`PriceTier`](https://docs.sparecores.com/crawler/reference/table_fields.md#pricetier)`]`) – List of pricing tiers with min/max thresholds and actual prices.
- **currency** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Currency of the prices.
- **status** ([`Status`](https://docs.sparecores.com/crawler/reference/table_fields.md#status)) – Status of the resource (active or inactive).
- **observed_at** ([`datetime`](https://docs.python.org/3/library/datetime.html#module-datetime)) – Timestamp of the last observation.

## class <code class="doc-name">ServerDescription</code> [tables.py:630–638](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L630-L638)

Bases: [`ServerDescriptionBase`](https://docs.sparecores.com/crawler/reference/table_bases.md)

Variable length, plain English descriptions of Server hardware specs, performance, cost-efficiency, and workflow fit.

**Attributes:**

- **page** ([`List`](https://docs.python.org/3/library/typing.html#typing.List)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#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`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Dense and technical server description using around 150 words in a single paragraph.
- **og_description** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – 200 character server description explicitly including vendor and server name.
- **meta_description** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – 150 character server description explicitly including vendor and server name.
- **tagline** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – 20-word tagline on server positioning and key differentiators without the vendor or server name.
- **bullet_points** ([`List`](https://docs.python.org/3/library/typing.html#typing.List)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – 4-6 concise bullet points highlighting key features and best-fit workloads.
- **categories** ([`List`](https://docs.python.org/3/library/typing.html#typing.List)`[`[`Category`](https://docs.sparecores.com/crawler/reference/table_fields.md#category)`]`) – One or more workload categories best fitting the server.
- **status** ([`Status`](https://docs.sparecores.com/crawler/reference/table_fields.md#status)) – Status of the resource (active or inactive).
- **observed_at** ([`datetime`](https://docs.python.org/3/library/datetime.html#module-datetime)) – Timestamp of the last observation.
- **vendor_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Reference to the Vendor.
- **server_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Unique identifier, as called at the Vendor.

## class <code class="doc-name">StoragePrice</code> [tables.py:641–674](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L641-L674)

Bases: [`StoragePriceBase`](https://docs.sparecores.com/crawler/reference/table_bases.md)

Flexible Storage prices in each Region.

**Attributes:**

- **vendor_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Reference to the Vendor.
- **region_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Reference to the Region.
- **storage_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Reference to the Storage.
- **unit** ([`PriceUnit`](https://docs.sparecores.com/crawler/reference/table_fields.md#priceunit)) – Billing unit of the pricing model.
- **price** ([`float`](https://docs.python.org/3/builtins/functions.html#float)) – Actual price of a billing unit.
- **price_upfront** ([`float`](https://docs.python.org/3/builtins/functions.html#float)) – Price to be paid when setting up the resource.
- **price_tiered** ([`List`](https://docs.python.org/3/library/typing.html#typing.List)`[`[`PriceTier`](https://docs.sparecores.com/crawler/reference/table_fields.md#pricetier)`]`) – List of pricing tiers with min/max thresholds and actual prices.
- **currency** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Currency of the prices.
- **status** ([`Status`](https://docs.sparecores.com/crawler/reference/table_fields.md#status)) – Status of the resource (active or inactive).
- **observed_at** ([`datetime`](https://docs.python.org/3/library/datetime.html#module-datetime)) – Timestamp of the last observation.

## class <code class="doc-name">Database</code> [tables.py:677–698](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L677-L698)

Bases: [`DatabaseBase`](https://docs.sparecores.com/crawler/reference/table_bases.md)

Managed database SKUs.

**Attributes:**

- **vendor_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Reference to the Vendor.
- **database_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Unique identifier, as called at the Vendor.
- **name** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Human-friendly name.
- **api_reference** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#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`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`dict`](https://docs.python.org/3/builtins/stdtypes.html#dict)`]`) – How this resource is referenced in the vendor API calls, including the parameter name(s).
- **display_name** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Human-friendly reference (usually the id or name) of the resource.
- **description** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – Short description.
- **family** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – Broad workload class of the database in the vendor's own naming, e.g. General Purpose or Memory Optimized.
- **series** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – Hardware line and generation of the database, matching the series of the server it runs on, where known.
- **server_id** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – Reference to the underlying cloud server's identifier.
- **vcpus** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`int`](https://docs.python.org/3/builtins/functions.html#int)`]`) – Number of virtual CPU cores allocated to the database server instance.
- **memory_amount** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`int`](https://docs.python.org/3/builtins/functions.html#int)`]`) – Amount of RAM (MiB) provisioned for the instance.
- **engine** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`DatabaseEngine`](https://docs.sparecores.com/crawler/reference/table_fields.md#databaseengine)`]`) – Managed database engine running on the instance.
- **wire_protocol** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`DatabaseWireProtocol`](https://docs.sparecores.com/crawler/reference/table_fields.md#databasewireprotocol)`]`) – Network protocol used for client connections.
- **engine_versions** ([`List`](https://docs.python.org/3/library/typing.html#typing.List)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – Major database engine versions supported.
- **auto_upgrade_versions** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`bool`](https://docs.python.org/3/builtins/functions.html#bool)`]`) – Auto-upgrade between minor database engine versions.
- **ha** ([`List`](https://docs.python.org/3/library/typing.html#typing.List)`[`[`DatabaseHaLevel`](https://docs.sparecores.com/crawler/reference/table_fields.md#databasehalevel)`]`) – Ordered HA levels supported, highest tier first.
- **ha_strategy** ([`List`](https://docs.python.org/3/library/typing.html#typing.List)`[`[`DatabaseHaStrategy`](https://docs.sparecores.com/crawler/reference/table_fields.md#databasehastrategy)`]`) – Ordered HA strategies supported, highest tier first.
- **max_read_replicas** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`int`](https://docs.python.org/3/builtins/functions.html#int)`]`) – Maximum number of read-only replica nodes supported to scale read workloads.
- **custom_config** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`bool`](https://docs.python.org/3/builtins/functions.html#bool)`]`) – Whether database engine parameters/flags can be customized.
- **custom_extensions** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`bool`](https://docs.python.org/3/builtins/functions.html#bool)`]`) – Support for custom database engine extensions/plugins.
- **storage_size** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`int`](https://docs.python.org/3/builtins/functions.html#int)`]`) – Bundled storage capacity included in the database (GB).
- **storage_extra_min** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`int`](https://docs.python.org/3/builtins/functions.html#int)`]`) – Minimum custom storage size (in GB) that can be attached to the instance.
- **storage_extra_max** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`int`](https://docs.python.org/3/builtins/functions.html#int)`]`) – Maximum storage limit (in GB) supported by the instance or storage tier.
- **storage_extra_autosize** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`bool`](https://docs.python.org/3/builtins/functions.html#bool)`]`) – Whether storage capacity can automatically expand as disk usage grows.
- **compatible_storage_ids** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`List`](https://docs.python.org/3/library/typing.html#typing.List)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]]`) – List of database_storage_ids that can be attached to the database as extra storage.
- **disk_encryption** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`bool`](https://docs.python.org/3/builtins/functions.html#bool)`]`) – Indicates whether underlying storage drives are encrypted at rest.
- **scheduled_backups** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`bool`](https://docs.python.org/3/builtins/functions.html#bool)`]`) – Support for automated snapshot schedules and backup retention management.
- **continuous_backups** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`int`](https://docs.python.org/3/builtins/functions.html#int)`]`) – Maximum point-in-time recovery (PITR) log retention window expressed in days (0 if unsupported).
- **connection_pool** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`bool`](https://docs.python.org/3/builtins/functions.html#bool)`]`) – Managed connection proxy support.
- **system_monitoring** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`bool`](https://docs.python.org/3/builtins/functions.html#bool)`]`) – Availability of host-level CPU, RAM, and disk metrics dashboards.
- **database_monitoring** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`bool`](https://docs.python.org/3/builtins/functions.html#bool)`]`) – Database engine performance insights (slow queries, locks, execution plans).
- **autotuning_advice** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`bool`](https://docs.python.org/3/builtins/functions.html#bool)`]`) – Analyzes workload and generates actionable performance tuning advice.
- **autotuning_apply** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`bool`](https://docs.python.org/3/builtins/functions.html#bool)`]`) – System automatically executes performance fixes (e.g., index creation, parameter tuning) without operator intervention.
- **sla** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`float`](https://docs.python.org/3/builtins/functions.html#float)`]`) – Service level agreement as a percentage, e.g. 99.95.
- **security_features** ([`List`](https://docs.python.org/3/library/typing.html#typing.List)`[`[`DatabaseSecurityFeature`](https://docs.sparecores.com/crawler/reference/table_fields.md#databasesecurityfeature)`]`) – Security capabilities supported by DBaaS providers.
- **retirement_date** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`date`](https://docs.python.org/3/library/datetime.html#datetime.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`](https://docs.sparecores.com/crawler/reference/table_fields.md#status)) – Status of the resource (active or inactive).
- **observed_at** ([`datetime`](https://docs.python.org/3/library/datetime.html#module-datetime)) – Timestamp of the last observation.

**Functions:**

- [**check_inspector_task_block_reasons**](#databasecheck_inspector_task_block_reasons) – Check if the Database should run inspector task(s) and return block reasons.

### meth <code class="doc-parent">Database.</code><code class="doc-name">check_inspector_task_block_reasons</code> [tables.py:680–682](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L680-L682)

```python
check_inspector_task_block_reasons(tasks)
```

Check if the Database should run inspector task(s) and return block reasons.

## class <code class="doc-name">DatabasePrice</code> [tables.py:701–734](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L701-L734)

Bases: [`DatabasePriceBase`](https://docs.sparecores.com/crawler/reference/table_bases.md)

Managed database SKU prices per Region.

**Attributes:**

- **vendor_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Reference to the Vendor.
- **region_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Reference to the Region.
- **database_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Reference to the Database.
- **allocation** ([`Allocation`](https://docs.sparecores.com/crawler/reference/table_fields.md#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`](https://docs.sparecores.com/crawler/reference/table_fields.md#priceunit)) – Billing unit of the pricing model.
- **price** ([`float`](https://docs.python.org/3/builtins/functions.html#float)) – Actual price of a billing unit.
- **price_upfront** ([`float`](https://docs.python.org/3/builtins/functions.html#float)) – Price to be paid when setting up the resource.
- **price_tiered** ([`List`](https://docs.python.org/3/library/typing.html#typing.List)`[`[`PriceTier`](https://docs.sparecores.com/crawler/reference/table_fields.md#pricetier)`]`) – List of pricing tiers with min/max thresholds and actual prices.
- **currency** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Currency of the prices.
- **status** ([`Status`](https://docs.sparecores.com/crawler/reference/table_fields.md#status)) – Status of the resource (active or inactive).
- **observed_at** ([`datetime`](https://docs.python.org/3/library/datetime.html#module-datetime)) – Timestamp of the last observation.

## class <code class="doc-name">DatabaseStorage</code> [tables.py:737–744](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L737-L744)

Bases: [`DatabaseStorageBase`](https://docs.sparecores.com/crawler/reference/table_bases.md)

Managed database storage products.

**Attributes:**

- **vendor_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Reference to the Vendor.
- **database_storage_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Unique identifier, as called at the Vendor.
- **name** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Human-friendly name.
- **description** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – Short description.
- **scope** (`DatabaseStorageScope`) – Scope of the storage product, e.g. data or backup.
- **redundancy** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – Redundancy model, e.g. LRS or GRS.
- **min_size** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`int`](https://docs.python.org/3/builtins/functions.html#int)`]`) – Minimum required size (GB).
- **max_size** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`int`](https://docs.python.org/3/builtins/functions.html#int)`]`) – Maximum possible size (GB).
- **max_iops** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`int`](https://docs.python.org/3/builtins/functions.html#int)`]`) – Maximum Input/Output Operations Per Second.
- **max_throughput** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`int`](https://docs.python.org/3/builtins/functions.html#int)`]`) – Maximum Throughput (MB/s).
- **status** ([`Status`](https://docs.sparecores.com/crawler/reference/table_fields.md#status)) – Status of the resource (active or inactive).
- **observed_at** ([`datetime`](https://docs.python.org/3/library/datetime.html#module-datetime)) – Timestamp of the last observation.

## class <code class="doc-name">DatabaseStoragePrice</code> [tables.py:747–782](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L747-L782)

Bases: [`DatabaseStoragePriceBase`](https://docs.sparecores.com/crawler/reference/table_bases.md)

Managed database storage prices in each Region.

**Attributes:**

- **vendor_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Reference to the Vendor.
- **region_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Reference to the Region.
- **database_storage_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Reference to the DatabaseStorage.
- **unit** ([`PriceUnit`](https://docs.sparecores.com/crawler/reference/table_fields.md#priceunit)) – Billing unit of the pricing model.
- **price** ([`float`](https://docs.python.org/3/builtins/functions.html#float)) – Actual price of a billing unit.
- **price_upfront** ([`float`](https://docs.python.org/3/builtins/functions.html#float)) – Price to be paid when setting up the resource.
- **price_tiered** ([`List`](https://docs.python.org/3/library/typing.html#typing.List)`[`[`PriceTier`](https://docs.sparecores.com/crawler/reference/table_fields.md#pricetier)`]`) – List of pricing tiers with min/max thresholds and actual prices.
- **currency** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Currency of the prices.
- **status** ([`Status`](https://docs.sparecores.com/crawler/reference/table_fields.md#status)) – Status of the resource (active or inactive).
- **observed_at** ([`datetime`](https://docs.python.org/3/library/datetime.html#module-datetime)) – Timestamp of the last observation.

## class <code class="doc-name">TrafficPrice</code> [tables.py:785–804](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L785-L804)

Bases: [`TrafficPriceBase`](https://docs.sparecores.com/crawler/reference/table_bases.md)

Extra Traffic prices in each Region.

**Attributes:**

- **vendor_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Reference to the Vendor.
- **region_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Reference to the Region.
- **direction** ([`TrafficDirection`](https://docs.sparecores.com/crawler/reference/table_fields.md#trafficdirection)) – Direction of the traffic: inbound or outbound.
- **unit** ([`PriceUnit`](https://docs.sparecores.com/crawler/reference/table_fields.md#priceunit)) – Billing unit of the pricing model.
- **price** ([`float`](https://docs.python.org/3/builtins/functions.html#float)) – Actual price of a billing unit.
- **price_upfront** ([`float`](https://docs.python.org/3/builtins/functions.html#float)) – Price to be paid when setting up the resource.
- **price_tiered** ([`List`](https://docs.python.org/3/library/typing.html#typing.List)`[`[`PriceTier`](https://docs.sparecores.com/crawler/reference/table_fields.md#pricetier)`]`) – List of pricing tiers with min/max thresholds and actual prices.
- **currency** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Currency of the prices.
- **status** ([`Status`](https://docs.sparecores.com/crawler/reference/table_fields.md#status)) – Status of the resource (active or inactive).
- **observed_at** ([`datetime`](https://docs.python.org/3/library/datetime.html#module-datetime)) – Timestamp of the last observation.

## class <code class="doc-name">Ipv4Price</code> [tables.py:807–826](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L807-L826)

Bases: [`Ipv4PriceBase`](https://docs.sparecores.com/crawler/reference/table_bases.md)

Price of an IPv4 address in each Region.

**Attributes:**

- **vendor_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Reference to the Vendor.
- **region_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Reference to the Region.
- **unit** ([`PriceUnit`](https://docs.sparecores.com/crawler/reference/table_fields.md#priceunit)) – Billing unit of the pricing model.
- **price** ([`float`](https://docs.python.org/3/builtins/functions.html#float)) – Actual price of a billing unit.
- **price_upfront** ([`float`](https://docs.python.org/3/builtins/functions.html#float)) – Price to be paid when setting up the resource.
- **price_tiered** ([`List`](https://docs.python.org/3/library/typing.html#typing.List)`[`[`PriceTier`](https://docs.sparecores.com/crawler/reference/table_fields.md#pricetier)`]`) – List of pricing tiers with min/max thresholds and actual prices.
- **currency** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Currency of the prices.
- **status** ([`Status`](https://docs.sparecores.com/crawler/reference/table_fields.md#status)) – Status of the resource (active or inactive).
- **observed_at** ([`datetime`](https://docs.python.org/3/library/datetime.html#module-datetime)) – Timestamp of the last observation.

## class <code class="doc-name">Benchmark</code> [tables.py:829–834](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L829-L834)

Bases: [`BenchmarkBase`](https://docs.sparecores.com/crawler/reference/table_bases.md)

Benchmark scenario definitions.

**Attributes:**

- **benchmark_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Unique identifier of a specific Benchmark.
- **category** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – Category of the resource.
- **subcategory** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – Subcategory of the benchmark within its category, e.g. the scope of an nvbandwidth test.
- **source** ([`Union`](https://docs.python.org/3/library/typing.html#typing.Union)`[`[`MeasuredSource`](https://docs.sparecores.com/crawler/reference/workload_profiles.md#measuredsource), [`ExtrapolatedSource`](https://docs.sparecores.com/crawler/reference/workload_profiles.md#extrapolatedsource), [`CompoundSource`](https://docs.sparecores.com/crawler/reference/workload_profiles.md#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`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Human-friendly name.
- **description** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – Short description.
- **note** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#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`](https://docs.python.org/3/builtins/stdtypes.html#str)) – The name of the benchmark framework/software/tool used.
- **config_fields** ([`dict`](https://docs.python.org/3/builtins/stdtypes.html#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`](https://docs.python.org/3/builtins/stdtypes.html#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`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – The name of measurement recorded in the benchmark.
- **unit** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – Optional unit of measurement for the benchmark score.
- **higher_is_better** ([`bool`](https://docs.python.org/3/builtins/functions.html#bool)) – If higher benchmark score means better performance, or vica versa.
- **status** ([`Status`](https://docs.sparecores.com/crawler/reference/table_fields.md#status)) – Status of the resource (active or inactive).
- **observed_at** ([`datetime`](https://docs.python.org/3/library/datetime.html#module-datetime)) – Timestamp of the last observation.

## class <code class="doc-name">BenchmarkScore</code> [tables.py:837–865](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L837-L865)

Bases: [`BenchmarkScoreBase`](https://docs.sparecores.com/crawler/reference/table_bases.md#benchmarkscorebase)

Results of running Benchmark scenarios on Servers or managed Databases.

**Attributes:**

- **vendor_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Reference to the Vendor.
- **benchmark_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Reference to the Benchmark.
- **resource_type** ([`ResourceType`](https://docs.sparecores.com/crawler/reference/table_fields.md#resourcetype)) – Kind of resource the score refers to.
- **resource_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Reference to the resource (see resource_type).
- **config** ([`HashableDict`](https://docs.sparecores.com/crawler/reference/table_fields.md#hashabledict) | [`dict`](https://docs.python.org/3/builtins/stdtypes.html#dict)) – Dictionary of config parameters of the specific benchmark, e.g. {"bandwidth": 4096}
- **framework_version** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – The version of the benchmark tool used.
- **environment** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`dict`](https://docs.python.org/3/builtins/stdtypes.html#dict)`]`) – Extensible environment details (e.g. kernel_version, database_engine_version).
- **score** ([`float`](https://docs.python.org/3/builtins/functions.html#float)) – The resulting score of the benchmark.
- **score_breakdown** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`WorkloadScoreBreakdown`](https://docs.sparecores.com/crawler/reference/table_fields.md#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`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – Optional note, comment or context on the benchmark score.
- **status** ([`Status`](https://docs.sparecores.com/crawler/reference/table_fields.md#status)) – Status of the resource (active or inactive).
- **observed_at** ([`datetime`](https://docs.python.org/3/library/datetime.html#module-datetime)) – Timestamp of the last observation.

## class <code class="doc-name">ArchiveRule</code> [tables.py:868–1055](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L868-L1055)

Bases: [`ArchiveRuleBase`](https://docs.sparecores.com/crawler/reference/table_bases.md)

Rules archiving records that were replaced by another record or deliberately dropped.

The rules are defined in [sc_crawler.archive_rules](https://docs.sparecores.com/crawler/reference/archive_rules.md), and are applied by
the `pull` and `sync` commands (see [apply](#archiveruleapply)), which set the matched
records and their child records to [ARCHIVED](https://docs.sparecores.com/crawler/reference/table_fields.md#status).

**Examples:**

```pycon
>>> 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`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Name of the table of the archived record(s), e.g. `region`.
- **match** ([`HashableDict`](https://docs.sparecores.com/crawler/reference/table_fields.md#hashabledict) | [`dict`](https://docs.python.org/3/builtins/stdtypes.html#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`](https://docs.sparecores.com/crawler/reference/table_fields.md#hashabledict) | [`dict`](https://docs.python.org/3/builtins/stdtypes.html#dict)) – New values of the `match` columns identifying the successor of each archived record. Empty when there is no successor, or none that can be given as fixed values (see `reason`).
- **reason** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – Why the record(s) got archived.
- **status** ([`Status`](https://docs.sparecores.com/crawler/reference/table_fields.md#status)) – Status of the resource (active or inactive).
- **observed_at** ([`datetime`](https://docs.python.org/3/library/datetime.html#module-datetime)) – Timestamp of the last observation.

**Functions:**

- [**apply**](#archiveruleapply) – Store the rules in the database, and archive the records they match.
- [**find_unmatched**](#archiverulefind_unmatched) – Describe the rules referring to records that are in none of the databases.
- [**check**](#archiverulecheck) – Check the definition of the rules, without a database.

### meth <code class="doc-parent">ArchiveRule.</code><code class="doc-name">apply</code> [tables.py:887–921](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L887-L921)

```python
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](https://docs.sparecores.com/crawler/reference/table_fields.md#status).

**Parameters:**

- **session** (`Session`) – Database connection. Changes are not committed.
- **rules** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`List`](https://docs.python.org/3/library/typing.html#typing.List)`[`[`ArchiveRule`](#archiverule)`]]`) – Rules to apply. Defaults to all current rules.

**Returns:**

- [`Dict`](https://docs.python.org/3/library/typing.html#typing.Dict)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str), [`int`](https://docs.python.org/3/builtins/functions.html#int)`]` – Number of newly archived records per table name.

### meth <code class="doc-parent">ArchiveRule.</code><code class="doc-name">find_unmatched</code> [tables.py:923–965](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L923-L965)

```python
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`](https://docs.python.org/3/library/typing.html#typing.List)`[Session]`) – Connections to the databases to look up the records in.
- **table_names** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`List`](https://docs.python.org/3/library/typing.html#typing.List)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]]`) – Check only the rules of these tables. Defaults to all tables.
- **rules** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`List`](https://docs.python.org/3/library/typing.html#typing.List)`[`[`ArchiveRule`](#archiverule)`]]`) – Rules to check. Defaults to all current rules.

**Returns:**

- [`List`](https://docs.python.org/3/library/typing.html#typing.List)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]` – A message for each `match` or `successor` without any record.

### meth <code class="doc-parent">ArchiveRule.</code><code class="doc-name">check</code> [tables.py:967–1055](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L967-L1055)

```python
check(rules=None)
```

Check the definition of the rules, without a database.

**Parameters:**

- **rules** ([`Optional`](https://docs.python.org/3/library/typing.html#typing.Optional)`[`[`List`](https://docs.python.org/3/library/typing.html#typing.List)`[`[`ArchiveRule`](#archiverule)`]]`) – Rules to check. Defaults to all current rules.

**Returns:**

- [`List`](https://docs.python.org/3/library/typing.html#typing.List)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]` – Description of the problems found: unknown tables, `match` keys that
are not primary key columns of the table, `successor` with other
keys than `match`, enum columns not given by the value of a
member, missing `reason` of rules without a successor,
and rules leading back to a record they archived (cycles).

## func <code class="doc-name">is_table</code> [tables.py:1071–1076](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L1071-L1076)

```python
is_table(table)
```

Checks if an object is a SQLModel table definition.

## attr <code class="doc-name">tables</code> [tables.py:1079](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L1079)

```python
tables: List[SQLModel] = [o for o in globals().values() if is_table(o)]
```

List of all SQLModel (table) models.

## class <code class="doc-name">Metadata</code> [tables.py:1086–1091](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/tables.py#L1086-L1091)

Bases: `SQLModel`

Key/value metadata table for database release information.
