How to check the weather forecast with the command line based on Python
This article introduces you how to use the command line based on Python to check the weather forecast, the content is very detailed, interested friends can refer to, I hope it can be helpful to you.
It is that wttr.in,wttr.in automatically detects your geographic location by default. If the test fails, it allows you to specify the geographic location in a variety of ways. It can be specified by city name, 3-digit airport code, or zip code. It can also pull weather information for a domain name or IP status. Wttr.in can provide the weather forecast for the last 3 days, and the bottom layer uses the weather data provided by forecast.io. It can be regarded as an X artifact.
Install wttr.in
The only condition for using wttr.in can be used as long as you install the curl command on your system
Sudo apt-get install curl # ubuntu system yum install curl # centos system brew install curl # mac system
Get local weather information
Curl wttr.in
By default, the current city is located according to the public network IP of the current system.
Query the weather by city name
Curl wttr.in/beijing
Inquire through the international code of the airport
Curl wttr.in/lax
You can also check the moon phase.
Curl wttr.in/moon on how to use the Python-based command line to check the weather forecast to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.