{"id":21037456,"url":"https://github.com/vintasoftware/django-psi","last_synced_at":"2025-05-15T14:32:57.822Z","repository":{"id":46856656,"uuid":"165319676","full_name":"vintasoftware/django-psi","owner":"vintasoftware","description":"Easily integrate Google PageSpeed Insights to your development process - with timeline visualization","archived":false,"fork":false,"pushed_at":"2022-12-08T03:14:00.000Z","size":80,"stargazers_count":8,"open_issues_count":5,"forks_count":2,"subscribers_count":23,"default_branch":"develop","last_synced_at":"2023-08-07T02:54:49.526Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vintasoftware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null}},"created_at":"2019-01-11T22:26:03.000Z","updated_at":"2023-01-03T22:36:27.000Z","dependencies_parsed_at":"2023-01-24T07:10:15.845Z","dependency_job_id":null,"html_url":"https://github.com/vintasoftware/django-psi","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vintasoftware%2Fdjango-psi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vintasoftware%2Fdjango-psi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vintasoftware%2Fdjango-psi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vintasoftware%2Fdjango-psi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vintasoftware","download_url":"https://codeload.github.com/vintasoftware/django-psi/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225359701,"owners_count":17462080,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T13:26:23.178Z","updated_at":"2024-11-19T13:26:23.987Z","avatar_url":"https://github.com/vintasoftware.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Django PSI\n\n[![Build Status](https://travis-ci.org/vintasoftware/django-psi.svg?branch=develop)](https://travis-ci.org/vintasoftware/django-psi)\n[![codecov](https://codecov.io/gh/vintasoftware/django-psi/branch/develop/graph/badge.svg)](https://codecov.io/gh/vintasoftware/django-psi)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\nDjango PSI is a tool for generating and visualizing Page Speed performance reports using Google's PSI API.\nHave a timeline with your score progress, integrate to your CI tool and enable performance tracking per release.\n\n## Requirements:\n- A PostgreSQL Database in your Django project (for JSON fields)\n- Google API Dev Credentials\n\n### Optional:\n- A Slack webhook to send notifications to.\n\n## Quickstart\n\n1. Add the following settings to your Django project\n```python\nPSI_GOOGLE_API_DEV_KEY = 'MYKEY'\nPSI_SLACK_MESSAGE_HOOK = 'http://myslackmessagehook/zxcvbn'\nPSI_FULL_ADMIN_PATH = 'https://example-site.com/admin'\nPSI_ENVS = {\n    'production': {\n        'base_url': 'https://example-site.com',\n    },\n    'staging': {\n        'base_url': 'https://staging-example-site.com',\n    }\n}\n```\n\n2. Add Django PSI to installed apps\n\n```python\nINSTALLED_APPS = [\n    ...\n    'djangopsi',\n    ...\n]\n```\n\n3. Decorate your class-based views with `@is_psi_checked`\n\n```python\nfrom djangopsi.decorators import is_psi_checked\n\n\n@is_psi_checked\nclass ExampleView(generic.TemplateView):\n    ...\n```\n\n4. Run command run_psi_check, or add it to your CI process.\n\n`python manage.py run_psi_check -c -k --slack-message`\n\nOptions:\n\n```\n-c --console\n    Outputs the report in the console\n\n--env=ENV\n    Env in which the analysis will be made. Default value is `production`.\n\n-k --keep\n    Persist the report to the database\n\n--strategy=STRATEGY\n    Strategy to be used on the analysis. Default value is `all` (desktop and mobile).\n\n--slack-message\n    Notifies and links on Slack about the report made.\n```\n\n## Security\n\nPlease check SECURITY.md. If you found or if you think you found a vulnerability please get in touch via admin AT vinta.com.br\n\nPlease avoid disclosing any security issue on GitHub or any other public website. We'll work to swiftly address any possible vulnerability and give credit to reporters (if wanted).\n\n## Commercial Support\n\nThis project is maintained by Vinta Software and other contributors. We are always looking for exciting work, so if you need any commercial support, feel free to get in touch: contact@vinta.com.br","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvintasoftware%2Fdjango-psi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvintasoftware%2Fdjango-psi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvintasoftware%2Fdjango-psi/lists"}