README.rst 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. speedtest-cli
  2. =============
  3. Command line interface for testing internet bandwidth using
  4. speedtest.net
  5. .. image:: https://img.shields.io/pypi/v/speedtest-cli.svg
  6. :target: https://pypi.python.org/pypi/speedtest-cli/
  7. :alt: Latest Version
  8. .. image:: https://img.shields.io/travis/sivel/speedtest-cli.svg
  9. :target: https://pypi.python.org/pypi/speedtest-cli/
  10. :alt: Travis
  11. .. image:: https://img.shields.io/pypi/l/speedtest-cli.svg
  12. :target: https://pypi.python.org/pypi/speedtest-cli/
  13. :alt: License
  14. Versions
  15. --------
  16. speedtest-cli works with Python 2.4-3.7
  17. .. image:: https://img.shields.io/pypi/pyversions/speedtest-cli.svg
  18. :target: https://pypi.python.org/pypi/speedtest-cli/
  19. :alt: Versions
  20. Installation
  21. ------------
  22. pip / easy\_install
  23. ~~~~~~~~~~~~~~~~~~~
  24. ::
  25. pip install speedtest-cli
  26. or
  27. ::
  28. easy_install speedtest-cli
  29. Github
  30. ~~~~~~
  31. ::
  32. pip install git+https://github.com/sivel/speedtest-cli.git
  33. or
  34. ::
  35. git clone https://github.com/sivel/speedtest-cli.git
  36. cd speedtest-cli
  37. python setup.py install
  38. Just download (Like the way it used to be)
  39. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  40. ::
  41. wget -O speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py
  42. chmod +x speedtest-cli
  43. or
  44. ::
  45. curl -Lo speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py
  46. chmod +x speedtest-cli
  47. Usage
  48. -----
  49. ::
  50. $ speedtest-cli -h
  51. usage: speedtest-cli [-h] [--no-download] [--no-upload] [--single] [--bytes]
  52. [--share] [--simple] [--csv]
  53. [--csv-delimiter CSV_DELIMITER] [--csv-header] [--json]
  54. [--list] [--server SERVER] [--exclude EXCLUDE]
  55. [--mini MINI] [--source SOURCE] [--timeout TIMEOUT]
  56. [--secure] [--no-pre-allocate] [--version]
  57. Command line interface for testing internet bandwidth using speedtest.net.
  58. --------------------------------------------------------------------------
  59. https://github.com/sivel/speedtest-cli
  60. optional arguments:
  61. -h, --help show this help message and exit
  62. --no-download Do not perform download test
  63. --no-upload Do not perform upload test
  64. --single Only use a single connection instead of multiple. This
  65. simulates a typical file transfer.
  66. --bytes Display values in bytes instead of bits. Does not
  67. affect the image generated by --share, nor output from
  68. --json or --csv
  69. --share Generate and provide a URL to the speedtest.net share
  70. results image, not displayed with --csv
  71. --simple Suppress verbose output, only show basic information
  72. --csv Suppress verbose output, only show basic information
  73. in CSV format. Speeds listed in bit/s and not affected
  74. by --bytes
  75. --csv-delimiter CSV_DELIMITER
  76. Single character delimiter to use in CSV output.
  77. Default ","
  78. --csv-header Print CSV headers
  79. --json Suppress verbose output, only show basic information
  80. in JSON format. Speeds listed in bit/s and not
  81. affected by --bytes
  82. --list Display a list of speedtest.net servers sorted by
  83. distance
  84. --server SERVER Specify a server ID to test against. Can be supplied
  85. multiple times
  86. --exclude EXCLUDE Exclude a server from selection. Can be supplied
  87. multiple times
  88. --mini MINI URL of the Speedtest Mini server
  89. --source SOURCE Source IP address to bind to
  90. --timeout TIMEOUT HTTP timeout in seconds. Default 10
  91. --secure Use HTTPS instead of HTTP when communicating with
  92. speedtest.net operated servers
  93. --no-pre-allocate Do not pre allocate upload data. Pre allocation is
  94. enabled by default to improve upload performance. To
  95. support systems with insufficient memory, use this
  96. option to avoid a MemoryError
  97. --version Show the version number and exit
  98. Python API
  99. ----------
  100. See the `wiki <https://github.com/sivel/speedtest-cli/wiki>`_.
  101. Inconsistency
  102. -------------
  103. It is not a goal of this application to be a reliable latency reporting tool.
  104. Latency reported by this tool should not be relied on as a value indicative of ICMP
  105. style latency. It is a relative value used for determining the lowest latency server
  106. for performing the actual speed test against.
  107. There is the potential for this tool to report results inconsistent with Speedtest.net.
  108. There are several concepts to be aware of that factor into the potential inconsistency:
  109. 1. Speedtest.net has migrated to using pure socket tests instead of HTTP based tests
  110. 2. This application is written in Python
  111. 3. Different versions of Python will execute certain parts of the code faster than others
  112. 4. CPU and Memory capacity and speed will play a large part in inconsistency between
  113. Speedtest.net and even other machines on the same network
  114. Issues relating to inconsistencies will be closed as wontfix and without
  115. additional reason or context.