Skip to main content

Weather broker for Python

Project description


Weather broker for Python

License: Apache License 2.0

Warning: Refer to weather provider license about caching, storing and redistributing weather information.

Provides current weather information as an unified dict:

  • time: monitoring time, unix timestamp
  • lat: latitude
  • lon: longitude
  • clouds (%)
  • temp: temperature
  • hum: humidity (%)
  • pres: pressure
  • wind_spd: wind speed
  • wind_deg: wind degree
  • vis: visibility
  • dewp: dew point
  • uv: UV index
  • icon: icon code (provider specific)
  • description: human readable weather description
  • precip_type: precip type
  • precip_prob: precip probability (%)
  • precip_int: precip intensity
  • sunrise: HH:mm
  • sunset: HH:mm

Weather forecast is not implemented (yet).

Note: some providers may not provide certain data fields, in this case they are set to None.

The module contains providers for:

Usage example:

from weatherbroker import WeatherEngine

w = WeatherEngine()
w.key = 'my secret api key'
w.set_location(lat=50.08804, lon=14.42076)

# the code below sets the same location, but DarkSky supports only coordinates,
# so we use them instead

# w.set_location(city_id=3067696)
# w.set_location(city='Prague', country='CZ')

# w.lang = 'cs'


(c) 2018 Altertech Group,

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

weatherbroker-0.0.2.tar.gz (4.6 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page