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.0.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.0.tar.gz.
File metadata
- Download URL: swiss-pollen-1.0.0.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 |
8faf7e6011c53437fb16b84bd1b277793e025d9a2b99ba1adf3f9a4cd48464a7
|
|
| MD5 |
c51dd93819e00b8e257c7f35ddc423ca
|
|
| BLAKE2b-256 |
a12274ee08a9e64682dd2929a7911b3df17958e193a77de0b354a5e36b0f3d13
|
File details
Details for the file swiss_pollen-1.0.0-py3-none-any.whl.
File metadata
- Download URL: swiss_pollen-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.7 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 |
340fcebcc765d1a2aa69c660e9abf0a982e25e9fc837070a9f3b332fa6992577
|
|
| MD5 |
dbce636d0d453621ab90495855a0c676
|
|
| BLAKE2b-256 |
d3eb9b48f653bd7745728527f4c78f7cac18d1bacd43ccf95f7946413af65520
|