https://github.com/4trodev/python-wifi-speed-test
https://github.com/4trodev/python-wifi-speed-test
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/4trodev/python-wifi-speed-test
- Owner: 4troDev
- License: mit
- Created: 2021-11-27T23:12:28.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-11-27T23:14:48.000Z (over 4 years ago)
- Last Synced: 2025-06-14T04:05:27.126Z (12 months ago)
- Language: Python
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/tterb/atomic-design-ui/blob/master/LICENSEs)
# Test Internet Connection Speed Using Python
## Running Script
To run Script, run the following command
```bash
Python Main.py
```
### Installation
install the required library into our computer. Just run this code in your terminal or command line.
```
pip install speedtest-cli
```
## Script
```
import speedtest
speed = speedtest.Speedtest()
```
```
def main():
while True:
print('\a')
choice=int(input("""Check Your Connection Speed
1) Download Speed
2) Upload Speed
3) Exit
Choice (1/2/3): """))
print('\a')
...
if __name__ == '__main__':
main()
```
```
if choice==1:
print('Counting...')
print(f"Download speed: {'{:.2f}'.format(speed.download()/1024/1024)} Mb/s")
elif choice==2:
print('Counting...')
print(f"Upload speed: {'{:.2f}'.format(speed.upload()/1024/1024)} Mb/s")
elif choice==3:
print('Exiting the program')
quit()
else:
print("Please choose the correct options")
```