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 pants:
- birch
- beech
- oak
- alder
- ash
- grasses
- hazel
For the use within Home Assistant use the custom component hass-swiss-pollen.
This module is not official developed, supported or endorsed by MeteoSchweiz.
Installation
Using pip
- Install python3.9 or higher
- Install swiss-pollen with
pip install swiss-pollen. - Run swiss-pollen test with
swiss-pollen.
Usage
API
class PollenService:
@staticmethod
def current_values(plants : list[Plant] = Plant) -> dict[Station, list[PollenMeasurement]]
Example
from swiss_pollen import (PollenService, Plant)
# get pollen data for all available plants
all_pollen_data_per_station = PollenService.current_values()
# get pollen data for a restricted list of plants
specific_pollen_data_per_station = PollenService.current_values(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-1.0.1.tar.gz
(8.0 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-1.0.1.tar.gz.
File metadata
- Download URL: swiss-pollen-1.0.1.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f23d05bb4b36717d565a9398654bd66da2df0fc3e8a0a1e5cd28e11c2aa8c1f
|
|
| MD5 |
1a92af7899a36b351eeb2d256998a11d
|
|
| BLAKE2b-256 |
ba4f7cbc8f8002f8cba9102fc2c48749acab6b6f61c52d97d31336305be7726a
|
File details
Details for the file swiss_pollen-1.0.1-py3-none-any.whl.
File metadata
- Download URL: swiss_pollen-1.0.1-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd2e36f97936589c2bf95da04f8f81d6598b6eb3c4bf812dc1f9feaab3501e19
|
|
| MD5 |
ac53fbdb2acd8b40071d1933fc52571e
|
|
| BLAKE2b-256 |
3ad1dd5510b0d32269dffe9e6dd672c95853ee14b281e99e67b83ad4078db70d
|