Skip to main content

CLI + API for Google PageSpeed Insights

Project description

PyPSI

CLI 🖥 + API for Google PageSpeed Insights

PythonPSI PyPI - Downloads

PyPSI

Installation

pip install PythonPSI

Usage

psi <SITE_URL> <OPTION1> <OPTION2> ...

Example:

psi google.com --category seo --stratergy desktop --locale en

Arguments

  • URL - Required
  • --api_key - Optional, default: None, description: Required to use the API in an automated way and make multiple requests per second. Learn more.
  • --category - Optional, default: performance, description: A Lighthouse category to run; if none are given, only Performance category will be run
  • --locale - Optional, default: en, description: The locale used to localize formatted results
  • --stratergy - Optional, default: desktop, description: The analysis strategy (desktop or mobile) to use, and desktop is the default
  • --utm_campaign - Optional, default: None, description: Campaign name for analytics.
  • --utm_source - Optional, default: None, description: Campaign source for analytics.
  • --captcha_token - Optional, default: None, description: The captcha token passed when filling out a captcha.

API Usage

from PythonPSI.api import PSI

PSI('google.com', category='seo', locale='en', stratergy='desktop')
# Returns JSON output
  • PSI - Required arguments: 1, Optional arguments: 7
    • URL: Required
    • api_key: Optional
    • category: Optional
    • locale: Optional
    • stratergy: Optional
    • utm_campaign: optional
    • utm_source: Optional
    • captcha_token: Optional

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

PythonPSI-1.5.0.tar.gz (3.3 kB view hashes)

Uploaded source

Built Distribution

PythonPSI-1.5.0-py3-none-any.whl (4.7 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page