Skip to main content

Ecoindex module provides a simple way to measure the Ecoindex score based on the 3 parameters: The DOM elements of the page, the size of the page and the number of external requests of the page

Project description

Ecoindex python

Validate project quality PyPI - Version PyPI - Downloads

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.10 with pip

Install

pip install ecoindex_compute

Use

Get ecoindex

You can easily get the ecoindex by calling the function get_ecoindex():

(function) get_ecoindex: (dom: int, size: float, requests: int) -> Coroutine[Any, Any, Ecoindex]

Example:

import asyncio
from pprint import pprint

from ecoindex.compute import get_ecoindex

# Get ecoindex from DOM elements, size of page and requests of the page
ecoindex = asyncio.run(get_ecoindex(dom=100, size=100, requests=100))
pprint(ecoindex)

Result example:

Ecoindex(grade='B', score=72.0, ges=1.56, water=2.34, ecoindex_version='3.0.0')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ecoindex_compute-5.6.0a0.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

ecoindex_compute-5.6.0a0-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file ecoindex_compute-5.6.0a0.tar.gz.

File metadata

  • Download URL: ecoindex_compute-5.6.0a0.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.1 CPython/3.10.13 Linux/6.5.0-1015-azure

File hashes

Hashes for ecoindex_compute-5.6.0a0.tar.gz
Algorithm Hash digest
SHA256 7d00256bfc4e3a17e9a4924c591fd91c65cc903c1701d9a5422142db8cc2728f
MD5 5fd0e9a9a9d12aa53bfa31300a8c9e38
BLAKE2b-256 d95cbb927fbc7b7423026f5c42c40cde45fc76dd2c2060ad9b9940e4e3e01905

See more details on using hashes here.

File details

Details for the file ecoindex_compute-5.6.0a0-py3-none-any.whl.

File metadata

  • Download URL: ecoindex_compute-5.6.0a0-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.1 CPython/3.10.13 Linux/6.5.0-1015-azure

File hashes

Hashes for ecoindex_compute-5.6.0a0-py3-none-any.whl
Algorithm Hash digest
SHA256 94d7d8863573920521a4e6ef12082311937a34b77cd1fce8e1805088b729277f
MD5 3e30c8e4c3d1b92e55fa39b654b9c1b0
BLAKE2b-256 b040a3fea4fc1bfaad9e17c524257dcb568ad9dd1a15e87bcbbf48f0e9ce747c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page