|
1 | | -# cf_speedtest |
| 1 | +# cf-speedtest |
2 | 2 |
|
3 | | -## A simple internet speed test tool/library, which uses https://speed.cloudflare.com (provided by Cloudflare) |
| 3 | +A simple internet speed test CLI tool using [speed.cloudflare.com](https://speed.cloudflare.com) |
4 | 4 |
|
5 | 5 | [](https://pypi.python.org/pypi/cf-speedtest) |
6 | 6 | [](https://pypi.python.org/pypi/cf-speedtest) |
7 | | -[](https://pypi.python.org/pypi/cf-speedtest) |
| 7 | +[](https://github.com/12932/cf-speedtest/actions/workflows/main.yml) |
8 | 8 | [](https://pypi.python.org/pypi/cf-speedtest) |
9 | 9 |
|
10 | | -## Installation: |
| 10 | +## Installation |
| 11 | + |
11 | 12 | ```bash |
12 | | -$ pip install -U cf-speedtest |
| 13 | +# Recommended |
| 14 | +uv tool install cf-speedtest |
| 15 | + |
| 16 | +# Or with pip |
| 17 | +pip install -U cf-speedtest |
13 | 18 | ``` |
14 | 19 |
|
15 | | -## Basic CLI usage: |
| 20 | +## Usage |
16 | 21 |
|
17 | | -- ### Running a normal speedtest: |
18 | | - - `cf_speedtest` |
| 22 | +```bash |
| 23 | +# Run a speedtest |
| 24 | +cf-speedtest |
19 | 25 |
|
20 | | -- ### Without verifying SSL: |
21 | | - - `cf_speedtest --verifyssl=false` |
| 26 | +# Without SSL verification |
| 27 | +cf-speedtest --verifyssl=false |
22 | 28 |
|
23 | | -- ### Specify a [percentile](https://en.wikipedia.org/wiki/Percentile) of measurements to be considered your speed (default 90): |
24 | | - - `cf_speedtest --percentile 80` |
| 29 | +# Custom percentile (default 90) |
| 30 | +cf-speedtest --percentile 80 |
25 | 31 |
|
26 | | -- ### Output measurements to a CSV file: |
27 | | - - `cf_speedtest --output speed_data.csv` |
| 32 | +# Output to CSV |
| 33 | +cf-speedtest --output speed_data.csv |
| 34 | + |
| 35 | +# With proxy |
| 36 | +cf-speedtest --proxy socks5://127.0.0.1:1080 |
| 37 | +cf-speedtest --proxy http://127.0.0.1:8181 |
| 38 | +``` |
28 | 39 |
|
29 | | -- ### Specify a SOCKS/HTTP proxy to use (with or without authentication): |
30 | | - - `cf_speedtest --proxy socks5://127.0.0.1:1080` |
31 | | - - `cf_speedtest --proxy socks5://admin:admin@127.0.0.1:1080` |
32 | | - - `cf_speedtest --proxy http://127.0.0.1:8181` |
33 | | - - `cf_speedtest --proxy http://admin:admin@127.0.0.1:8181` |
34 | | - - `cf_speedtest --proxy 127.0.0.1:8181` |
| 40 | +## Requirements |
35 | 41 |
|
36 | | -## Programmatic usage: |
37 | | - - TODO |
| 42 | +- Python 3.10+ |
38 | 43 |
|
39 | | -#### TODO: |
40 | | - - Programmatic usage |
41 | | - - Multi-threaded speedtest |
42 | | - - Continuous mode |
| 44 | +## Disclaimers |
43 | 45 |
|
44 | | -#### Disclaimers: |
45 | | - - This library is purely single-threaded |
46 | | - - This library works entirely over HTTP(S), which has some overhead |
47 | | - - Latency is measured with HTTP requests |
48 | | - - Cloudflare has a global network, but you may be connected to a distant PoP due to ISP peering and other factors |
| 46 | +- Single-threaded |
| 47 | +- Works over HTTP(S), which has some overhead |
| 48 | +- Latency measured via HTTP requests |
| 49 | +- Cloudflare has a global network, but you may connect to a distant PoP due to ISP peering |
0 commit comments