PyOWM¶
Welcome to PyOWM’s documentation!
What is PyOWM?¶
PyOWM is a client Python wrapper library for OpenWeatherMap web APIs. It allows quick and easy consumption of OWM data from Python applications via a simple object model and in a human-friendly fashion.
What APIs can I access with PyOWM?¶
With PyOWM you can interact programmatically with the following OpenWeatherMap web APIs:
- Weather API v2.5, offering
- current weather data
- weather forecasts
- weather history
- Agro API v1.0, offering polygon editing, soil data, satellite imagery search and download
- Air Pollution API v3.0, offering data about CO, O3, NO2 and SO2
- UV Index API v3.0, offering data about Ultraviolet exposition
- Stations API v3.0, allowing to create and manage meteostation and publish local weather measurements
- Weather Alerts API v3.0, allowing to set triggers on weather conditions and areas and poll for spawned alerts
And You can also get image tiles for several map layers provided by OWM
The documentation of OWM APIs can be found on the OWM Website
Supported environments and Python versions¶
PyOWM runs on Windows, Linux and MacOS.
PyOWM runs on:
- Python 2.7
- Python 3.4+
Please notice that support for Python 2.x will eventually be dropped - check details
PyOWM also integrates with Django 1.10+ models, but that integration might have issues (contributions are welcome)
Installation¶
Get the lastest development version¶
You can install the development trunk with _pip_:
$ pip install git+https://github.com/csparpa/pyowm.git@develop
but be aware that it might not be stable!
setuptools¶
You can install from source using _setuptools_: either download a release from GitHub or just take the latest main branch), then:
$ unzip <zip archive> # or tar -xzf <tar.gz archive>
$ cd pyowm-x.y.z
$ python setup.py install
The .egg will be installed into the system-dependent Python libraries folder
Distribution packages¶
On Windows you have installers
On ArchLinux you can install PyOWM with the Yaourt package manager, run:
Yaourt -S python2-owm # Python 2.7 (https://aur.archlinux.org/packages/python-owm) Yaourt -S python-owm # Python 3.x (https://aur.archlinux.org/packages/python2-owm)
PyOWM v2 usage documentation¶
Here are some usage examples for the different OWM APIs: these examples and guides refer to PyOWM library versions belonging to the 2.x stream
Weather API examples¶
Agro API examples¶
UV API examples¶
Air Pollution API examples¶
Stations API examples¶
Alerts API examples¶
Map tiles client examples¶
PyOWM v3 usage documentation¶
Coming soon!
How to contribute¶
There are multiple ways to contribute to the PyOWM project! Find the one that suits you best