This basic module provides a simple interface to get the Ecoindex based on 3 parameters:
- The number of DOM elements in the page
- The size of the page
- The number of external requests of the page
- Python ^3.8
pip install ecoindex
from ecoindex import get_ecoindex
from pprint import pprint
result = get_ecoindex(dom=100, size=100, requests=100)
pprint(result)
Ecoindex(grade='B', score=67, ges=1.66, water=2.49)
pytest