Skip to main content

This package provides a command-line and Python interface for netflix's fast.com for speedtest

Project description

python-fast-cli

Test your download and upload speed using netflix's fast.com.

This package provides a command-line and Python interface for Fast.com, offering a comprehensive alternative to other similar tools. Unlike others, it allows you to modify all settings directly from the interface as you would on the Fast.com website. Additionally, it outputs results as a time series, enabling more detailed analysis of bandwidth performance.

implementation

this is pure python package based on python version of playwright

The playwright need to install browsers at the first time it is been used.

installation

pip install -U fastcom-speed-cli

from source

  • clone the repo
  • cd into the repo dir
  • pip install .

Usage

command line

  • if it is installed via pip, then there is entry point at ~/.local/bin/fast-cli
  • if used from the source repo, one can invoke it via python3 -m fast_speedtest.cli
usage: fast-cli [-h] [--min-duration MIN_DURATION] [--max-duration MAX_DURATION] [--measure-upload-latency MEASURE_UPLOAD_LATENCY]
              [--min-connections MIN_CONNECTIONS] [--max-connections MAX_CONNECTIONS] [--should-persist SHOULD_PERSIST]
              [--show-advanced SHOW_ADVANCED] [--no-install-browser] [--no-upload] [--interval CHECK_INTERVAL] [--json]

options:
  -h, --help            show this help message and exit
  --min-duration MIN_DURATION
                        [default: 5]
  --max-duration MAX_DURATION
                        [default: 30]
  --measure-upload-latency MEASURE_UPLOAD_LATENCY
                        [default: False]
  --min-connections MIN_CONNECTIONS
                        [default: 1]
  --max-connections MAX_CONNECTIONS
                        [default: 8]
  --should-persist SHOULD_PERSIST
                        [default: True]
  --show-advanced SHOW_ADVANCED
                        [default: True]
  --no-install-browser  do not automatically install ['chromium']
  --no-upload           do not wait for upload test
  --interval CHECK_INTERVAL
                        data collection interval [default: 1.0]

By default, when this command is run for the first time, it will attempt to install the browser to ~/.cache/ms-playwright using the playwright command. If you are certain that the browser is already installed via Playwright, you can suppress this behavior by using the --no-install-browser flag. To control the browser binary location read this for detail.

If you get warning about Host system is missing dependencies to run browsers., normally it won't cause any real problem, since the fast.com only use limited features. But if it really cause problem make sure you have installed all the system dependencies.

use as lib

import fast_speedtest.api
...

example

python3 -m fast_speedtest.cli --min-duration 2 --max-duration 3 --max-connections 1 --no-upload --interval 1 --json

[
 {
  "downloadSpeed": 0,
  "uploadSpeed": 0,
  "downloadUnit": "",
  "downloaded": 0,
  "uploadUnit": "Mbps",
  "uploaded": 0,
  "latency": 0,
  "bufferBloat": 0,
  "userLocation": "",
  "userIp": "",
  "serverLocation": [
   ""
  ],
  "isDone": false
 },
 {
  "downloadSpeed": 1.5,
  "uploadSpeed": 0,
  "downloadUnit": "Mbps",
  "downloaded": 0.12,
  "uploadUnit": "Mbps",
  "uploaded": 0,
  "latency": 0,
  "bufferBloat": 89,
  "userLocation": "Chicago, US",
  "userIp": "172.183.91.174",
  "serverLocation": [
   "Barranquilla, CO",
   "Cartagena de Indias, CO",
   "Bogot\u00e1, CO"
  ],
  "isDone": false
 },
 {
  "downloadSpeed": 170,
  "uploadSpeed": 0,
  "downloadUnit": "Mbps",
  "downloaded": 20,
  "uploadUnit": "Mbps",
  "uploaded": 0,
  "latency": 0,
  "bufferBloat": 89,
  "userLocation": "Chicago, US",
  "userIp": "172.183.91.174",
  "serverLocation": [
   "Barranquilla, CO",
   "Cartagena de Indias, CO",
   "Bogot\u00e1, CO"
  ],
  "isDone": false
 },
 {
  "downloadSpeed": 280,
  "uploadSpeed": 0,
  "downloadUnit": "Mbps",
  "downloaded": 50,
  "uploadUnit": "Mbps",
  "uploaded": 0,
  "latency": 0,
  "bufferBloat": 89,
  "userLocation": "Chicago, US",
  "userIp": "172.183.91.174",
  "serverLocation": [
   "Barranquilla, CO",
   "Cartagena de Indias, CO",
   "Bogot\u00e1, CO"
  ],
  "isDone": false
 },
 {
  "downloadSpeed": 280,
  "uploadSpeed": 0,
  "downloadUnit": "Mbps",
  "downloaded": 60,
  "uploadUnit": "Mbps",
  "uploaded": 0,
  "latency": 85,
  "bufferBloat": 89,
  "userLocation": "Chicago, US",
  "userIp": "172.183.91.174",
  "serverLocation": [
   "Barranquilla, CO",
   "Cartagena de Indias, CO",
   "Bogot\u00e1, CO"
  ],
  "isDone": false
 },
 {
  "downloadSpeed": 280,
  "uploadSpeed": 38,
  "downloadUnit": "Mbps",
  "downloaded": 60,
  "uploadUnit": "Kbps",
  "uploaded": 0,
  "latency": 85,
  "bufferBloat": 89,
  "userLocation": "Chicago, US",
  "userIp": "172.183.91.174",
  "serverLocation": [
   "Barranquilla, CO",
   "Cartagena de Indias, CO",
   "Bogot\u00e1, CO"
  ],
  "isDone": false
 }
]

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

fastcom_speed_cli-0.1.6a1.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

fastcom_speed_cli-0.1.6a1-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file fastcom_speed_cli-0.1.6a1.tar.gz.

File metadata

  • Download URL: fastcom_speed_cli-0.1.6a1.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for fastcom_speed_cli-0.1.6a1.tar.gz
Algorithm Hash digest
SHA256 12a24cf4cbebc35f15f8f35f8f15f55b1e76f268a0df1ea3a71f5006d78da35e
MD5 b581ac0ea73c1c05a601a2a15359da37
BLAKE2b-256 ed501f20a9d3b24acae2300a7bf04afc92df0b2c631c057957921a480c12f4e0

See more details on using hashes here.

Provenance

File details

Details for the file fastcom_speed_cli-0.1.6a1-py3-none-any.whl.

File metadata

File hashes

Hashes for fastcom_speed_cli-0.1.6a1-py3-none-any.whl
Algorithm Hash digest
SHA256 61e5d94d0505638a4120ae22bb3f56aa10659dd1eaf48ae0a29ef430e5cfcba8
MD5 e8df6176069b3c16a26e6c56056aef11
BLAKE2b-256 16e2b4f2a4c33ae0dab6f56fdd899149ff3310d958d5d8e15b2ae58c1a870efd

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page