CLI + API for Google PageSpeed Insights
Project description
PyPSI
CLI 🖥 + API for Google PageSpeed Insights
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: 7URL
: Requiredapi_key
: Optionalcategory
: Optionallocale
: Optionalstratergy
: Optionalutm_campaign
: optionalutm_source
: Optionalcaptcha_token
: Optional
Project details
Release history Release notifications | RSS feed
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)
Built Distribution
Close
Hashes for PythonPSI-1.5.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a2d2bbfff404c17e1a694a5f6a4b5431b180c9d5395f37a711cb61da140000a |
|
MD5 | 549805f766e6bca2c7f20a11afcfaa71 |
|
BLAKE2b-256 | 39efb35ca9b563deee71de8f6acc111490ff4ce4f6fa3bfb1096a3a45ddb8e60 |