Skip to content
This repository was archived by the owner on Dec 26, 2025. It is now read-only.
This repository was archived by the owner on Dec 26, 2025. It is now read-only.

Discrepancy with Fast.com when Run in Python Script #11

@NelsonScott

Description

@NelsonScott
  • Mac OS Sonoma 14.4.1 (23E224):
  • python 3.12.6:
  • fastcli version == 0.2.0:

My Issue

I'm trying to do something a bit different, I'm running fastcli in a python script. From looking at the code, it seems like I needed to call run directly.

import speedtest
import logging
from fastcli import fastcli

print("\nRunning Ookla Speed Test")
st = speedtest.Speedtest()

# Get the best server
st.get_best_server()

# Run download and upload speed tests
download_speed = st.download() / 1_000_000  # Convert to Mbps
upload_speed = st.upload() / 1_000_000      # Convert to Mbps

# Get ping
ping = st.results.ping

# Print results
print(f"Download Speed: {download_speed:.2f} Mbps")
print(f"Upload Speed: {upload_speed:.2f} Mbps")
print(f"Ping: {ping:.2f} ms")

print("\nRunning Fast Test")
download_speed = fastcli.run(verbosity=logging.DEBUG)
print(f"Download speed from Fast.com {download_speed}")

However, I get a pretty significant discrepancy between both Ookla speed tests and

Running Ookla Speed Test
Download Speed: 257.77 Mbps
Upload Speed: 321.67 Mbps
Ping: 10.66 ms

Running Fast Test
Download speed from Fast.com 120.1284657049353

Ran it a few times, Fast.com also closer to around 250-300


Running Ookla Speed Test
Download Speed: 224.16 Mbps
Upload Speed: 360.97 Mbps
Ping: 9.41 ms

Running Fast Test
Download speed from Fast.com 157.61815666637835

Update: im seeing here #5 that a similar issue was reported - but was this resolved?

WHYT


Please make sure you've taken these steps before submitting a new issue:

  • Include the Python and fastcli version in your issue
  • Ensure you're running a supported version of Python
  • Run fastcli in debug mode if applicable and include
    relevant output
  • Search the existing (including closed) issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions