Skip to main content

A simple API for Pollen.com data

Project description

🌼 pypollencom: A Simple Python API for Pollen.com

.. image:: https://travis-ci.org/bachya/pypollencom.svg?branch=master :target: https://travis-ci.org/bachya/pypollencom

.. image:: https://img.shields.io/pypi/v/pypollencom.svg :target: https://pypi.python.org/pypi/pypollencom

.. image:: https://img.shields.io/pypi/pyversions/pypollencom.svg :target: https://pypi.python.org/pypi/pypollencom

.. image:: https://img.shields.io/pypi/l/pypollencom.svg :target: https://github.com/bachya/pypollencom/blob/master/LICENSE

.. image:: https://codecov.io/gh/bachya/pypollencom/branch/master/graph/badge.svg :target: https://codecov.io/gh/bachya/pypollencom

.. image:: https://api.codeclimate.com/v1/badges/71eb642c735e33adcdfc/maintainability :target: https://codeclimate.com/github/bachya/pypollencom

.. image:: https://img.shields.io/badge/SayThanks-!-1EAEDB.svg :target: https://saythanks.io/to/bachya

pypollencom is a simple Python library for allergen and disease data from Pollen.com <http://www.pollen.com/>_.

🌼 PLEASE READ: 1.0.0 and Beyond

Version 1.0.0 of pypollencom makes several breaking, but necessary changes:

  • Moves the underlying library from Requests <http://docs.python-requests.org/en/master/>_ to aiohttp <https://aiohttp.readthedocs.io/en/stable/>_
  • Changes the entire library to use :code:asyncio
  • Makes 3.5 the minimum version of Python required

If you wish to continue using the previous, synchronous version of pypollencom, make sure to pin version 1.1.2.

🌼 Installation

.. code-block:: bash

$ pip install pypollencom

🌼 Usage

.. code-block:: python

import pypollencom

pyairvisual starts within an aiohttp <https://aiohttp.readthedocs.io/en/stable/>_ :code:ClientSession:

.. code-block:: python

import asyncio

from aiohttp import ClientSession

from pyairvisual import Client

async def main() -> None: """Create the aiohttp session and run the example.""" async with ClientSession() as websession: await run(websession)

async def run(websession): """Run.""" # YOUR CODE HERE

asyncio.get_event_loop().run_until_complete(main())

Create a client:

.. code-block:: python

client = pypollencom.Client(80012)

ZIP codes starting with 0 need to be provided as strings:

client = pypollencom.Client('00544')

Then, get to it!

.. code-block:: python

Get current allergen information:

client.allergens.current()

Get more information on the current allergen outlook:

client.allergens.outlook()

Get extended forecast allergen information:

client.allergens.extended()

Get historic allergen information:

client.allergens.historic()

Get extended forecast cold and flu information:

client.disease.extended()

🌼 Contributing

#. Check for open features/bugs <https://github.com/bachya/pypollencom/issues>_ or initiate a discussion on one <https://github.com/bachya/pypollencom/issues/new>. #. Fork the repository <https://github.com/bachya/pypollencom/fork>. #. Install the dev environment: :code:make init. #. Enter the virtual environment: :code:pipenv shell #. Code your new feature or bug fix. #. Write a test that covers your new functionality. #. Run tests: :code:make test #. Build new docs: :code:make docs #. Add yourself to AUTHORS.rst. #. Submit a pull request!

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

pypollencom-2.0.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

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

pypollencom-2.0.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file pypollencom-2.0.0.tar.gz.

File metadata

  • Download URL: pypollencom-2.0.0.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pypollencom-2.0.0.tar.gz
Algorithm Hash digest
SHA256 73b1360568758eaeadbfb76c5d92bfd7343f495ab825ce59426325cdf1e82f48
MD5 7cf91b8a82871a44210bd909ac4a862e
BLAKE2b-256 d289c41a45233fba47a458f08b0ad24d395db61c1c2dd442ebeb6363f7f64ca3

See more details on using hashes here.

File details

Details for the file pypollencom-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pypollencom-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 19991c15dda6c8e786df92d44d66c343817d7ec96717f81253e41ae2957e7b73
MD5 ebdf4b1d7b81c4339f46025f88f57fe8
BLAKE2b-256 78b5629ee0d6ee1138eeae634bd4b60ef9420327312819e4250418d43b60d217

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