Skip to main content

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

Compute ecoindex

You can easily compute the ecoindex by calling the function compute_ecoindex():

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

Example:

import asyncio
from pprint import pprint

from ecoindex.compute import compute_ecoindex

# Get ecoindex from DOM elements, size of page and requests of the page
ecoindex = asyncio.run(compute_ecoindex(nodes=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')

Metadata

Release files for ecoindex_compute 5.10.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ecoindex_compute 5.10.0
File Size Uploaded
ecoindex_compute-5.10.0.tar.gz 7.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ecoindex_compute 5.10.0
File Interpreter ABI Platform
ecoindex_compute-5.10.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.8 kB

Release files / ecoindex_compute-5.10.0.tar.gz

Download URL ecoindex_compute-5.10.0.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
71dbf462aa6b728a5129c34c74790e66f25e294e6dcdbfe97f23096bcb24da19
BLAKE2b-256 checksum
How to use checksums
b0ef4ff99743c00f0e7fbb4684394e90a55b93ed637ff8b9cf00d48157795a3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / ecoindex_compute-5.10.0-py3-none-any.whl

Download URL ecoindex_compute-5.10.0-py3-none-any.whl
Size 10.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
805afcc63ed4c77f36a238b47fa000857bbd53c47c08d8c859a8fb024998f07e
BLAKE2b-256 checksum
How to use checksums
7b70c72af70cf58d11d3dee09a993879f40716688922430651bbcce6e7e5adae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

5.10.0 This release

2 release files

5.9.0

2 release files

5.8.0

2 release files

5.7.0

2 release files

5.5.0

2 release files

5.4.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page