Const

Constants for the plugin app.

class smarter.apps.plugin.const.PluginCacheTtl(*values)[source]

Bases: IntEnum

Seconds to cache the results of each kind of plugin’s remote calls, with @cache_results.

Each TTL reflects how quickly the remote data is expected to change. The ImageSearch and Websearch values are the defaults of the manifest’s cacheTtl, which a plugin may override.

API = 600

An ApiPlugin’s GET responses.

DEFAULT = 600

The default TTL for a plugin’s remote calls to safe_http.py, if the plugin does not specify a cacheTtl in its manifest.

An ImageSearchPlugin’s Brave Image Search API responses.

SKILL = 259200

A SkillPlugin’s remote skill, retrieved from GitHub or another https host.

SQL = 600

A SqlPlugin’s query results.

WEBSEARCH = 3600

A WebsearchPlugin’s search results and web pages.

WEBSEARCH_ROBOTS_TXT = 3600

The robots.txt files that a WebsearchPlugin obeys.