Skip to content

Commit 8c3c793

Browse files
committed
added: Readme
1 parent eb60c75 commit 8c3c793

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Lighthouse runner for python
2+
3+
## Description
4+
This library is a simple wrapper around lighthouse-cli runner that runs the audit and parses a result in friendly manner.
5+
6+
## Installation
7+
```bash
8+
pip install git+https://github.com/adamcupial/lighthouse-python.git#egg=lighthouse
9+
```
10+
11+
## Usage
12+
13+
```python
14+
from lighthouse import LighthouseRunner
15+
16+
report = LighthouseRunner('https://webdesign-log.pl', form_factor='desktop', quiet=False).report
17+
assert report.score['performance'] > 0.5
18+
print(report.audits['performance'].failed)
19+
```
20+
21+
report has 3 properties:
22+
23+
- score: returns dict where keys are categories and values are scores (0 to 1)
24+
- timings: returns dict where keys are timings and values are timedelta objects
25+
- audits: dict where keys are categories and values are objects with passed and failed lists attached
26+
27+
## Dependencies
28+
- python 2.7+
29+
- lighthouse installed

0 commit comments

Comments
 (0)