Skip to content

lookup

sc_crawler.lookup #

countries module-attribute #

countries = {k: Country(country_id=k, continent=v)for (k, v) in items()}

Dictionary of sc_crawler.tables.Country instances keyed by the country_id.

compliance_frameworks module-attribute #

compliance_frameworks = {'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 standard for information security management systems.', homepage='https://www.iso.org/standard/27001')}

Dictionary of sc_crawler.tables.ComplianceFramework instances keyed by the compliance_framework_id.

map_compliance_frameworks_to_vendor #

map_compliance_frameworks_to_vendor(vendor_id, compliance_framework_ids)

Map compliance frameworks to vendors in a dict.

Parameters:

Name Type Description Default
vendor_id str

identifier of a Vendor

required
compliance_framework_ids List[str]

identifier(s) of ComplianceFramework

required

Returns:

Type Description
dict

Array of dictionaroes that can be passed to sc_crawler.insert.insert_items.

Source code in sc_crawler/lookup.py
def map_compliance_frameworks_to_vendor(
    vendor_id: str, compliance_framework_ids: List[str]
) -> dict:
    """Map compliance frameworks to vendors in a dict.

    Args:
        vendor_id: identifier of a [Vendor][sc_crawler.tables.Vendor]
        compliance_framework_ids: identifier(s) of [`ComplianceFramework`][sc_crawler.tables.ComplianceFramework]

    Returns:
        Array of dictionaroes that can be passed to [sc_crawler.insert.insert_items][].
    """
    items = []
    for compliance_framework_id in compliance_framework_ids:
        items.append(
            {
                "vendor_id": vendor_id,
                "compliance_framework_id": compliance_framework_id,
            }
        )
    return items