fastdotcom 0.0.4__tar.gz → 0.0.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastdotcom
3
- Version: 0.0.4
3
+ Version: 0.0.5
4
4
  Summary: Python API for testing internet speed on Fast.com
5
5
  Home-page: https://github.com/nkgilley/fast.com
6
6
  Author: Nolan Gilley
@@ -32,13 +32,14 @@ print(result)
32
32
 
33
33
  When you run the example above, you might see output similar to:
34
34
  ```bash
35
- {'download_speed': 120.68, 'upload_speed': 25.93, 'unloaded_ping': 19.35, 'loaded_ping': 48.64}
35
+ {'download_speed': 120.68, 'upload_speed': 25.93, 'unloaded_ping': 19.35, 'loaded_ping': 48.64, 'success': 1}
36
36
  ```
37
37
 
38
38
  - **Download Speed:** Measured download speed in Mbps (displayed with two decimal places).
39
39
  - **Upload Speed:** Measured upload speed in Mbps (displayed with two decimal places).
40
40
  - **Unloaded Ping:** Average ping (latency) when the network is idle.
41
41
  - **Loaded Ping:** Average ping (latency) during a download test.
42
+ - **Success:** An indication if the speed test was performed successfully (zero if no internet connection was available).
42
43
 
43
44
  ## Requirements
44
45
  - Python 3.8 or newer
@@ -681,13 +681,13 @@ def fast_com(
681
681
  ):
682
682
  token = get_fast_token(verbose=verbose)
683
683
  if not token:
684
- return (
685
- "Failed to get token. All test values will be 0.\n"
686
- "Download Speed: 0.00 Mbps\n"
687
- "Upload Speed: 0.00 Mbps\n"
688
- "Unloaded Ping: 0 ms\n"
689
- "Loaded Ping: 0 ms"
690
- )
684
+ return {
685
+ "download_speed": 0,
686
+ "upload_speed": 0,
687
+ "unloaded_ping": 0,
688
+ "loaded_ping": 0,
689
+ "success": 0,
690
+ }
691
691
 
692
692
  avg_ping_unloaded, ping_unloaded_vals = fast_com_ping_unloaded(
693
693
  token=token, verbose=verbose, count=ping_count
@@ -704,6 +704,7 @@ def fast_com(
704
704
  "upload_speed": upload_speed_dynamic,
705
705
  "unloaded_ping": avg_ping_unloaded,
706
706
  "loaded_ping": avg_ping_loaded,
707
+ "success": 1,
707
708
  }
708
709
  return result
709
710
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastdotcom
3
- Version: 0.0.4
3
+ Version: 0.0.5
4
4
  Summary: Python API for testing internet speed on Fast.com
5
5
  Home-page: https://github.com/nkgilley/fast.com
6
6
  Author: Nolan Gilley
@@ -33,7 +33,7 @@ SOFTWARE.
33
33
  """
34
34
 
35
35
  setup(name='fastdotcom',
36
- version='0.0.4',
36
+ version='0.0.5',
37
37
  description='Python API for testing internet speed on Fast.com',
38
38
  url='https://github.com/nkgilley/fast.com',
39
39
  author='Nolan Gilley',
File without changes
File without changes