djembenj / ecoindex_python

Home Page:http://www.ecoindex.fr

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ECOINDEX PYTHON

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

Requirements

  • Python ^3.8

Install

pip install ecoindex

Use

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)

Tests

pytest

About

http://www.ecoindex.fr

License:MIT License


Languages

Language:Python 100.0%