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.2.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.2.tar.gz.
File metadata
- Download URL: swiss-pollen-1.0.2.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81bfcf669a6a9c0d2bab30b7b7a0e792a287bf399f7a82fe8a899ef5f63f0a77
|
|
| MD5 |
4425161bbe37551491a1f8f71b9c8bb1
|
|
| BLAKE2b-256 |
47d54009afbf922052404c492f6434669b5d297e8543742fbf1e2e0fe616888e
|
File details
Details for the file swiss_pollen-1.0.2-py3-none-any.whl.
File metadata
- Download URL: swiss_pollen-1.0.2-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.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
376545f7c6bc252e43136a143240c4a3a02264c556e46c10dde8e255c09d5653
|
|
| MD5 |
df126000214e9ad7d3ec5735311da553
|
|
| BLAKE2b-256 |
d72b1c43b65742e037cadfa7c39d774eff4c0aed546589ec952ee97a249bcb8e
|