swiss-pollen


Nameswiss-pollen JSON
Version 1.1.0 PyPI version JSON
download
home_pagehttps://github.com/frimtec/swiss-pollen
SummaryAPI to gather the current pollen load from MeteoSchweiz
upload_time2025-08-11 12:42:14
maintainerNone
docs_urlNone
authorMarkus Friedli
requires_python>=3.9
licenseApache-2.0
keywords pollen swiss
VCS
bugtrack_url
requirements requests pytz
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Swiss-Pollen
[![PyPI][pypi-shield]][pypi]
[![PyPI - Python Version][pypi-python-version-shield]][pypi]

![Project Maintenance][maintenance-shield]
[![License][license-shield]][license]

[![Build Status][build-status-shield]][build-status]
[![Deploy Status][deploy-status-shield]][deploy-status]

Python API to gather the current pollen load from [MeteoSchweiz][MeteoSchweiz] for the following pants:
* birch
* beech
* oak
* alder
* ash
* grasses
* hazel

For the use within [Home Assistant][home-assistant] use the custom component [hass-swiss-pollen][hass-swiss-pollen].

This module is not official developed, supported or endorsed by [MeteoSchweiz][MeteoSchweiz].

## Installation
### Using pip
1. Install python3.9 or higher
1. Install swiss-pollen with ```pip install swiss-pollen```.
1. Run swiss-pollen test with ```swiss-pollen```.

## Usage
### API

```python
class PollenService:
    @staticmethod
    def load(plants : list[Plant] = Plant) -> PollenResult
```

### Example
```python
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])
```

