Coder Social home page Coder Social logo

devesh-code / weather-speaks Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 5 KB

Python script to get current weather conditions for a city. User enters city name, selects weather condition (temperature, humidity, wind, or clouds), and script uses API data to respond.

License: MIT License

Python 100.00%

weather-speaks's Introduction

Weather-Speaks

Weather Information

This is a simple Python script that allows you to retrieve and hear weather information for a specific city using the WeatherAPI. The script prompts you to enter a city, and then you can choose to get information about temperature, humidity, wind speed, or cloud cover for that city.

Prerequisites

Before you can run this script, you need to have the following installed on your system:

  • Python 3.x
  • The requests library for making HTTP requests. You can install it using pip:
    pip install requests
  • The win32com.client library for text-to-speech functionality. This library is available on Windows systems by default.

How to Use

  1. Clone or download this repository to your local machine.

  2. Open a terminal or command prompt.

  3. Navigate to the directory where you have saved the script.

  4. Run the script using the following command:

    main.py
  5. Follow the prompts:

    • Enter the city for which you want to check the weather.
    • Choose the desired weather information by entering a number from 1 to 4:
      1. Temperature
      2. Humidity
      3. Wind Speed
      4. Cloud Cover
  6. The script will then make a request to the WeatherAPI and provide you with the requested weather information through text-to-speech.

  7. The weather information will be spoken aloud to you using your system's text-to-speech capabilities.

Example

Here's an example of how to use the script:

Enter city: New York
What do you want to know about today's weather?
1. Temperature
2. Humidity
3. Wind
4. Clouds

Enter your choice: 1
The current temperature in New York is 20 degrees!

Notes

  • Make sure you have an active internet connection, as the script relies on making an API request to retrieve weather data.

  • The WeatherAPI key used in this script is a placeholder. You should replace it with your own API key from WeatherAPI for long-term usage.

  • You can customize the text-to-speech output or add more features to this script according to your preferences.

weather-speaks's People

Contributors

devesh-code avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.