Skip to main content

API to gather the current pollen load from MeteoSchweiz

Project description

Swiss-Pollen

PyPI PyPI - Python Version

Project Maintenance License

Build Status Deploy Status

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

  1. Install python3.10 or higher
  2. Install swiss-pollen with pip install swiss-pollen.
  3. 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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

swiss_pollen-2.0.0-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

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

Hashes for swiss_pollen-2.0.0.tar.gz
Algorithm Hash digest
SHA256 b05004ea6f53245074d7d997d340b067c55f8eed78b36b3f22e1a1fbb20996f5
MD5 ef01b45e77094f09dacee43265fa547e
BLAKE2b-256 66a0f5fb0f6e311f7cc0f7f7204615c657060ed46f5669c5c8f08d61bd565ac9

See more details on using hashes here.

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

Hashes for swiss_pollen-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eb277a059bacd7f851758eac25058dfefd9f89b503925d4f5778d7fc32e0b977
MD5 f68f33ec6d2a620a21ae7c68a18fb0b2
BLAKE2b-256 0757ed2757047a317ff6c2b92da2d53dd53fcf2f9ee5573268fe3b639f1b3860

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page