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')

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.10.0.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ecoindex_compute-5.10.0-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file ecoindex_compute-5.10.0.tar.gz.

File metadata

  • Download URL: ecoindex_compute-5.10.0.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for ecoindex_compute-5.10.0.tar.gz
Algorithm Hash digest
SHA256 71dbf462aa6b728a5129c34c74790e66f25e294e6dcdbfe97f23096bcb24da19
MD5 bbaf3d21cfb00f63c9f45181bdcac8c2
BLAKE2b-256 b0ef4ff99743c00f0e7fbb4684394e90a55b93ed637ff8b9cf00d48157795a3d

See more details on using hashes here.

File details

Details for the file ecoindex_compute-5.10.0-py3-none-any.whl.

File metadata

  • Download URL: ecoindex_compute-5.10.0-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for ecoindex_compute-5.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 805afcc63ed4c77f36a238b47fa000857bbd53c47c08d8c859a8fb024998f07e
MD5 936d6b37e313d6f7ff67d02c56b31260
BLAKE2b-256 7b70c72af70cf58d11d3dee09a993879f40716688922430651bbcce6e7e5adae

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

5.10.0 This release

2 files

5.9.0

2 files

5.8.0

2 files

5.7.0

2 files

5.5.0

2 files

5.4.3

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page