API to gather the current pollen load from MeteoSchweiz
Project description
Swiss-Pollen
Python API to gather the current pollen load from MeteoSchweiz for the following plants:
- birch
- beech
- oak
- alder
- ash
- grasses
- hazel
For the use within Home Assistant use the custom component hass-swiss-pollen.
This module is not officially developed, supported or endorsed by MeteoSchweiz.
Installation
Using pip
- Install python3.10 or higher
- Install swiss-pollen with
pip install swiss-pollen. - Run swiss-pollen test with
swiss-pollen.
Usage
API
class PollenService:
@staticmethod
def load(plants : list[Plant] = Plant) -> PollenResult
Example
from swiss_pollen import (PollenService, Plant)
# get pollen data for all available plants (requires 7 remote calls, one for each plant)
all_pollen_data_per_station = PollenService.load()
# get pollen data for a restricted list of plants (requires 2 remote calls, one for each plant)
specific_pollen_data_per_station = PollenService.load(plants = [Plant.HAZEL, Plant.GRASSES])
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
swiss_pollen-2.0.0.tar.gz
(10.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file swiss_pollen-2.0.0.tar.gz.
File metadata
- Download URL: swiss_pollen-2.0.0.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b05004ea6f53245074d7d997d340b067c55f8eed78b36b3f22e1a1fbb20996f5
|
|
| MD5 |
ef01b45e77094f09dacee43265fa547e
|
|
| BLAKE2b-256 |
66a0f5fb0f6e311f7cc0f7f7204615c657060ed46f5669c5c8f08d61bd565ac9
|
File details
Details for the file swiss_pollen-2.0.0-py3-none-any.whl.
File metadata
- Download URL: swiss_pollen-2.0.0-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb277a059bacd7f851758eac25058dfefd9f89b503925d4f5778d7fc32e0b977
|
|
| MD5 |
f68f33ec6d2a620a21ae7c68a18fb0b2
|
|
| BLAKE2b-256 |
0757ed2757047a317ff6c2b92da2d53dd53fcf2f9ee5573268fe3b639f1b3860
|