Skip to main content

python-gtmetrix2

python-gtmetrix2 is a Python client library for GTmetrix REST API v2.0 (hence 2 in the name).

Build Status codecov Code style: black Documentation Status License: MIT

PyPI - Latest Version PyPI - Python Version PyPI - Downloads Monthly PyPI - Downloads Daily

Inspired by the library with a similar name.

Installation:

via pip

pip install python-gtmetrix2

manual

  • Clone or download and extract the repository

  • Copy the src/python-gtmetrix2 directory to your project directory

Usage:

Simplest example:

import json
import python_gtmetrix2

api_key = "e8ddc55d93eb0e8281b255ea236dcc4f"    # your API key
url = "http://example.com"                      # URL to test

account = python_gtmetrix2.Account(api_key)     # init
test = account.start_test(url)                  # start test
test.fetch(wait_for_completion=True)            # wait for it to finish
report = test.getreport()                       # get test result

print(json.dumps(report, indent=2))             # do something useful with it

For a wordy introduction into this library, or a more technical explanation, dive into the docs

Versioning:

This project follows semver versioning scheme. Note that according to the semver, as long as the version number starts with 0, no guarantees regarding compatibility are given. Hence, when anyone starts using this library, please let the author know about it, so we can bump version number to one and “freeze” API compatibility.

Metadata

Release files for python-gtmetrix2 0.3.1

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

Source distribution (sdist)

Source distribution for python-gtmetrix2 0.3.1
File Size Uploaded Provenance
python-gtmetrix2-0.3.1.tar.gz 13.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for python-gtmetrix2 0.3.1
File Interpreter ABI Platform
python_gtmetrix2-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 27.5 kB

Release files / python-gtmetrix2-0.3.1.tar.gz

Download URL python-gtmetrix2-0.3.1.tar.gz
Size 13.7 kB
Tags Source
SHA-256 checksum
How to use checksums
001489c5459f15dac2ac694822e99eb07d0702583146e8ae39a0211fdafddec1
BLAKE2b-256 checksum
How to use checksums
59d6d90cfdfcdda9491ae44b7ea86a780221337891f1ba1f505607a53bf594c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.1

Release files / python_gtmetrix2-0.3.1-py3-none-any.whl

Download URL python_gtmetrix2-0.3.1-py3-none-any.whl
Size 13.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dd8fbfd3ce47b73576cfe2a2027c38d8eb5256af37a58bb0287792b92820b02d
BLAKE2b-256 checksum
How to use checksums
aad786afffb52488ec60b6b9b508680708b4930b35f87df215a5c13d78cd2f5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.1

Security for python-gtmetrix2 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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