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 python 3.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.1.0.tar.gz (10.9 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.1.0-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file swiss_pollen-2.1.0.tar.gz.

File metadata

  • Download URL: swiss_pollen-2.1.0.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for swiss_pollen-2.1.0.tar.gz
Algorithm Hash digest
SHA256 3e969756fad387e12531f0879f844785e9901647e51289b340ebf02e5994a2a3
MD5 4034c89634981c0ca0ee952872d29cc5
BLAKE2b-256 cd1baeba0d8c2693432220f9bde44156ce3db620077707abafa50824b4df6b30

See more details on using hashes here.

File details

Details for the file swiss_pollen-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: swiss_pollen-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for swiss_pollen-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 21a57ab9929f7afd7756a09ac1194da5172df66f5ee6be921d13fd672dc996f4
MD5 d11a927a7fcce8137104ce22038f5839
BLAKE2b-256 b47e9ec4808561e5b7c76d3d6fb5d8b3f05d8d6fee769196a9de91b9d61ef247

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