Skip to content

2Fake/ssllabs

Repository files navigation

ssllabs

This project implements the Qualys SSL Labs API in python. It uses API version 3. All methods are async. However, it is not affiliated with or officially supported by SSL Labs.

System requirements

Defining the system requirements with exact versions typically is difficult. But there is a tested environment:

  • Linux
  • Python 3.11.6
  • pip 23.3.1
  • dacite 1.8.1
  • httpx 0.25.2

Other versions and even other operating systems might work. Feel free to tell us about your experience.

Versioning

In our versioning we follow Semantic Versioning.

Installation

The Python Package Index takes care for you. Just use pip or your favorite package manager. Please take care of creating a virtual environment if needed.

python -m pip install ssllabs

High level usage

If you want to cover on the common usage cases, you can use our high level implementations that already take care of the recommended protocol usage and rate limits. Please keep in mind, that you will be sending assessment requests to remote SSL Labs servers and that your information will be shared with them. Subject to the terms and conditions.

import asyncio

from ssllabs import Ssllabs

async def analyze():
    ssllabs = Ssllabs()
    return await ssllabs.analyze(host="ssllabs.com")

asyncio.run(analyze())

This will give you a Host object as dataclass. This call runs quite long as it takes time to run all tests. You probably know that from using the webinterface.

Tip

Please see our documentation for further information and extended examples.