covid19#

class platypush.backend.covid19.Covid19Backend(country: str | List[str] | None, poll_seconds: float | None = 3600.0, **kwargs)[source]#

Bases: Backend

This backend polls new data about the Covid-19 pandemic diffusion and triggers events when new data is available.

Triggers:

__init__(country: str | List[str] | None, poll_seconds: float | None = 3600.0, **kwargs)[source]#
Parameters:

country

Default country (or list of countries) to retrieve the stats for. It can either be the full country name or the country code. Special values:

  • world: Get worldwide stats.

  • all: Get all the available stats.

Default: either the default configured on the platypush.plugins.covid19.Covid19Plugin plugin or world.

Parameters:

poll_seconds – How often the backend should check for new check-ins (default: one hour).

class platypush.backend.covid19.Covid19Update(**kwargs)[source]#

Bases: Base

Models the Covid19Data table

__init__(**kwargs)#

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.