# `sc_crawler.lookup`

> Static lookup data: countries, compliance frameworks and benchmark definitions.

# `sc_crawler.lookup`

**Functions:**

- [**map_compliance_frameworks_to_vendor**](#map_compliance_frameworks_to_vendor) – Map compliance frameworks to vendors in a dict.
- [**stress_ng_benchmark_id**](#stress_ng_benchmark_id) – Return the benchmark id for a warehoused stress-ng stressor.

**Attributes:**

- [**countries**](#countries) ([`dict`](https://docs.python.org/3/builtins/stdtypes.html#dict)) – Dictionary of [sc_crawler.tables.Country](https://docs.sparecores.com/crawler/reference/tables.md#country) instances keyed by the `country_id`.
- [**compliance_frameworks**](#compliance_frameworks) ([`dict`](https://docs.python.org/3/builtins/stdtypes.html#dict)) – Dictionary of [sc_crawler.tables.ComplianceFramework](https://docs.sparecores.com/crawler/reference/tables.md#complianceframework) instances keyed by the `compliance_framework_id`.

## attr <code class="doc-name">countries</code> [lookup.py:65–67](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/lookup.py#L65-L67)

```python
countries: dict = {k: Country(country_id=k, continent=v) for k, v in country_continent_mapping.items()}
```

Dictionary of [sc_crawler.tables.Country](https://docs.sparecores.com/crawler/reference/tables.md#country) instances keyed by the `country_id`.

## attr <code class="doc-name">compliance_frameworks</code> [lookup.py:73–95](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/lookup.py#L73-L95)

```python
compliance_frameworks: dict = {'hipaa': ComplianceFramework(compliance_framework_id='hipaa', name='The Health Insurance Portability and Accountability Act', abbreviation='HIPAA', description="HIPAA (Health Insurance Portability and Accountability Act) is a U.S. federal law designed to safeguard the privacy and security of individuals' health information, establishing standards for its protection and regulating its use in the healthcare industry.", homepage='https://www.cdc.gov/phlp/publications/topic/hipaa.html'), 'soc2t2': ComplianceFramework(compliance_framework_id='soc2t2', name='System and Organization Controls Level 2 Type 2', abbreviation='SOC 2 Type 2', description="SOC 2 Type 2 is a framework for assessing and certifying the effectiveness of a service organization's information security policies and procedures over time, emphasizing the operational aspects and ongoing monitoring of controls.", homepage='https://www.aicpa-cima.com/topic/audit-assurance/audit-and-assurance-greater-than-soc-2'), 'iso27001': ComplianceFramework(compliance_framework_id='iso27001', name='ISO/IEC 27001', abbreviation='ISO 27001', description='ISO 27001 is a standard for information security management systems.', homepage='https://www.iso.org/standard/27001')}
```

Dictionary of [sc_crawler.tables.ComplianceFramework](https://docs.sparecores.com/crawler/reference/tables.md#complianceframework) instances keyed by the `compliance_framework_id`.

## func <code class="doc-name">map_compliance_frameworks_to_vendor</code> [lookup.py:99–119](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/lookup.py#L99-L119)

```python
map_compliance_frameworks_to_vendor(vendor_id, compliance_framework_ids)
```

Map compliance frameworks to vendors in a dict.

**Parameters:**

- **vendor_id** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – identifier of a [Vendor](https://docs.sparecores.com/crawler/reference/tables.md#vendor)
- **compliance_framework_ids** ([`List`](https://docs.python.org/3/library/typing.html#typing.List)`[`[`str`](https://docs.python.org/3/builtins/stdtypes.html#str)`]`) – identifier(s) of [`ComplianceFramework`](https://docs.sparecores.com/crawler/reference/tables.md#complianceframework)

**Returns:**

- [`dict`](https://docs.python.org/3/builtins/stdtypes.html#dict) – Array of dictionaries that can be passed to [sc_crawler.insert.insert_items](https://docs.sparecores.com/crawler/reference/insert.md#insert_items).

## func <code class="doc-name">stress_ng_benchmark_id</code> [lookup.py:636–638](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/lookup.py#L636-L638)

```python
stress_ng_benchmark_id(method)
```

Return the benchmark id for a warehoused stress-ng stressor.