[maintenance-shield]: https://img.shields.io/maintenance/yes/2025.svg
[license-shield]: https://img.shields.io/github/license/frimtec/swiss-pollen.svg
[license]: https://opensource.org/licenses/Apache-2.0
[pypi-shield]: https://img.shields.io/pypi/v/swiss-pollen.svg 
[pypi-python-version-shield]: https://img.shields.io/pypi/pyversions/swiss-pollen.svg 
[pypi]: https://pypi.org/project/swiss-pollen/
[pypi-files]: https://pypi.org/project/swiss-pollen/#files
[build-status-shield]: https://github.com/frimtec/swiss-pollen/workflows/Build/badge.svg
[build-status]: https://github.com/frimtec/swiss-pollen/actions?query=workflow%3ABuild
[deploy-status-shield]: https://github.com/frimtec/swiss-pollen/workflows/Deploy%20release/badge.svg
[deploy-status]: https://github.com/frimtec/swiss-pollen/actions?query=workflow%3A%22Deploy+release%22
[home-assistant]: https://www.home-assistant.io/
[MeteoSchweiz]: https://www.meteoschweiz.admin.ch/service-und-publikationen/applikationen/pollenprognose.html
[hass-swiss-pollen]: https://github.com/frimtec/hass-swiss-pollen

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/frimtec/swiss-pollen",
    "name": "swiss-pollen",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "pollen swiss",
    "author": "Markus Friedli",
    "author_email": "frimtec@gmx.ch",
    "download_url": "https://files.pythonhosted.org/packages/77/ac/0cf47091d4eeea03f016ea2a7ba4df10cdd2aa38ae03c390903624825062/swiss_pollen-1.1.0.tar.gz",
    "platform": null,
    "description": "# Swiss-Pollen\n[![PyPI][pypi-shield]][pypi]\n[![PyPI - Python Version][pypi-python-version-shield]][pypi]\n\n![Project Maintenance][maintenance-shield]\n[![License][license-shield]][license]\n\n[![Build Status][build-status-shield]][build-status]\n[![Deploy Status][deploy-status-shield]][deploy-status]\n\nPython API to gather the current pollen load from [MeteoSchweiz][MeteoSchweiz] for the following pants:\n* birch\n* beech\n* oak\n* alder\n* ash\n* grasses\n* hazel\n\nFor the use within [Home Assistant][home-assistant] use the custom component [hass-swiss-pollen][hass-swiss-pollen].\n\nThis module is not official developed, supported or endorsed by [MeteoSchweiz][MeteoSchweiz].\n\n## Installation\n### Using pip\n1. Install python3.9 or higher\n1. Install swiss-pollen with ```pip install swiss-pollen```.\n1. Run swiss-pollen test with ```swiss-pollen```.\n\n## Usage\n### API\n\n```python\nclass PollenService:\n    @staticmethod\n    def load(plants : list[Plant] = Plant) -> PollenResult\n```\n\n### Example\n```python\nfrom swiss_pollen import (PollenService, Plant)\n\n# get pollen data for all available plants (requires 7 remote calls, one for each plant)\nall_pollen_data_per_station = PollenService.load()\n\n# get pollen data for a restricted list of plants (requires 2 remote calls, one for each plant)\nspecific_pollen_data_per_station = PollenService.load(plants = [Plant.HAZEL, Plant.GRASSES])\n```\n\n[maintenance-shield]: https://img.shields.io/maintenance/yes/2025.svg\n[license-shield]: https://img.shields.io/github/license/frimtec/swiss-pollen.svg\n[license]: https://opensource.org/licenses/Apache-2.0\n[pypi-shield]: https://img.shields.io/pypi/v/swiss-pollen.svg \n[pypi-python-version-shield]: https://img.shields.io/pypi/pyversions/swiss-pollen.svg \n[pypi]: https://pypi.org/project/swiss-pollen/\n[pypi-files]: https://pypi.org/project/swiss-pollen/#files\n[build-status-shield]: https://github.com/frimtec/swiss-pollen/workflows/Build/badge.svg\n[build-status]: https://github.com/frimtec/swiss-pollen/actions?query=workflow%3ABuild\n[deploy-status-shield]: https://github.com/frimtec/swiss-pollen/workflows/Deploy%20release/badge.svg\n[deploy-status]: https://github.com/frimtec/swiss-pollen/actions?query=workflow%3A%22Deploy+release%22\n[home-assistant]: https://www.home-assistant.io/\n[MeteoSchweiz]: https://www.meteoschweiz.admin.ch/service-und-publikationen/applikationen/pollenprognose.html\n[hass-swiss-pollen]: https://github.com/frimtec/hass-swiss-pollen\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "API to gather the current pollen load from MeteoSchweiz",
    "version": "1.1.0",
    "project_urls": {
        "Homepage": "https://github.com/frimtec/swiss-pollen"
    },
    "split_keywords": [
        "pollen",
        "swiss"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "19c77cc0a79a1596465c235caf7c162ade7f1755d279d96605b2d424c0ac3bd9",
                "md5": "b2bc9f41928aeaaee9ffe23f333d7e51",
                "sha256": "e6ec7d310a203206b304cb8ff3c3f2cdde94bd3a48669431c6e4fa6015084aad"
            },
            "downloads": -1,
            "filename": "swiss_pollen-1.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b2bc9f41928aeaaee9ffe23f333d7e51",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 11130,
            "upload_time": "2025-08-11T12:42:13",
            "upload_time_iso_8601": "2025-08-11T12:42:13.849238Z",
            "url": "https://files.pythonhosted.org/packages/19/c7/7cc0a79a1596465c235caf7c162ade7f1755d279d96605b2d424c0ac3bd9/swiss_pollen-1.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "77ac0cf47091d4eeea03f016ea2a7ba4df10cdd2aa38ae03c390903624825062",
                "md5": "2b11c06e1ab481eec0270ef612b23527",
                "sha256": "37dc72e9244d82d9402e03d7c96e4de716b38ce5c0b44382bcc17c45b55c2af0"
            },
            "downloads": -1,
            "filename": "swiss_pollen-1.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "2b11c06e1ab481eec0270ef612b23527",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 9780,
            "upload_time": "2025-08-11T12:42:14",
            "upload_time_iso_8601": "2025-08-11T12:42:14.598318Z",
            "url": "https://files.pythonhosted.org/packages/77/ac/0cf47091d4eeea03f016ea2a7ba4df10cdd2aa38ae03c390903624825062/swiss_pollen-1.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-11 12:42:14",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "frimtec",
    "github_project": "swiss-pollen",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "requests",
            "specs": [
                [
                    "==",
                    "2.32.4"
                ]
            ]
        },
        {
            "name": "pytz",
            "specs": [
                [
                    "==",
                    "2025.2"
                ]
            ]
        }
    ],
    "lcname": "swiss-pollen"
}
        
Elapsed time: 0.41141s