Skip to main content

weatherbroker

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.set_provider('darksky')
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'

print(w.get_current())

(c) 2018 Altertech Group, https://www.altertech.com/

Metadata

Release files for weatherbroker 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for weatherbroker 0.0.2
File Size Uploaded Provenance Actions
weatherbroker-0.0.2.tar.gz 4.6 kB Without provenance Details for weatherbroker-0.0.2.tar.gz

Release files / weatherbroker-0.0.2.tar.gz

Download URL weatherbroker-0.0.2.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
704bc6b2f48fd8f1374a1cbf110ef21b501dbd29d299590f5dfbb57f0fd50015
BLAKE2b-256 checksum
How to use checksums
fcda20b5b9f9a4d39c2c3ef0cd9c9f89c1e7382a81c8808af436af64c7edcdf9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5

Security for weatherbroker 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page