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 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

  1. Install python3.9 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 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


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-0.0.1.tar.gz (7.7 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-0.0.1-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file swiss-pollen-0.0.1.tar.gz.

File metadata

  • Download URL: swiss-pollen-0.0.1.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for swiss-pollen-0.0.1.tar.gz
Algorithm Hash digest
SHA256 89e4c98c0143ff737625fec843fb651b9e8bbaae95fac0117314fcf07af6267f
MD5 5c3bedb2eb14246cab2d53af5fda5cdf
BLAKE2b-256 f5e9456c717e1a03321a81eb4df03e13d2dedbb297d10c91fb316a5f4194693b

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for swiss_pollen-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d0febdd8d69d080989f4eb6d304d193c560cc61f31c3f95b46754065954371a4
MD5 7b2db5f13316a3f97e139363bf324cb7
BLAKE2b-256 27252e311c52fc1543f67f5124b2a224841e6537e04e97b23e93cfee90542dbd

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