ssllabs package#

Subpackages#

Submodules#

ssllabs.ssllabs module#

High level implementation of the SSL Labs API.

class ssllabs.ssllabs.Ssllabs(client: AsyncClient | None = None)#

Bases: object

High level methods to interact with the SSL Labs Assessment APIs.

async analyze(host: str, *, publish: bool = False, ignore_mismatch: bool = False, from_cache: bool = False, max_age: int | None = None) HostData#

Test a particular host with respect to the cool off and the maximum number of assessments.

Parameters:
  • host – Host to test

  • publish – True if assessment results should be published on the public results boards

  • ignore_mismatch – True if assessment shall proceed even when the server certificate doesn’t match the hostname

  • from_cache – True if cached results should be used instead of new assessments

  • max_age – Maximum age cached data might have in hours

See also: ssllabs/ssllabs-scan

async availability() bool#

Check the availability of the SSL Labs servers.

See also: ssllabs/ssllabs-scan

async info() InfoData#

Retrieve the engine and criteria version, and initialize the maximum number of concurrent assessments.

See also: ssllabs/ssllabs-scan

async root_certs(trust_store: TrustStore = TrustStore.MOZILLA) str#

Retrieve root certificates.

Parameters:

trust_store – Trust store to return (Mozilla, MacOS, Android, Java or Windows)

See also: ssllabs/ssllabs-scan

async status_codes() StatusCodesData#

Retrieve known status codes.

See also: ssllabs/ssllabs-scan

Module contents#

Qualys SSL Labs API in Python.

exception ssllabs.EndpointError(messages: list[dict[str, str]])#

Bases: Exception

The Endpoint API raised errors.

class ssllabs.Ssllabs(client: AsyncClient | None = None)#

Bases: object

High level methods to interact with the SSL Labs Assessment APIs.

async analyze(host: str, *, publish: bool = False, ignore_mismatch: bool = False, from_cache: bool = False, max_age: int | None = None) HostData#

Test a particular host with respect to the cool off and the maximum number of assessments.

Parameters:
  • host – Host to test

  • publish – True if assessment results should be published on the public results boards

  • ignore_mismatch – True if assessment shall proceed even when the server certificate doesn’t match the hostname

  • from_cache – True if cached results should be used instead of new assessments

  • max_age – Maximum age cached data might have in hours

See also: ssllabs/ssllabs-scan

async availability() bool#

Check the availability of the SSL Labs servers.

See also: ssllabs/ssllabs-scan

async info() InfoData#

Retrieve the engine and criteria version, and initialize the maximum number of concurrent assessments.

See also: ssllabs/ssllabs-scan

async root_certs(trust_store: TrustStore = TrustStore.MOZILLA) str#

Retrieve root certificates.

Parameters:

trust_store – Trust store to return (Mozilla, MacOS, Android, Java or Windows)

See also: ssllabs/ssllabs-scan

async status_codes() StatusCodesData#

Retrieve known status codes.

See also: ssllabs/ssllabs-scan

exception ssllabs.SsllabsOverloadedError#

Bases: Exception

The service is overloaded.

exception ssllabs.SsllabsUnavailableError#

Bases: Exception

The service is not available.

class ssllabs.TrustStore(value, names=None, *values, module=None, qualname=None, type=None, start=1, boundary=None)#

Bases: IntEnum

Known trust stores.

ANDROID = 3#
JAVA = 4#
MACOS = 2#
MOZILLA = 1#
WINDOWS = 5#