Skip to main content

Python library to get weather from Google Search. No API keys required.

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

pygoogleweather

pygoogleweather is a Python library to get weather information from Google Search. No API keys required.

Features

  • Fetch current weather information for any city.
  • Supports multiple languages.
  • Convert temperature units between Celsius, Fahrenheit, and Kelvin.
  • Get wind speed in km/h or mph.

Installation

You can install the library using pip:

pip install pygoogleweather

Usage

from google_weather.weather import get_current_weather

result = get_current_weather('Buenos Aires')
print(result)
# {'temperature': '24.0°C', 'humidity': '72%', 'wind': '34 kmh', 'condition': 'Mayormente soleado', 'location': 'Buenos Aires, Cdad. Autónoma de Buenos Aires'}

You can also specify the language, temperature unit, and wind unit:

print(get_current_weather('Buenos Aires', lang='it', temp_unit='F', wind_unit='mph'))
# {'temperature': '75.2°F', 'humidity': '72%', 'wind': '21 mph', 'condition': 'Per lo più soleggiato', 'location': 'Buenos Aires, Città Autonoma di Buenos Aires'}

print(get_current_weather('New York', lang='en'))
# {'temperature': '37.4°F', 'humidity': '40%', 'wind': '11 mph', 'condition': 'Mostly Cloudy', 'location': 'New York, NY'}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygoogleweather-0.1.3.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pygoogleweather-0.1.3-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file pygoogleweather-0.1.3.tar.gz.

File metadata

  • Download URL: pygoogleweather-0.1.3.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for pygoogleweather-0.1.3.tar.gz
Algorithm Hash digest
SHA256 faf82852f5e9061b02035d7e4303301e6c6e76cf11e0ae2af39ea1c810bfa431
MD5 42f8f99326e1e2ea9f0526f2fa1082a1
BLAKE2b-256 efae58a01ebb8618fe22a411a6af676e8612b31754e3387e21b5c4dea3767377

See more details on using hashes here.

File details

Details for the file pygoogleweather-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for pygoogleweather-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e102fb26d71981916f1f677febb27830a232a8c033bdb18d0cf6a864c7536efd
MD5 5af726d8354fa145a8eb6799fe8c2c08
BLAKE2b-256 370b078f7adeed8234498214a5c260c8ba51e541965c4d9836c3dd1381ff064c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page